https://www.jefftk.com/p/history-of-zero-based-months Jeff Kaufman Posts RSS < new Date() Wed Aug 24 2022 ... > new Date().getFullYear() 2022 > new Date().getMonth() 7 > new Date().getDate() 24 It represents 2022-08-24 as (2022, 7, 24). One-based indexing for the year and day, but zero-based indexing for the month. In this case, however, the problem was copied from Java: getMonth: The value returned is between 0 and 11, with the value 0 representing January. getDate: The value returned is between 1 and 31 representing the day of the month. I'd love to blame Java, but they seem to have copied the problem from C: localtime(3): tm_mday: The day of the month, in the range 1 to 31. tm_mon: The number of months since January, in the range 0 to 11. Looking at the Unix History repo, the first mention of "month (0-11)" is in 1973's Research Unix V4: The value is a pointer to an array whose components are .s3 .lp +5 5 0 seconds .lp +5 5 1 minutes .lp +5 5 2 hours .lp +5 5 3 day of the month (1-31) .lp +5 5 4 month (0-11) .lp +5 5 5 year \*- 1900 .lp +5 5 6 day of the week (Sunday = 0) .lp +5 5 While this may have been an original decision by Dennis Ritchie, it's also possible it was copied from an even earlier system. Does anyone know? - Contra Dance Contact Tracing Digital Dinner Signup - Comment via: facebook Recent posts on blogs I like: History of group sleeping Not as normal as it once was The post History of group sleeping appeared first on Otherwise. via Otherwise August 10, 2022 On the Beach I really like going in the water and this beach is a great place for building sand castles and boogie boarding. I also like trying to float on top of big waves. I'm not very good at it. I only float on the flat waves. via Anna Wise's Blog Posts July 12, 2022 Decision theory and dynamic inconsistency Here is my current take on decision theory: When making a decision after observing X, we should condition (or causally intervene) on statements like "My decision algorithm outputs Y after observing X." Updating seems like a description of something you do... via The sideways view July 3, 2022 more (via openring) More Posts * Effective Altruism and Everyday Decisions * Playing Dances With a Kid * How to parent more predictably * Why I Work on Ads * Market Rate Food Is Luxury Food open --------------------------------------------------------------------- Jeff Kaufman Posts RSS <