]> git.madduck.net Git - etc/awesome.git/blobdiff - doc/timetable.md

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

luatz/timetable: Fix `rfc_3339()` bad rounding behaviour. Closes issue #4
[etc/awesome.git] / doc / timetable.md
index 845c7875ddb0db006566e59d220b0daf7928f151..49fe046b5a494fa7bc04e635b1152737b47898aa 100644 (file)
@@ -39,9 +39,17 @@ Returns a new independent instance of an existing timetable object.
 
 ### `:normalise ( )`
 
 
 ### `:normalise ( )`
 
-Mutates the current object's time and date components so that they lie within 'normal' 
+Mutates the current object's time and date components so that are integers within 'normal'
 ranges e.g. `month` is `1`-`12`; `min` is `0`-`59`
 
 ranges e.g. `month` is `1`-`12`; `min` is `0`-`59`
 
+First, fractional parts are propagated down.  
+e.g. `.month=6.5` `.day=1` (which could be read as "the first day after the middle of June")
+normalises to `.month=2` `.day=16`
+
+Second, any fields outside of their normal ranges are propagated up  
+e.g. `.hour=10` `.min=100` (100 minutes past 10am)
+normalises to `.hour=11` `.min=40`
+
 
 ### `:rfc_3339 ( )` and `__tostring` metamethod
 
 
 ### `:rfc_3339 ( )` and `__tostring` metamethod