lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


List,

I’m happy to announce a new version of the `date` module. There is
one addition; “centuryflip”, which allows one to set (a global)
setting how to parse 2 digit years (can be set and read).

The default remains to set 2 digit years in the 19xx range. But it
can now be altered, eg; after calling `date.setcenturyflip(50)`,
the years 00-49 will become 20xx, and years 50-99 will become 19xx.

Since the default is 0, it is fully backwards compatible.

Source is on GitHub [1] as are the docs [2], installation is
easiest using LuaRocks.

regards
Thijs

[1] https://github.com/Tieske/date
[2] https://tieske.github.io/date/