returns a new Date object given an old one
void find_start_of_week(
)
|
|
moves the date object to the beginning of the week (compared to its current date)
returns the day portion of the date object
returns the amount of days in the month.
returns the day of the week. (before we returned the text name of the day of the week ("Mon", "Tue" etc..))
string get_formatted_date(
)
|
|
returns a date formatted as "d/m/Y"
string get_formatted_time(
)
|
|
returns the time as "h:i A"
returns the hour portion of the date object
returns the minute portion of the date object
returns the month portion of the date object
returns a date in the format needed for inserts by MySQL
retuns the Unix $timestamp of the given date
returns the date of the beginning of the week
returns the year portion of the dat object
void move_forward_n_days(
int
$n
)
|
|
moves the date object forward N days (can be negative to go backwards)
Parameters:
|
int |
$n: |
the amount of days the date should be moved. |
void move_n_weeks_forward(
int
$n
)
|
|
moves the date object forward N weeks (can be negative to go backwards)
Parameters:
|
int |
$n: |
amount of weeks the date should be moved forwards/backwards. |
void move_to_start_of_day(
)
|
|
moves a date object to teh beginning of the day that it currently represents
void move_to_start_of_month(
)
|
|
void move_to_start_of_next_month(
)
|
|
sets this date object to point to teh current date
void set_time(
int
$newhour, int
$newminute, int
$newday, int
$newmonth, int
$newyear
)
|
|
sets the Date object given the hour, minute, day, month, and year
Parameters:
|
int |
$newhour: |
|
|
int |
$newminute: |
|
|
int |
$newday: |
|
|
int |
$newmonth: |
|
|
int |
$newyear: |
|
void set_time_from_sql_time(
mixed
$sqltime
)
|
|
empty method
void set_time_from_string(
mixed
$string_time
)
|
|
empty method.
void set_time_from_unix_time(
int
$unixtime
)
|
|
sets the $datetime of the date object based off a unix time stamp
Parameters:
|
int |
$unixtime: |
a unix timestamp. |
sets the time based on the system offset, then the local offset