PHP Date Difference Primer Tutorial

PHP Date Difference Primer Tutorial

PHP Date Difference Primer Tutorial

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 …

  1. End Datetime (deriving Datetime Difference) … or …
  2. 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.

This entry was posted in eLearning, Event-Driven Programming, Tutorials and tagged , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>