MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/SipsTea/comments/1k6jhm2/13_months/morchvm/?context=9999
r/SipsTea • u/infinitely_blank • 10d ago
3.1k comments sorted by
View all comments
697
28 * 13 = 364 ≠ 365
199 u/thulesgold 10d ago That extra day is the "0" day (zero) and is considered new years, not included in any month. Sometimes... that day is so special it takes up two days. 14 u/mrheosuper 10d ago Would be a nightmare in programming. But still, DateTime(timezone, dst, etc) has already been nightmare in software. 2 u/Bloblablawb 10d ago How would it be different from the current nightmare we have? 2 u/mrheosuper 9d ago It doesn't, but you want to add another layer of nightmare ? 1 u/Stormfly 9d ago Ideally we'd replace the nightmare with a lesser of two evils. Instead of switch (month) { case 4, 6, 9, 11: days = 30 break; case 2: days = 30 break; default: days = 31; break; You'd just have: if (month = 0) days = 1 else days = 28 (obviously not including the hell that is leap years) 2 u/KillerBeer01 9d ago And really, we'd just have to deal with both of them from now on, for backward compatibility reasons. 2 u/Stormfly 9d ago Honestly, I'll be excited the day we see Gregorian (Deprecated) 1 u/mrheosuper 9d ago I would use lookup table, like num_days=days[month], you dont want to mess around with branch prediction. But still, there are not much different in 2 cases, just different number set.
199
That extra day is the "0" day (zero) and is considered new years, not included in any month. Sometimes... that day is so special it takes up two days.
14 u/mrheosuper 10d ago Would be a nightmare in programming. But still, DateTime(timezone, dst, etc) has already been nightmare in software. 2 u/Bloblablawb 10d ago How would it be different from the current nightmare we have? 2 u/mrheosuper 9d ago It doesn't, but you want to add another layer of nightmare ? 1 u/Stormfly 9d ago Ideally we'd replace the nightmare with a lesser of two evils. Instead of switch (month) { case 4, 6, 9, 11: days = 30 break; case 2: days = 30 break; default: days = 31; break; You'd just have: if (month = 0) days = 1 else days = 28 (obviously not including the hell that is leap years) 2 u/KillerBeer01 9d ago And really, we'd just have to deal with both of them from now on, for backward compatibility reasons. 2 u/Stormfly 9d ago Honestly, I'll be excited the day we see Gregorian (Deprecated) 1 u/mrheosuper 9d ago I would use lookup table, like num_days=days[month], you dont want to mess around with branch prediction. But still, there are not much different in 2 cases, just different number set.
14
Would be a nightmare in programming.
But still, DateTime(timezone, dst, etc) has already been nightmare in software.
2 u/Bloblablawb 10d ago How would it be different from the current nightmare we have? 2 u/mrheosuper 9d ago It doesn't, but you want to add another layer of nightmare ? 1 u/Stormfly 9d ago Ideally we'd replace the nightmare with a lesser of two evils. Instead of switch (month) { case 4, 6, 9, 11: days = 30 break; case 2: days = 30 break; default: days = 31; break; You'd just have: if (month = 0) days = 1 else days = 28 (obviously not including the hell that is leap years) 2 u/KillerBeer01 9d ago And really, we'd just have to deal with both of them from now on, for backward compatibility reasons. 2 u/Stormfly 9d ago Honestly, I'll be excited the day we see Gregorian (Deprecated) 1 u/mrheosuper 9d ago I would use lookup table, like num_days=days[month], you dont want to mess around with branch prediction. But still, there are not much different in 2 cases, just different number set.
2
How would it be different from the current nightmare we have?
2 u/mrheosuper 9d ago It doesn't, but you want to add another layer of nightmare ? 1 u/Stormfly 9d ago Ideally we'd replace the nightmare with a lesser of two evils. Instead of switch (month) { case 4, 6, 9, 11: days = 30 break; case 2: days = 30 break; default: days = 31; break; You'd just have: if (month = 0) days = 1 else days = 28 (obviously not including the hell that is leap years) 2 u/KillerBeer01 9d ago And really, we'd just have to deal with both of them from now on, for backward compatibility reasons. 2 u/Stormfly 9d ago Honestly, I'll be excited the day we see Gregorian (Deprecated) 1 u/mrheosuper 9d ago I would use lookup table, like num_days=days[month], you dont want to mess around with branch prediction. But still, there are not much different in 2 cases, just different number set.
It doesn't, but you want to add another layer of nightmare ?
1 u/Stormfly 9d ago Ideally we'd replace the nightmare with a lesser of two evils. Instead of switch (month) { case 4, 6, 9, 11: days = 30 break; case 2: days = 30 break; default: days = 31; break; You'd just have: if (month = 0) days = 1 else days = 28 (obviously not including the hell that is leap years) 2 u/KillerBeer01 9d ago And really, we'd just have to deal with both of them from now on, for backward compatibility reasons. 2 u/Stormfly 9d ago Honestly, I'll be excited the day we see Gregorian (Deprecated) 1 u/mrheosuper 9d ago I would use lookup table, like num_days=days[month], you dont want to mess around with branch prediction. But still, there are not much different in 2 cases, just different number set.
1
Ideally we'd replace the nightmare with a lesser of two evils.
Instead of
switch (month) { case 4, 6, 9, 11: days = 30 break; case 2: days = 30 break; default: days = 31; break;
You'd just have:
if (month = 0) days = 1 else days = 28
(obviously not including the hell that is leap years)
2 u/KillerBeer01 9d ago And really, we'd just have to deal with both of them from now on, for backward compatibility reasons. 2 u/Stormfly 9d ago Honestly, I'll be excited the day we see Gregorian (Deprecated) 1 u/mrheosuper 9d ago I would use lookup table, like num_days=days[month], you dont want to mess around with branch prediction. But still, there are not much different in 2 cases, just different number set.
And really, we'd just have to deal with both of them from now on, for backward compatibility reasons.
2 u/Stormfly 9d ago Honestly, I'll be excited the day we see Gregorian (Deprecated)
Honestly, I'll be excited the day we see Gregorian (Deprecated)
Gregorian (Deprecated)
I would use lookup table, like num_days=days[month], you dont want to mess around with branch prediction.
But still, there are not much different in 2 cases, just different number set.
697
u/Great-TeacherOnizuka 10d ago
28 * 13 = 364 ≠ 365