Download the PHP package pear/date_humandiff without Composer
On this page you can find all versions of the php package pear/date_humandiff. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download pear/date_humandiff
More information about pear/date_humandiff
Files in pear/date_humandiff
Download pear/date_humandiff
More information about pear/date_humandiff
Files in pear/date_humandiff
Vendor pear
Package date_humandiff
Short Description Generate textual time differences that are easily understandable by humans.
License LGPL
Package date_humandiff
Short Description Generate textual time differences that are easily understandable by humans.
License LGPL
Please rate this library. Is it a good library?
Informations about the package date_humandiff
Date_HumanDiff
Generate textual time differences that are easily understandable by humans.
The class supports minutes, hours, days, weeks, months and years.
Examples:
- 5 seconds ago -> `just now`
- 65 seconds ago -> `a minute ago`
- 120 seconds ago -> `2 minutes ago`
- `a week ago`
- `3 weeks ago`
- `a month ago`
- `8 months ago`
- `a year ago`
- `5 years ago`
Usage
Supported languages
- German
- English
- Greek
- Persian
- Russian
Use a language with setLocale()
:
$dh = new Date_HumanDiff();
$dh->setLocale('de');
echo $dh->get(time() - 60 * 5) . "\n"; //shows "vor 5 Minuten"
Other libraries
https://github.com/azer/relative-date/blob/master/lib/relative-date.js Javascript; library that's been used as base for Date_HumanDiff https://github.com/rmm5t/jquery-timeago Javascript; with localization options http://pypi.python.org/pypi/py-pretty Python
All versions of date_humandiff with dependencies
PHP Build Version
Package Version
Requires
pear/pear_exception Version
*
The package pear/date_humandiff contains the following files
Loading the files please wait ....