Date Component
, (*1)
Date component is a set of methods to help with the manipulation of dates., (*2)
Installation
composer require flextype-components/date
Usage
use Flextype\Component\Date\Date;
Get format date, (*3)
echo Date::format($date, 'j.n.Y');
Get number of seconds in a minute, incrementing by a step., (*4)
$seconds = Date::seconds();
Get number of minutes in a hour, incrementing by a step., (*5)
$minutes = Date::minutes();
Get number of hours, incrementing by a step., (*6)
$hours = Date::hours();
Get number of months., (*7)
$months = Date::months();
Get number of days., (*8)
$months = Date::days();
Returns the number of days in the requested month, (*9)
$days = Date::daysInMonth(1);
Get number of years., (*10)
$years = Date::years();
Get current season name, (*11)
echo Date::season();
Get today date, (*12)
echo Date::today();
Get yesterday date, (*13)
echo Date::yesterday();
Get tomorrow date, (*14)
echo Date::tomorrow();
Converts a UNIX timestamp to DOS format., (*15)
$dos = Date::unix2dos($unix);
Converts a DOS timestamp to UNIX format., (*16)
$unix = Date::dos2unix($dos);
Get Time zones, (*17)
$tz = Date::timezones();
License
See LICENSE, (*18)