Sets the current locale to the supplied locale
Sets the current locale to the supplied locale. Category, which is optional, is a string which is one of:
"all" (the default)
Returns the name of the new locale, or nil if invalid.
Hint: I found that in Australia, the default in Lua was to use the USA time format (MM/DD/YY) rather than the local format (DD/MM/YY) when displaying dates with os.date. This line seemed to fix that:
According to the help file "If locale points to an empty string, the locale is the implementation-defined native environment.". Thus the empty locale string seemed take the country default.
See Also ...
os.clock - Amount of elapsed/CPU time used (depending on OS)
Lua base functions
(Help topic: lua=os.setlocale)
Enter a search string to find matching documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )