Hey guys, I was on a Facebook page where people were asking how to convert/create Imperial Dates, after reading how to do it, I figured it was easy enough to turn into a script and put it here for anyone to use!
Just select the source, hour, Day, Month, and type a Year and hit Go!
Source/Check Number:
Hour:
Day:
Month:
Year:
If you have any suggestions or comments, leave them below or let me know via email. me (at) kingsley-muir.com
19 thoughts on “40k – Imperial Date Calculator”
Thanks so much!! Using this to put my newborn’s birth date on one of my imperial knights!
I have discovered a flaw in either the calculation used. Any time/date after 3PM on December 30th returns a work-cycle greater than 1000. It should cycle back to 001 and iterate the year at that point. Granted, this means the Imperial Year starts 33 hours before our current year, but that is what the calculator says.
Just to note a bug in the calculator, it is not accounting for leap years.
For example, today 12 of November is the 317th day of the year as 2020 is a leap year. The calculator however is treating it as day 316, which would be accurate for non-leap years.
Just remember when accounting for it, that any potential leap year falling on a century mark has to also be divisible by 400 to be a leap year.
The 40k calendar doesn’t account for leap years at all. – I’ve made this calendar account for leap years using our current understanding of leap years.
Therefore the Makr constant was also wrong, as it was attempting to work out the 1000 divisions of 365 days. There is another one to account for leap years also.
This is a great tool! My wife is going to be so happy now I can re-home that rot-smelling floaty skull that I currently have to use to transcribe the Imperial time stamp for official communicae.
Hi Kingsley I think there is a slight issue with your date for instance the date should go from 001 to 000 but if I put 1st of Jan 2005 and first hour for instance I get the date 000, while if I put the date as the last hour of dec 31 then I get 997 here I should get 000. As you are using hours the first hour is in essence 0x1000/8760 rounded down plus 1 or 0 or 001 while the last hour should be 8759×1000/8760+1 or 1000 or 000. I didnt check leak years there you have to have a slightly different calculation.
I might be guessing that “lower” dates don’t quite 100% work, as 40k is supposed to be year 40,000 so they may not have had the math work correctly for “a really really long time ago” dates.
Thanks so much!! Using this to put my newborn’s birth date on one of my imperial knights!
Grate calculator
I love it
I apparently was born 2926 work-cycles before M03.
I have discovered a flaw in either the calculation used. Any time/date after 3PM on December 30th returns a work-cycle greater than 1000. It should cycle back to 001 and iterate the year at that point. Granted, this means the Imperial Year starts 33 hours before our current year, but that is what the calculator says.
I’ll look into it! Can’t have it wrong. That would be shit lol
Looks like an errant +1 was causing the issue, should be fine now!
Just to note a bug in the calculator, it is not accounting for leap years.
For example, today 12 of November is the 317th day of the year as 2020 is a leap year. The calculator however is treating it as day 316, which would be accurate for non-leap years.
Just remember when accounting for it, that any potential leap year falling on a century mark has to also be divisible by 400 to be a leap year.
All fixed up now!
There is still a bug with determining the date at the end of the year.
Source/Check Number:
Terra
Hour:
9pm / 2100h
Day:
31
Month:
December
Year:
2020
Calculate
The Imperial Date is: 01001020.M03
Ok I’ve found the problem.
The 40k calendar doesn’t account for leap years at all. – I’ve made this calendar account for leap years using our current understanding of leap years.
Therefore the Makr constant was also wrong, as it was attempting to work out the 1000 divisions of 365 days. There is another one to account for leap years also.
I should be needing this for now. Thanks!
I would love if there were a back calculator, to return Imperial dates to “Current” dates.
That sounds like hell. I’m in!
This does not use the 40k year fraction
Unsure what you mean?
This is a great tool! My wife is going to be so happy now I can re-home that rot-smelling floaty skull that I currently have to use to transcribe the Imperial time stamp for official communicae.
Hi Kingsley I think there is a slight issue with your date for instance the date should go from 001 to 000 but if I put 1st of Jan 2005 and first hour for instance I get the date 000, while if I put the date as the last hour of dec 31 then I get 997 here I should get 000. As you are using hours the first hour is in essence 0x1000/8760 rounded down plus 1 or 0 or 001 while the last hour should be 8759×1000/8760+1 or 1000 or 000. I didnt check leak years there you have to have a slightly different calculation.
I will have to look into it! Thanks for that.
I might be guessing that “lower” dates don’t quite 100% work, as 40k is supposed to be year 40,000 so they may not have had the math work correctly for “a really really long time ago” dates.