Login   Register  
PHP Classes
elePHPant
Icontem

Date Span: Calculate and spell the timespan between two dates

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2006-01-16 (8 years ago) RSS 2.0 feedStarStarStar 54%Total: 1,217 All time: 2,911 This week: 1,434Up
Version License Categories  
date_span 1.0GNU General Public Lice...Time and Date, Text processing
Description Author  

This class can calculate the time span between dates, not just in numbers but also spell it in a more natural was using words like this: "1 year, 6 months and 12 days".

This class is very useful when you need to present to the users how much time have passed since a past event in an easy to understand way.

The class returns the difference of time between two given dates or between a given date and the current system date.

Currently, it can spell the computed time difference in four languages: English, German (thanks to "Jürgen Fehr" and "jo t"), French (thanks to Benoit Dausse) or Spanish, which is the default. The class is designed to easily be extended to support other idioms.

Picture of Victor Hugo Cardenas Varon
Name: Victor Hugo Cardenas ... <contact>
Classes: 1 package by
Country: Colombia Colombia
Age: 31
All time rank: 191411 in Colombia Colombia
Week rank: 1568 Up13 in Colombia Colombia Down

  Files folder image Files  
File Role Description
Plain text file clase_date_span.inc.php Class Class source code
Accessible without login Plain text file example_date_span.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,217All time:2,911
 This week:0This week:1,434Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:-
Examples:79%StarStarStarStar
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:1330