date Class Reference

Help with formatting datestamps. More...

Static Public Member Functions

static duration ($start_time, $end_time)
 Outputs a nicely formatted version of "2003-03-12 21:14:34 to 2003-03-12 21:14:35<br> Duration: 0d 0h 0m 1s".
static abbr_day_names ()
 Return array of abbrivated weekday names NOTE: Are you Really Sure you need this?
static abbr_month_names ()
 Return array of abbrivated month names NOTE: Are you Really Sure you need this?
static day_names ()
 Return array of full weekday names NOTE: Are you Really Sure you need this?
static month_names ()
 Return array of full month names NOTE: Are you Really Sure you need this?
static utc_offset ($timezone=null)
 Offset from UTC.
static date_format ($nagios_format_name=false)
 Format a Nagios date format string to the PHP equivalent.
static timestamp_format ($format_str=false, $date_str=false)
 Convert a date format string back to a timestamp.

Detailed Description

Help with formatting datestamps.


Member Function Documentation

static date::date_format ( nagios_format_name = false  )  [static]

Format a Nagios date format string to the PHP equivalent.

NOTE!!! cal::get_calendar_format has the same thing, without time

static date::duration ( start_time,
end_time 
) [static]

Outputs a nicely formatted version of "2003-03-12 21:14:34 to 2003-03-12 21:14:35<br> Duration: 0d 0h 0m 1s".

Parameters:
$start_time int timestamp
$end_time int timestamp
static date::timestamp_format ( format_str = false,
date_str = false 
) [static]

Convert a date format string back to a timestamp.

Returns:
false|int
static date::utc_offset ( timezone = null  )  [static]

Offset from UTC.

Parameters:
$timezone string = null, defaults to php.ini's value
Returns:
int seconds

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1