Saagar Jha

(replying to Kanbaru 🌟 (one hikari of too many))
@hikari > with minimal research

“I can’t do this because time is hard”

Kanbaru 🌟 (one hikari of too many)

(replying to Saagar Jha)

@saagar I did actually do a bit of research for this… I went to the Wikipedia page for the Gregorian calendar to check I remembered the leap year algorithm correctly, how long its cycles are, and also to remind me how long each month of the year is…

but the constants I ended up using can be trivially derived from things most people know (how long is a year, what is a leap year, how long is an hour, how long is a day)

Saagar Jha

(replying to Kanbaru 🌟 (one hikari of too many))
@hikari So like I know what all the constants are, the concern I would generally have is “do I need to care about things like leap seconds”
2 replies →
2 replies

Kanbaru 🌟 (one hikari of too many)

(replying to Saagar Jha)

@saagar ah, right, my particular kind of curious mind meant I already knew the answer to that (no) but most people wouldn't

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

@saagar I think, as an interview question, I wouldn't want to penalise someone for not knowing, it's just interesting to see how they go about trying to solve it considering what they do know


I Can't Believe It's Not Zero!

(replying to Saagar Jha)

@saagar @hikari there’s a fixed small set of all leap seconds ever, so that’s just a table lookup.