4 ms·
Some of this code is just... WTF? For example, https://github.com/Microsoft/WinObjC/blob/106d8b2738101872a186479a07508b16d34f5872/Frameworks/Foundation/NSCalend
by timdierks 11y ago
Some of this code is just... WTF? For example, https://github.com/Microsoft/WinObjC/blob/106d8b2738101872a186479a07508b16d34f5872/Frameworks/Foundation/NSCalendar.mm#L233 https://github.com/Microsoft/WinObjC/blob/106d8b2738101872a1... ; even setting aside the fact that some minutes don't have 60 seconds, 30.42 days per month?!
- noveltyaccount 11y ago365 / 12 = 30.42
- timdierks 11y agoWell, yes, but you cannot do any useful math on months with that fact. Late in January, plus one "month", gives you early in March; early in July, plus one "month", gives you late in July. I can't imagine what useful intent could lead to this code being correct.
- alextgordon 11y agoI expect they had to write something that looked good to meet the deadline, even if it was completely broken.
- hk__2 11y agoOne minute is 60 seconds by definition. Minutes with more than 60 seconds are just one (hacky?) way to support leap seconds.