str_to_timestamp()
str_to_timestamp(string $str) : int
Convert a string to a timestamp.
An alias for strtotime
Parameters
| string | $str | The input date/time string |
Returns
int —The unix timestamp
A set of convenience methods to work with dates and times
ts_set_time(int $timestamp, int $hour, int $minutes) : int
Given a unxix timestamp, an hour and minutes value adjust the unix timestamp accordingly.
| int | $timestamp | |
| int | $hour | |
| int | $minutes |
| todo |
|---|
ts_set_time_from_str(int $timestamp, string $str) : int
Create a unix timestamp from a string.
adjust the unix timestamp accordingly.
| int | $timestamp | |
| string | $str |
| todo |
|---|
is_leapyear(int $year) : bool
Test if the given year (or the current year) is a leapyear
| int | $year | Optional year. |
| todo |
|---|
days_in_month(int $month, int $year) : int
Return the days in the given month/year
| int | $month | The specified month, if not specified the current month is used. |
| int | $year | The specified year. If not specified, the current year is used. |
| todo |
|---|
date_at(int $month, int $day, int $year, int $hour, int $minute, int $seconds) : \cge_date
Create a cge_date given specified time values
| int | $month | |
| int | $day | |
| int | $year | |
| int | $hour | |
| int | $minute | |
| int | $seconds |
| todo |
|---|
ts_to_dbformat(int $ts) : string
Convert a timestamp to database format
| int | $ts |
| todo |
|---|
from_locale_str(string $str) : int
Convert a locale specific date/time string to a unix timestamp
| string | $str | The input string |
The unix timestamp.
| todo |
|---|
to_locale_str(int $ts, bool $time_too, string $sep) : string
Convert a unix timestamp to a locale specific format (currently only support US and non US).
| int | $ts | The unix timestamp |
| bool | $time_too | Wether or not to include time in the output string |
| string | $sep | The separator between fields. Default is '/' |
| todo |
|---|