Documentation
Date
The date helper.
Methods
format(integer $date, [string $format = ''])
Get format date.
echo Date::format($date, 'j.n.Y');
seconds([integer $step = 1, [integer $start = 0, [integer $end = 60]]])
Get number of seconds in a minute, incrementing by a step.
$seconds = Date::seconds();
minutes([integer $step = 5, [integer $start = 0, [integer $end = 60]]])
Get number of minutes in a hour, incrementing by a step.
$minutes = Date::minutes();
hours([integer$step = 1, [integer $long = false, [integer $start = null]]])
Get number of hours, incrementing by a step.
$hours = Date::hours();
months()
Get number of months.
$months = Date::months();
days()
Get number of days.
$days = Date::days();
daysInMonth(integer $month, [integer $year = null])
Returns the number of days in the requested month
$days = daysInMonth(12, 2012);
years([integer $start = 1980, [integer $end = 2024])
Get number of years.
$years = Date::years();
season()
Get current season name.
echo Date::season();
today()
Get today date.
echo Date::today();
yesterday([string $format = ''])
Get yesterday date.
echo Date::yesterday();
tomorrow([string $format = ''])
Get tomorrow date.
echo Date::tomorrow();
unix2dos([integer $timestamp = 0])
Converts a UNIX timestamp to DOS format.
$dos = Date::unix2dos($unix);
dos2unix(integer $timestamp)
Converts a DOS timestamp to UNIX format.
$unix = Date::dos2unix($dos);
timezones()
Get Time zones.
$timezones = timezones();