PHP Classes

PHP Date and Time Ago: Spell a given time difference using English words

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 145 All time: 9,022 This week: 184Up
Version License PHP version Categories
php-date-time-ago 1.0.0Custom (specified...5PHP 5, Time and Date
Description Author

This class can spell a given time difference using English words.

It takes a given date and time as a timestamp number value or another format and computes the difference of time between now and the given time.

The class returns a string spelling how much time it passed in English.

Picture of sassi souid
  Performance   Level  
Name: sassi souid <contact>
Classes: 1 package by
Country: Tunisia Tunisia

Details

PHP-time-ago-class

Feature

- php class to convert timestamp in human readable form - calculate execution time of php script - you can add multiple languages - normal date and time

Description

This php class can detect the time difference between now and one old second,minute,hour,day, month or years. It takes the date of one day and computes the number of seconds between that day and now. The class returns one string that spells the difference of time between the dates.

Example:

<?php require('DateTimeAgo.php'); //required class file

		$req=new DateTimeAgo;
         $time='1525697422';
         $lang='english';
		echo $req->__convert($time,$lang);
		?> 

  Files folder image Files  
File Role Description
Files folder imagePhpDateTimeAgo (3 files)
Accessible without login Plain text file LICENSE Lic. LICENSE

  Files folder image Files  /  PhpDateTimeAgo  
File Role Description
  Plain text file DateTimeAgo.php Class php class to convert timestamp in human readable form
  Accessible without login Plain text file example.php Example how to use
  Accessible without login Plain text file readme.md Doc. documentation

 Version Control Unique User Downloads Download Rankings  
 0%
Total:145
This week:0
All time:9,022
This week:184Up
For more information send a message to info at phpclasses dot org.