cm0002@lemmy.world to Programmer Humor@programming.dev · 2 months agoI'm new to using Ruby and this tickled me pinklemmy.mlimagemessage-square72fedilinkarrow-up1467cross-posted to: programmerhumor@lemmy.ml
arrow-up1467imageI'm new to using Ruby and this tickled me pinklemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 2 months agomessage-square72fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarebestboyfriendintheworld@sh.itjust.workslinkfedilinkarrow-up12·2 months agoNever use numbers when calculating dates. Use the data formats and constants the calendar library provides.
minus-squareBeeegScaaawyCripple@lemmy.worldlinkfedilinkEnglisharrow-up1·2 months 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·2 months agoThat kind of thing happens surprisingly often. https://en.wikipedia.org/wiki/Leap_second
minus-squareBlackmist@feddit.uklinkfedilinkEnglisharrow-up2·2 months 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.