Date
class Date
$XF->lib->date->ph_check('DE', mktime(0,0,0,8,2,2006)); returns true or flase if it is a public holiday $XF->lib->date->ph_getCaption();returns the name of the with ph_check asked holiday $XF->lib->date->ph_pregenerateHolidays(2005,2006); pregenerates all Holidays from 2005 to 2006 and saves it in db
Properties
| $UTC_TO_LOCAL | |||
| $UTC_TO_LOCAL_HOURS | |||
| $NOW_LOCAL | |||
| $NOW_LOCAL_SQL | |||
| $NOW_UTC |
Methods
No description
Wrapper for rrule dependency Check https://github.com/rlanvin/php-rrule/wiki/RRule for more details
Return age in years for this timestamp
Get Date Range
No description
No description
Return Easter TS
No description
No description
Get German Holidays
No description
No description
No description
Pass a timespan id (use get_verbal_timespans()) and returns an array with start and end timestamp
Translates a given time string to the corresponding timestamp
Returns all available verbal timespans
No description
Determines the date format on basis of its format
Converts a LOCAL timestamp to a UTC timestamp
Query Time Server
Converts a time in seconds to its corresponding hour format
Set Time Vars
Converts a LOCAL SQL Time Format to a UTC timestamp
Converts a SQL Time Format to seconds (e.g. '10:00:00' to 606010)
Converts a UTC SQL Time Format to a UTC timestamp
Converts a UTC timestamp to a LOCAL timestamp
No description
No description
Details
at line 861
array
evaluateRRule(string $rrule)
No description
at line 884
array
evaluate_rrule(string $rrule)
deprecated
deprecated
No description
at line 808
array
extrapolate_date_by_rrule(int|string|DateTime $dtstart, string|array $rrule, array $options = array())
Wrapper for rrule dependency Check https://github.com/rlanvin/php-rrule/wiki/RRule for more details
Please note that the old version of this function was using different/invalid rrule namings and is now using RFC compliant keys
at line 115
int
get_age(int $timestamp)
Return age in years for this timestamp
at line 1122
string[]
get_date_range(string $start_date, string $end_date, string $returnFormat = "Y-m-d")
Get Date Range
at line 105
int
get_day_end(int $timestamp)
No description
at line 96
int
get_day_start(int $timestamp)
No description
at line 971
int
get_easter(int $year)
Return Easter TS
at line 87
int
get_first_day_of_month(int $timestamp)
No description
at line 127
int
get_first_day_of_week(int $timestamp, string $first_day_of_week = 'monday')
No description
at line 984
array
get_german_holidays(int $year, string $state = null)
Get German Holidays
at line 164
int
get_last_day_of_month(int $timestamp)
No description
at line 145
int
get_last_day_of_week(int $timestamp, string $last_day_of_week = 'sunday')
No description
at line 72
array
get_month_names(bool $shift_index = false)
No description
at line 211
array
get_timespan_to_timestamp(string $verbal_timespan)
Pass a timespan id (use get_verbal_timespans()) and returns an array with start and end timestamp
at line 584
false|int
get_timestamp_from_datestring(string $arg, int $datetype = null, bool $utc = false)
Translates a given time string to the corresponding timestamp
at line 192
array
get_verbal_timespans()
Returns all available verbal timespans
at line 56
array
get_weekday_names(bool $shift_index = false, bool $fullTextRepresentation = true)
No description
at line 516
guess_date_format($date)
Determines the date format on basis of its format
at line 174
int
local_to_utc($timestamp_local)
Converts a LOCAL timestamp to a UTC timestamp
at line 1145
int
query_timeserver(string $server = 'pool.ntp.org')
Query Time Server
at line 509
string
seconds_to_hours($seconds, $format = 'H:i')
Converts a time in seconds to its corresponding hour format
at line 39
set_time_constants()
Set Time Vars
at line 463
int
sqltime_local_to_timestamp_utc($sqltime, $timestamp_utc = NOW_UTC)
Converts a LOCAL SQL Time Format to a UTC timestamp
at line 451
int
sqltime_to_seconds($sqltime)
Converts a SQL Time Format to seconds (e.g. '10:00:00' to 606010)
at line 486
int
sqltime_utc_to_timestamp_utc($sqltime, $timestamp_utc = NOW_UTC)
Converts a UTC SQL Time Format to a UTC timestamp
at line 184
int
utc_to_local($timestamp_utc)
Converts a UTC timestamp to a LOCAL timestamp
at line 302
verbose_datediff($to_timestamp, $from_timestamp = NOW_UTC, $force_absolute_return = true, $force_output_days = false)
No description
at line 249
string
verbose_dayscount(int $numberofdays, bool $force_absolute_return = true)
No description