cm0002@lemmy.world to Programmer Humor@programming.dev · 8 个月前I'm new to using Ruby and this tickled me pinklemmy.mlimagemessage-square72linkfedilinkarrow-up1469arrow-down15cross-posted to: [email protected]
arrow-up1464arrow-down1imageI'm new to using Ruby and this tickled me pinklemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 8 个月前message-square72linkfedilinkcross-posted to: [email protected]
minus-squarebestboyfriendintheworld@sh.itjust.workslinkfedilinkarrow-up12·8 个月前Never use numbers when calculating dates. Use the data formats and constants the calendar library provides.
minus-squareMinnesotaGoddam@lemmy.worldlinkfedilinkEnglisharrow-up1·8 个月前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.
minus-squarebrianary@lemmy.ziplinkfedilinkarrow-up2·8 个月前That kind of thing happens surprisingly often. https://en.wikipedia.org/wiki/Leap_second
minus-squareBlackmist@feddit.uklinkfedilinkEnglisharrow-up2·8 个月前Sure, 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.