Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Is the clock object oriented?
See what i did there, objection? Object? Get it?
I should go and do programming. =( -
@gitpush The real question is, when there's a leap second, do arrays start at 00:00:00, at 24:00:00, or at 23:59:60?
-
@gitpush No it's no real issue, you just have to remember to rewrite your for loops a little bit for 12-hour clocks.
x < n simply becomes
x < (n%12<0)?n%12+12:n%12
I like how readable it is, much better than 0 or 1 indexes.
But I guess for leap seconds it would be better to use https://developers.google.com/time/... in your arrays.
Related Rants
Any objections??? 😂😂😂
joke/meme
array