top | item 42614102

(no title)

ifdefdebug | 1 year ago

While you could argue that it's flooring, it feels much more like truncating. We have a inner representation of time that's like yyyymmdd-hhmmss-mmmm and we truncate it to the precision we need for a given task. If we need the month we truncate to yyyymm, and if we need hours we truncate to yyyymmdd-hh.

That's quit intuitive for all kind of time precision, and the author's rounding solution would be somewhat counterintuitive, at least for me.

discuss

order

No comments yet.