minus-squareal4s@lemmy.worldtomemes@lemmy.world•The last hopelinkfedilinkarrow-up4·8 months agoDon’t be ridiculous, that would never pass QA. But this one will. Joy for years to come: public string GetDayOfWeek(DateTime date) { return ((date - new DateTime(1970, 1, 1)).Milliseconds / 86400000) % 7 switch { 0 => "Thursday", 1 => "Friday", 2 => "Saturday", 3 => "Sunday", 4 => "Monday" }; } linkfedilink
minus-squareal4s@lemmy.worldtoMemes@lemmy.ml•Inspired by a similar meme about applied math, I present: applied physicslinkfedilinkarrow-up12·2 years agoThen why not use 1? It’s closer to pi than 10 and even easier to calculate with. linkfedilink
Don’t be ridiculous, that would never pass QA.
But this one will. Joy for years to come: