$legend_english
$legend_english :
Provides text filters for date objects
This class should be cleaned up quite a bit, and it needs to be made pluggable so that it can be used by languages other than English. But, I think right now it is good enough to be released because it falls into "special sauce" rather than necessary functionality.
fuzzy_ago(integer $seconds, string $dictionary = 'english') : string
Converts a time diff into a human readable approximation
integer | $seconds | a date represented in seconds since the unix epoch |
string | $dictionary | what language to use (currently unsupported and ignored) |
a fuzzy time
seconds_to_human_time(integer $seconds, boolean $words = false, string $type = 'string') : string|array
Converts seconds to a human readable string or an array
integer | $seconds | a number of seconds |
boolean | $words | whether or not the numbers should be numerals or words |
string | $type | either 'string' or 'array' |
a string or an array, depending on $type
ago(integer $seconds, boolean $words = false) : string
Explains how long ago something happened.
..
This also works with the future.
integer | $seconds | a number of seconds |
boolean | $words | whether or not to return numerals or the word-equivalent |
a string indicating a time in words