NinjaDateTime Class Reference

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 (0-6).
 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.

Detailed Description

Class NinjaDateTime.

Inherits from PHP stdlib DateTime. Provides a set of methods to make working with downtime dates more convenient.


Constructor & Destructor Documentation

NinjaDateTime::__construct ( date_str  ) 

NinjaDateTime constructor.

Parameters:
$date_str 
Exceptions:
Exception 

Member Function Documentation

NinjaDateTime::get_date (  ) 

Get current date as a string (e.g.

1984-09-26)

Returns:
string
NinjaDateTime::get_datetime (  ) 

Get current full date.

Returns:
string
NinjaDateTime::get_day_of_month (  ) 

Get current day of month.

Returns:
int
NinjaDateTime::get_day_of_week (  ) 

Get current day of week (0-6).

Returns:
int
NinjaDateTime::get_day_start (  ) 

Returns a clone of self, with time set to midnight - to simplify full-day comparison operations.

Returns:
NinjaDateTime
Exceptions:
Exception 
NinjaDateTime::get_last_day_of_month (  ) 

Get last day of current month.

Returns:
int
NinjaDateTime::get_month (  ) 

Get current month.

Returns:
int
NinjaDateTime::get_month_string (  ) 

Get current month string (e.g.

september)

Returns:
string
NinjaDateTime::get_time (  ) 

Get current time as string (e.g.

18:03:25)

Returns:
string
NinjaDateTime::get_week (  ) 

Get current week.

Returns:
int
NinjaDateTime::get_year (  ) 

Get current full year (e.g.

1984)

Returns:
int
NinjaDateTime::is_last_dom (  ) 

Check if current day is the last of month.

Returns:
bool

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

Generated on 4 Oct 2019 for ninja by  doxygen 1.6.1