cm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agoI'm new to using Ruby and this tickled me pinklemmy.mlimagemessage-square69fedilinkarrow-up1340arrow-down12cross-posted to: [email protected]
arrow-up1338arrow-down1imageI'm new to using Ruby and this tickled me pinklemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agomessage-square69fedilinkcross-posted to: [email protected]
minus-squarebestboyfriendintheworld@sh.itjust.workslinkfedilinkarrow-up10·2 days agoNever use numbers when calculating dates. Use the data formats and constants the calendar library provides.
minus-squareLousyCornMuffins@lemmy.worldlinkfedilinkEnglisharrow-up1·2 days agodidn’t we gain or lose 0.00000001ish of a day recently? Like from tonga exploding or antarctica melting or something i can’t remember.
minus-squarebrianary@lemmy.ziplinkfedilinkarrow-up2·1 day agoThat kind of thing happens surprisingly often. https://en.wikipedia.org/wiki/Leap_second
minus-squareBlackmist@feddit.uklinkfedilinkEnglisharrow-up2·2 days agoSure, if you want things at midday instead of midnight.
365.25, surely
Never use numbers when calculating dates. Use the data formats and constants the calendar library provides.
365.2425
didn’t we gain or lose 0.00000001ish of a day recently? Like from tonga exploding or antarctica melting or something i can’t remember.
That kind of thing happens surprisingly often.
https://en.wikipedia.org/wiki/Leap_second
Sure, if you want things at midday instead of midnight.