Software projects, articles and tutorials

Downloads RSS

Vorx Timer

Vorx Timer is a PHP script to calculate how long it has been since a given date in years, months and days. It can string a grammatically correct sentence together, for example "1 year, 3 months and 2 days". This is ideal if you want to run a "stopwatch style" timer on a website over a long period of time. For example it can work out exactly how old someone is by entering their birthday.

Example
Try It
Version Information
Further Information

Example

This is an example using the Vorx Timer (I have made the script output bold). It has been 26 years and 8 months since software development began on the GNU operating system on January 5, 1984.

Try It

The timer is not finished yet. For now you can try it below and report any problems you find with it. You can use a minus value for the year; for example -200 is 200BC.

Year0-2010  
Month  1-12
Day1-31

Please choose a date and click submit.

Version Information

Vorx Timer v0.4 Alpha is the current version (see version procedures)

  • Basic functionality
  • Work out correct grammar
  • Create a form for user input
  • Error handling

TODO for v0.5 Beta

  • Thorough testing; make sure it's always accurate
  • General tidy up of code and review

Accepted feature requests

  • Enter commas for years greater than 1000 (2,500, 1,000,000 etc.)
  • Include a countdown mode

Further Information

If you're just looking for a way to keep track of the years then Vorx Timer is not necessary, just use the following PHP code.

$year="1996"; echo date("Y")-$year; echo ' years ago';

Which will produce the following: 14 years ago.