Class NinjaDateTime. More...
Public Member Functions | |
__construct ($date_str) | |
NinjaDateTime constructor. | |
get_day_start () | |
Returns a clone of self, with time set to midnight - to simplify full-day comparison operations. | |
get_day_of_month () | |
Get current day of month. | |
get_last_day_of_month () | |
Get last day of current month. | |
get_day_of_week () | |
Get current day of week (1-7). | |
get_week () | |
Get current week. | |
get_month () | |
Get current month. | |
get_month_string () | |
Get current month string (e.g. | |
get_year () | |
Get current full year (e.g. | |
is_last_dom () | |
Check if current day is the last of month. | |
get_date () | |
Get current date as a string (e.g. | |
get_time () | |
Get current time as string (e.g. | |
get_datetime () | |
Get current full date. |
Class NinjaDateTime.
Inherits from PHP stdlib DateTime. Provides a set of methods to make working with downtime dates more convenient.
NinjaDateTime::__construct | ( | $ | date_str | ) |
NinjaDateTime::get_date | ( | ) |
NinjaDateTime::get_datetime | ( | ) |
Get current full date.
NinjaDateTime::get_day_of_month | ( | ) |
Get current day of month.
NinjaDateTime::get_day_of_week | ( | ) |
Get current day of week (1-7).
NinjaDateTime::get_day_start | ( | ) |
Returns a clone of self, with time set to midnight - to simplify full-day comparison operations.
Exception |
NinjaDateTime::get_last_day_of_month | ( | ) |
Get last day of current month.
NinjaDateTime::get_month | ( | ) |
Get current month.
NinjaDateTime::get_month_string | ( | ) |
Get current month string (e.g.
september)
NinjaDateTime::get_time | ( | ) |
NinjaDateTime::get_week | ( | ) |
Get current week.
NinjaDateTime::get_year | ( | ) |
Get current full year (e.g.
1984)
NinjaDateTime::is_last_dom | ( | ) |
Check if current day is the last of month.