pluf/src/Pluf/Date.php File Reference


Classes

class  Pluf_Date

Functions

 Pluf_Date_Compare ($date1, $date2=null)
 Pluf_Date_Easy ($date, $ref=null, $blocks=2, $notime='now', $show=true)

Function Documentation

Pluf_Date_Compare ( date1,
date2 = null 
)

Set of functions to manage dates. Compare two date and returns the number of seconds between the first and the second. If only the date is given without time, the end of the day is used (23:59:59).

Parameters:
string Date to compare for ex: '2006-09-17 18:42:00'
string Second date to compare if null use now (null)
Returns:
int Number of seconds between the two dates. Negative value if the second date is before the first.

Pluf_Date_Easy ( date,
ref = null,
blocks = 2,
notime = 'now',
show = true 
)

Display a date in the format: X days Y hours ago X hours Y minutes ago X hours Y minutes left

"resolution" is year, month, day, hour, minute.

If not time is given, only the day, the end of the day is used: 23:59:59.

Parameters:
string Date to compare with ex: '2006-09-17 18:42:00'
string Reference date to compare with by default now (null)
int Maximum number of elements to show (2)
string If no delay between the two dates display ('now')
bool Show ago/left suffix
Returns:
string Formatted date


Generated on Wed Feb 3 15:44:51 2010 for Pluf by  doxygen