Skip to content

Comment on Fix date-handling bug when today’s date is later than the target monthparent

Comments

No if you are manipulating dates do not use time.

Use an integer type denoting days since the start date. See Modified Julian date.

Thus tomorrow is always 1 more than today - if you have times you need leap seconds.

Thanks for the explanation! (edit - this was meant genuinely, not sarcastically)

Slightly sad to have been downvoted, though, just for making a tentative suggestion (note use of question mark) :'(

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.