2 ms·
That's a different problem; it doesn't take year/month/day, but InternalTicks (and, nitpicking, doesn't appear to handle leap seconds, an issue that doesn't exi
by Someone 11y ago
That's a different problem; it doesn't take year/month/day, but InternalTicks (and, nitpicking, doesn't appear to handle leap seconds, an issue that doesn't exist for functions taking ymd as input)
- brudgers 11y agoLeap seconds don't occur systematically, so there's no algorithm that can always determine the correct day of the week by the number of seconds or ticks from epoch. The algorithm of the subject line abstracts over leap seconds by referencing a calendar rather than a clock...i.e. a calendar being a document that names future times rather than an instrument that reports the current time.
- masklinn 11y agoIt's a different implementation, not a different concept. InternalTicks are how datetime data is represented in a C# datetime object (actually dateData which is a 64b bitfield: the first 62 bits are the internal tick, the last 2 bits are the kind).
- mark-r 11y agoSo all the hard work of converting year/month/day to InternalTicks is done at creation time, greatly simplifying the weekday calculation occurring later.