Skip to content

Markgorden/date

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#LuaDate v2.2

travis-ci status

Lua Date and Time module for Lua Openresty.

##Features:

  • Date and Time string parsing.
  • Time addition and subtraction.
  • Time span calculation.
  • Support ISO 8601 Dates.
  • Local time support.
  • Lua module (not binary).
  • Formats Date and Time like strftime.

License

MIT license.

Documentation

Documentation is available in the doc folder, or online at Github.

Tests

sample test

$ lua samples/tests.lua 
$ luajit samples/tests.lua 
$ /path/to/openresty/bin/resty samples/tests.lua 

unit test

Tests are located in the spec directory and can be run using busted. First you have to install luarocks. Then run commands below.

$ /path/to/luarocks/bin/luarocks install busted
$ /path/to/luarocks/bin/busted spec

##Changes:

  • v2.2.1 lua 5.x compatible
  • v2.2 change it for openresty use #641ec56, not compatible for Lua 5.*
  • v2.1.2 fix scientific notation #9, now available for Lua 5.3
  • v2.1.1 fix for '>=' operator #3, added test suite, added Travis CI, license MIT
  • v2.1 Lua 5.2 support. Global 'date' will no longer be set.
  • v2.0 original by Jas Latrix

About

Date & Time module for openresty

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 100.0%