All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
3 Provides an class to represent a time and date.
4 Objects have no concept of timezone or utc offset.
6 The fields are intentionally compatible with the lua standard library's `os.date` and `os.time`. Objects have fields:
17 timetable components may be outside of their standard range (e.g. a month component of
18 14) to faciliate arithmetic operations on date components. `:normalise ( )` can be
19 called to modify components to return to their standard range.
21 Equality and comparisons should work between timetable objects.
24 ## `new ( year , month , day , hour , min , sec , [yday] , [wday] )`
26 Returns a new timetable with the given contents.
29 ## `new_from_timestamp ( timestamp )`
31 Returns a new timetable given a timestamp in seconds since the unix epoch of
34 `:normalise ( )` should probably be called before use to resolve to the current time and
40 Returns a new independant instance of an existing timetable object.
45 Mutates the current object's time and date components so that they lie within 'normal'
46 ranges e.g. `month` is `1`-`12`; `min` is `0`-`59`
49 ## `:rfc_3339 ( )` and `__tostring` metamethod
51 Returns the timetable formatted as an rfc-3339 style string.
52 The timezone offset (or Z) is not appended.
53 The ranges of components are not checked, and if you want a valid timestamp, `:normalise
54 ( )` should be called first.
59 Returns the timetable as the number of seconds since unix epoch (1970-01-01) as a lua
65 Unpacks the timetable object; returns `year`, `month`, `day`, `hour`, `min`, `sec`, `yday`, `wday`