Public Member Functions | |
end_of_week ($week, $year=NULL, $format= 'Y-m-d') | |
Finds end of week and return it in given format. |
Static Public Member Functions | |
static | unix2dos ($timestamp=FALSE) |
Converts a UNIX timestamp to DOS format. | |
static | dos2unix ($timestamp=FALSE) |
Converts a DOS timestamp to UNIX format. | |
static | offset ($remote, $local=TRUE) |
Returns the offset (in seconds) between two time zones. | |
static | seconds ($step=1, $start=0, $end=60) |
Number of seconds in a minute, incrementing by a step. | |
static | minutes ($step=5) |
Number of minutes in an hour, incrementing by a step. | |
static | hours ($step=1, $long=FALSE, $start=NULL) |
Number of hours in a day. | |
static | ampm ($hour) |
Returns AM or PM, based on a given hour. | |
static | adjust ($hour, $ampm) |
Adjusts a non-24-hour number into a 24-hour number. | |
static | days ($month, $year=FALSE) |
Number of days in month. | |
static | days_of_month ($month, $year=FALSE) |
Returns count of days of given month and year (optional) Similar to function days, but return only count (not array) | |
static | months_array ($translate=TRUE) |
Returns array of months. | |
static | months () |
Number of months in a year. | |
static | years ($start=FALSE, $end=FALSE) |
Returns an array of years between a starting and ending year. | |
static | timespan ($time1, $time2=FALSE, $output= 'years, months, weeks, days, hours, minutes, seconds') |
Returns time difference between two timestamps, in human readable format. | |
static | round_month ($day=1, $month=1, $year=1970, $on_last_day=false) |
Round date to whole months, if count of days is more or equal to 15, increments count of months. | |
static | month ($date= '0000-00-00') |
Function is similar to round_month, except it gets date in date format. | |
static | get_closses_deduct_date_to ($date) |
Function returns date of new deduct from the given date. | |
static | get_next_deduct_date_to ($date) |
Function returns next date of deduct from the given date. | |
static | get_deduct_day_to ($month, $year) |
Calculate deduct day of given month. | |
static | diff_month ($date_a= '0000-00-00', $date_b= '0000-00-00') |
Function to finding difference between 2 dates. | |
static | create ($day, $month, $year, $hour=0, $minute=0, $second=0, $datetime=FALSE) |
static | pretty ($datetime) |
Function to return date in pretty format from datetime. | |
static | pretty_time ($datetime) |
static | pretty_month ($datetime= '0000-00-00') |
static | from_interval ($interval=0, $unit= 'hours') |
static | mail_time ($datetime) |
Function to get time for mail (Google style) | |
static | diff ($date1, $date2) |
Returns diff between 2 datetimes. | |
static | interval ($date1, $date2= '0000-00-00 00:00:00') |
Returns interval (in array) between 2 datetimes. | |
static | day_diff ($date1, $date2= '0000-00-00 00:00:00') |
static | hour_diff ($date1, $date2= '0000-00-00 00:00:00') |
static | minute_diff ($date1, $date2= '0000-00-00 00:00:00') |
static | counter ($timestamp) |
Returns counter for timestamp. | |
static | start_of_week ($week, $year=NULL, $format= 'Y-m-d') |
Finds start of week and return it in given format. | |
static | decrease_day ($year, $month, $day) |
Decreases given date by one day. |
Static Public Attributes | |
static | $months |
|
static |
Adjusts a non-24-hour number into a 24-hour number.
integer | hour to adjust |
string | AM or PM |
|
static |
Returns AM or PM, based on a given hour.
integer | number of the hour |
|
static |
Returns counter for timestamp.
integer | $timestamp |
|
static |
$day | |
$month | |
$year |
|
static |
string | $datetime |
|
static |
Number of days in month.
integer | number of month |
integer | number of year to check month, defaults to the current year |
|
static |
Returns count of days of given month and year (optional) Similar to function days, but return only count (not array)
numeric | $month | |
numeric | $year |
|
static |
Decreases given date by one day.
Used in Fio automatic import.
<type> | $year |
<type> | $month |
<type> | $day |
|
static |
Returns diff between 2 datetimes.
string | $date1 | |
string | $date2 |
|
static |
Function to finding difference between 2 dates.
$date_a | date in format 'YYYY-mm-dd' |
$date_b | date in format 'YYYY-mm-dd' |
|
static |
Converts a DOS timestamp to UNIX format.
integer | DOS timestamp |
date::end_of_week | ( | $week, | |
$year = NULL , |
|||
$format = 'Y-m-d' |
|||
) |
Finds end of week and return it in given format.
type | $week | |
type | $year | |
type | $format |
|
static |
Function returns date of new deduct from the given date.
If given day is before and including deduct day, then deduct day of current month is returned. If given day is after deduct day, then deduct day of next month is returned.
string | $date |
|
static |
Calculate deduct day of given month.
integer | $month | |
integer | $year |
|
static |
Function returns next date of deduct from the given date.
Next means that next mmonth deduct date is calculated.
string | $date | input deduct date |
|
static |
string | $datetime |
|
static |
Number of hours in a day.
integer | amount to increment each step by |
boolean | use 24-hour time |
integer | the hour to start at |
|
static |
Returns interval (in array) between 2 datetimes.
string | $date1 | |
string | $date2 |
|
static |
Function to get time for mail (Google style)
string | $datetime |
|
static |
string | $datetime |
|
static |
Number of minutes in an hour, incrementing by a step.
integer | amount to increment each step by, 1 to 30 |
|
static |
Function is similar to round_month, except it gets date in date format.
date |
|
static |
Number of months in a year.
|
static |
Returns array of months.
bool | $translate | Translate months names |
|
static |
Returns the offset (in seconds) between two time zones.
string | timezone that to find the offset of |
string|boolean | timezone used as the baseline |
|
static |
Function to return date in pretty format from datetime.
string | $datetime |
|
static |
Round date to whole months, if count of days is more or equal to 15, increments count of months.
@param integer $day
integer | $month | |
integer | $year |
|
static |
Number of seconds in a minute, incrementing by a step.
integer | amount to increment each step by, 1 to 30 |
integer | start value |
integer | end value |
|
static |
Finds start of week and return it in given format.
type | $week | |
type | $year | |
type | $format |
|
static |
Returns time difference between two timestamps, in human readable format.
integer | timestamp |
integer | timestamp, defaults to the current time |
string | formatting string |
|
static |
Converts a UNIX timestamp to DOS format.
integer | UNIX timestamp |
|
static |
Returns an array of years between a starting and ending year.
Uses the current year +/- 5 as the max/min.
integer | starting year |
integer | ending year |
|
static |