Via jstn.
while (days > 365) { if (IsLeapYear(year)) { if (days > 366) { days -= 366; year += 1; } } else { days -= 365; year += 1; } }Out of curiosity, why was this being rewritten by Freescale or Microsoft at all? This has been a solved problem for a very long time.
(Also, this is very ugly C style in many places. I expected better from Microsoft.)
-
snippet reblogged this from jstn
-
allincircles reblogged this from marco
-
chancegarcia reblogged this from trotzke
-
lanceturner reblogged this from jstn
-
trotzke reblogged this from marco
-
romansang-marino reblogged this from ratatat
-
ratatat reblogged this from marco
-
inky liked this
-
parx reblogged this from poortaste
-
perkyblackchick reblogged this from ledenes
-
lindatran liked this
-
microblog reblogged this from marco
-
coffeemakescreative liked this
-
bobrafael liked this
-
annagrimm liked this
-
thommy liked this
-
johnnyfortune liked this
-
aladuh reblogged this from marco
-
darknessfalls reblogged this from jstn
-
dhotson liked this
-
peterbaker liked this
-
adamadam liked this
-
dantesoft liked this
-
ronworkman reblogged this from jstn
-
nevyn reblogged this from marco and added:
The code from where...originated is available here. The funny thing is that the same code...
-
commedesfuckdwn liked this
-
uninformat reblogged this from marco
-
skelly liked this
-
sashas liked this
-
benglert reblogged this from midoriw and added:
Also, who hard-codes magic numbers like that? So many things wrong with this picture.
-
angstinmypants liked this
-
midoriw reblogged this from marco
-
spdracerx liked this
-
shabdar reblogged this from marco and added:
“I expect” is...diffrent story! Microsoft...like a hot...
-
thefourth liked this
-
marco reblogged this from jstn and added:
Out of curiosity, why was this being rewritten by Freescale or Microsoft at all? This has been a solved problem for a...
-
inothernews reblogged this from ledenes
-
ledenes reblogged this from ryanjpointer
-
ryanjpointer reblogged this from jstn
-
langer liked this
-
jacob liked this
-
sadbeararchive liked this
-
wooliebear liked this
-
poortaste liked this
-
poortaste reblogged this from jstn
-
sparo reblogged this from jstn
-
sparo liked this
-
jstn posted this