Long Now Years: Five-Digit Dates and Y10K-Compliance at Home (02013)
longnow.org
longnow.org
They asked for that to be changed back to 4 digits within 2 weeks of deployment. The people actually using the software demanded the ability to enter 2 digit dates and have the system fill in "19" or "20" as appropriate too.
Of course that was what I'd written in the first place, so the actual work required was going and changing the STOOPIT_DATES flag back to 0.
https://docs.microsoft.com/en-us/dotnet/api/system.datetime....
I was honestly surprised, because normally limits for binary digits don't coincide with decimal limits. DateTime.MaxValue is 0x2BCA2875F4373FFF.
Looking in the source for DateTime, internally it's a 64-bit unsigned integer. The lower 62 bits are used for a date, and the upper 2 are used to flag local/utc/dst.
The 62 bits technically allow for an extra ~81 days into the year 10,000.
(Makes me wonder if, in 7950 years or so, someone's going to recompile a bunch of C# code to use an updated version of DateTime.)
Just eyeballing it from starting 0x2B... which is about 2/3 of 0x3F... which would be the maximum value of 62 bits, I'm pretty sure you've miscalculated!
Looking at the docs, 0x0 represents 1/1/1 AD, so that means the 62 bits can suffice for almost 5000 years beyond DateTime.MaxValue. So, people's code will still work for a little while afterwards, even if they aren't printed correctly!
But anyway, it's all kind of a moot point. 8000 years ago is about the limit of known human civilisation, so it's unlikely that any of the technology we create today will still be considered important the same distance into the future.
Not only has every country on earth gone through at least one entire calendar reform in the last 8000 years, and many countries that use the concept of DST feel the need to change the dates when it occurs every few years, the chance of this being an issue for anyone is approximately 0.
Let's say the wheel, or reproductible fire, or written language, probably happened around 8,000 years ago - I'd say that's pretty danged important and should be memorialized.
using System;
namespace DateTime_Headroom { class Program { static void Main(string[] args) { Console.WriteLine( "DateTime.MaxValue in hex: 0x" + DateTime.MaxValue.Ticks.ToString("X"));
const ulong DATETIME_RESERVED_BITS = 0xC000000000000000;
Console.WriteLine( "DateTime reserved bits in hex: 0x" + DATETIME_RESERVED_BITS.ToString("X"));
const long DATETIME_TICKS_BITS = (long)~DATETIME_RESERVED_BITS;
Console.WriteLine( "DateTime ticks bits in hex: 0x" + DATETIME_TICKS_BITS.ToString("X"));
var extraTicks = DATETIME_TICKS_BITS - DateTime.MaxValue.Ticks;
Console.WriteLine( "DateTime extra ticks in hex: 0x" + extraTicks.ToString("X"));
Console.WriteLine($"DateTime extra days: {extraTicks / TimeSpan.TicksPerDay}");
}
}
}----
DateTime.MaxValue in hex: 0x2BCA2875F4373FFF DateTime reserved bits in hex: 0xC000000000000000 DateTime ticks bits in hex: 0x3FFFFFFFFFFFFFFF DateTime extra ticks in hex: 0x1435D78A0BC8C000 DateTime extra days: 1685540
Edit: Sorry about the formatting.
Also, kinda makes me wonder about the tradeoffs. I suspect that the performance advantage of 64-bit math over "bigint" math is much more useful than the risk of recompiling a program in 10,000 years to use a 128-bit date.
How about some love for VB.NET around here, huh?
A lot of the simplifications that were in classic Visual Basic just aren't in the .Net version. It was kind of useful if you really needed weak typing, but that's really a niche usage that duck typing in C# now handles.
Already today we can use the Holocene calendar https://en.m.wikipedia.org/wiki/Holocene_calendar but in 8k years we might have an accurate and useful measure to specific points that are easier to work with / more valuable.
Perhaps the unix epoch might even be the most significant start time.
Maybe things will change when the max distance between humans is >>0 light years.
Too bad there are some nutjobs making the false claim that eliminating leap seconds will affect astronomy and appealing to tradition.
But hardware designs and long-term ideas from current era might survive maybe?
For example the space probes we send out over the next few millennia -- or any SETI schemes that involve instructions to an alien species about how to communicate back to us -- better be robust enough to handle the dates beyond 4 digit years.
And thinking on those time-scales might open up our minds to other aspects of design that might be otherwise overlooked.
Expect they may not, but it's bound to happen because it's been running just fine for 8000 years...
But putting a zero in front of isolated year fields is kind of silly when we don’t do the same for days or months. Nobody writes “January 01, 2022” so it would be nonsensical to start writing “January 1, 02022”
Eg, "2021-12-30_author-of-file_title-text" (or similar) is a naming convention I use with some frequency.
That is more useful if you use "2022-01-01" than "2022-1-1" for sorting.
(Or if we're keeping in the Long Now spirit, "02022-01-01".)
A directory full of such entries sorts naturally by the date in the filename itself. Given vagueries of Linux access / modify / change / birth datestamps, this has some utility.
(There are those who argue against putting metadata in filenames. I've come to favour putting relevant and robust metadata in filenames.)
(And avoiding spaces in filenames.)
Lots of people do. I certainly do. Like, you can literally put "January 01" into a search engine and see the results you get.
Only having two-digits for the year can be problematic for some organizations who need to keep DECADES of data/records, but I can't imagine almost any will need to keep millenia worth of records preserved... So I'd say a century or millennia cutoff/pivot will suffice.
How long do we need to keep track of a bunch of dinosaurs' credit card transactions, anyhow?
With apologies to geologists, archaeologists and astronomers. 5-digit years won't be enough for them, anyhow.
"Australian man ‘cannot leave Israel for 8,000 years’ over unpaid child support. Noam Huppert says he is subject to travel ban until the year 9999 because he owes £1.8m to ex-wife. ... It appears the year 9999 was arbitrarily set because it was the highest possible date allowed by the online system."
https://www.theguardian.com/world/2021/dec/28/australian-man...
Following the year 09999, prepend an additional 0.
An episode of kurzgesagt about this topic: https://m.youtube.com/watch?v=czgOWmtGVGs
Unix's time limit is based on the capacity of 32- or 64-bit integers (hardware). For denoting years, we lost nothing because the ancients didn't write dates as 4 character years -- we, and that info, survived adding digits.
I agree with you the year's got to be arbitrary in practice, however I don't understand how your statement answers my concern about using mythology, can you elaborate on that?