strtotime() Validator

This tool is a quick way to put in a sample of your data and make sure that PHP is going to interpret your input correctly without writing any script. Enter the sample date and hit the button, then it'll do the conversion for you. If the returned date matches what you entered, then you're good to go with that format.

One final note: all times are US Central, much like me and the server. If you're in a different time zone, adjust accordingly.

Description

The strtotime() function can sometimes be finicky, which is understandable given the complexity of what it's doing. The fact that this works at all, let alone as well as it does, is a testament to the folks who maintain PHP.

I do find it funny what it chooses to parse sometimes, though. I can type in +2 days and it'll work just fine, but 2 days from today is apparently the Unix Epoch.

    

©2024 Larry Swank, unless someone else owns it. Then it's theirs, obviously.

And I can hear the song of the Creator
Singing over creation