Quote:
Originally Posted by Sethomas
This is what I get for having gone more than 48 hours without logging onto I-Mockery.
Dude, this is fucking awesome. I will say that months ago I manually calculated these dates for a handful of people and your engine aligned with my dates exactly, so we can give a mutual high-five.
One thing that I haven't tested but I wonder about: does it work beyond 28 February 2100 without a 1-day offset? The reason I ask is that most people have no idea how the Gregorian calendar works, and most engines probably assume that 2100 will have a leap day when it actually does not.
So, while I acknowledge that this is a gift to all of humanity, thank you.
|
And I missed all the happenings myself since I never log in regularly. What's it been, nearly two weeks for me? Why am I asking?
First off, I'm glad you found use out of it. I figured you already did the math by now and you wouldn't need it. Then I still decided to make it so that non-10,000 days could be found. Just in case, be prepared, etc.
Quote:
Originally Posted by AChimp
If he's using the functions that I think he's using, then the answer to that is probably yes.
|
The only date functions it uses are
checkdate,
gmmktime, and
date. gmmktime limits the output date to a range that the server the script is on can handle. Mashing values into what I made until getting the last date before going back to 1969 gave Monday, January 18th, 2038 as the latest date. That is probably no notable date in the calendar system. Although I hate to say it,
theoretically the script would work forever, which is stupid because theory doesn't stop the program in 2038.
Don't be too impressed; I did it the hack way. The calculation itself is one line of code. The rest of the code is a simple input check and then the output. It's 22 lines total, excluding the HTML surrounding the output. If I knew every detail of the calendar system then a more extended version could be started which could probably work with later dates. I am not sure whether to bother with that. It sounds initially nasty.
I'm glad the person whose name is in the thread title actually saw it and responded. Sorry for my slowness. By now my hand is nearly in high five position.
I got to shave again now before work. This time probably won't result in a web script based on a stale forum post though.