When you think of Timezones, do you think of datetime differences?
Okay, well some people must … surely? Anyway, we do. We wonder, thinking about other people in the wooooorrrrllllddd, what time is it for them? Even, what day is it for them, the International Dateline blowing my tiny little mooooiiinnnnddd!
And so we wrote some PHP code to help with datetime differences whether they be related to Timezones or not. We designed a PHP web application that always starts with a defined “Start Datetime” and then allows either …
- End Datetime (deriving Datetime Difference) … or …
- Datetime Difference (deriving End Datetime)
… modes of use. Simple, huh?! And yet, even here, with that first scenario, a pretty fundamental thing was learnt, by yours truly, undertaking this exercise. A Datetime Difference result is only useful to the “Day” point because any one “Month” can be a different length of time to another, and so, becomes difficult to express in terms of a “Month Difference”.
Feel free to try our “proof of concept” PHP web application.
If this was interesting you may be interested in this too.