method buildDatetime [line 126]
datetime buildDatetime(
year
$year, month
$month, day
$day, hour
$hour, minute
$minute, second
$second, [format
$format = DATEFORMAT_FIXED])
|
|
Build a datetime string from the supplied fields
Tags:
Parameters:
method formatDatetime [line 98]
datetime formatDatetime(
[datetime
$datetime = null], [format
$format = DATEFORMAT_FIXED])
|
|
Reformat a given datetime according to the specified format
Tags:
Parameters:
method getDateofKW [line 423]
unixtimestamp getDateofKW(
day
$day, kw
$kw, year
$year, [flag
$flag = 's'])
|
|
Calculate day-x of KW in a YEAR
Tags:
Parameters:
method getDatetime [line 35]
datetime getDatetime(
[time
$time = ''], [format
$format = DATEFORMAT_FIXED])
|
|
Return a formatted datetime for the given timestamp (or for now)
Tags:
Parameters:
method getDatetimeDiff [line 347]
array getDatetimeDiff(
date1
$date1, date2
$date2)
|
|
Return an structured array holding the differences between 2 dates.
The returned array will be structured as follows:
Array (
[d] => _numeric_day_value_
[h] => _numeric_hour_value_
[m] => _numeric_minute_value_
[s] => _numeric_second_value_ )
Tags:
Parameters:
method getDatetimeDiff_AsField [line 381]
float getDatetimeDiff_AsField(
date1
$date1, date2
$date2, field
$field)
|
|
Return an field holding the differences between 2 dates expressed in units of the field requested
Since the date fields can change depending on the date format, the following convention is used when referring to date fields:
Field 1 -> Year
Field 2 -> Month
Field 3 -> Day
Field 4 -> Hour
Field 5 -> Minute
Field 6 -> Second
Tags:
Parameters:
method getDatetime_Date [line 243]
string getDatetime_Date(
[datetime
$datetime = ''], [format
$format = DATEFORMAT_FIXED])
|
|
Return the date portion of a datetime timestamp
Tags:
Parameters:
method getDatetime_Field [line 305]
string getDatetime_Field(
datetime
$datetime, field
$field)
|
|
Return the requested field from the supplied date
Since the date fields can change depending on the date format, the following convention is used when referring to date fields:
Field 1 -> Year
Field 2 -> Month
Field 3 -> Day
Field 4 -> Hour
Field 5 -> Minute
Field 6 -> Second
Tags:
Parameters:
method getDatetime_NextDay [line 144]
datetime getDatetime_NextDay(
[days
$num = 1], [format
$format = DATEFORMAT_FIXED], [hour
$year = null], [minute
$month = null], [second
$day = null], [
$hour = null], [
$minute = null], [
$second = null])
|
|
Return a formatted datetime at the end of the business day n days from now
Tags:
Parameters:
method getDatetime_NextMonth [line 197]
datetime getDatetime_NextMonth(
[num
$num = 1], [format
$format = DATEFORMAT_FIXED], [year
$year = null], [month
$month = null], [day
$day = null], [hour
$hour = null], [minute
$minute = null], [second
$second = null])
|
|
Return a formatted datetime at the end of the business day n months from now
Tags:
Parameters:
method getDatetime_NextWeek [line 170]
datetime getDatetime_NextWeek(
[num
$num = 1], [format
$format = DATEFORMAT_FIXED], [year
$year = null], [month
$month = null], [day
$day = null], [hour
$hour = null], [minute
$minute = null], [second
$second = null])
|
|
Return a formatted datetime at the end of the business day n week from now
Tags:
Parameters:
method getDatetime_NextYear [line 223]
datetime getDatetime_NextYear(
[num
$num = 1], [format
$format = DATEFORMAT_FIXED], [year
$year = null], [month
$month = null], [day
$day = null], [hour
$hour = null], [minute
$minute = null], [second
$second = null])
|
|
Return a formatted datetime at the end of the business day n years from now
Tags:
Parameters:
method getDatetime_Time [line 269]
string getDatetime_Time(
[datetime
$datetime = ''], [format
$format = DATEFORMAT_FIXED])
|
|
Return the time portion of a datetime timestamp
Tags:
Parameters:
method getDaysInMonth [line 457]
integer getDaysInMonth(
month
$month, year
$year)
|
|
Return a the number of days in the given month/year
Tags:
Parameters:
method getMonthDates [line 515]
integer getMonthDates(
month
$month, year
$year)
|
|
Return an array of dates for the given month
Tags:
Parameters:
method getWeekdaysInMonth [line 492]
integer getWeekdaysInMonth(
month
$month, year
$year)
|
|
Return an array of weekdays for the given month
Tags:
Parameters:
method makeTimestamp [line 619]
int makeTimestamp(
[int
$string = ''])
|
|
create a unix timestamp from either a unix timestamp (sic!), a MySQL timestamp or a string. This code is taken from smarty_make_timestamp.php, credits go to Monte Ohrt <monte at ohrt dot com>
We use a copy of the code here due to performance reasons.
Tags:
Parameters:
method parseUIDate [line 538]
date parseUIDate(
text
$text)
|
|
Parses a user interface date string (excluding time) into a timestamp
Currently only the format YYYY-MM-DD is supported, but future versions will be able to parse more diverse formats.
Tags:
Parameters:
method parseUIDateTime [line 569]
date parseUIDateTime(
text
$text)
|
|
Parses a user interface date+time string into a timestamp
Currently only the format YYYY-MM-DD HH:MM is supported, but future versions will be able to parse more diverse formats.
Tags:
Parameters: