[datetime] element index

Package indexes

All elements
a b d f g i m n p r s t y
a
top
Method add_timeslot
schedule::add_timeslot() in datetime-defs.php
Add timeslot. The start and end parameters can either be Unix timestamps, or string datetime specifiers.
b
top
Constant BACKWARDS_DATE_ONLY
BACKWARDS_DATE_ONLY in datetime-defs.php
Example: 1999/12/31
d
top
Page datetime-defs.php
datetime-defs.php in datetime-defs.php
Function datetime_to_displaydate
datetime_to_displaydate() in datetime-defs.php
Conversion: datetime to descriptive Convert a database-compatible datetime string into a descriptive date/time format for the user display, using the given displayformat string.
Function datetime_to_timestamp
datetime_to_timestamp() in datetime-defs.php
Conversion: datetime to descriptive Returns a timestamp from a database-formatted datetime string.
Function dayNameNow
dayNameNow() in datetime-defs.php
Day of Week now as string Returns the day name (eg. "Monday") as it is now.
Function dayNow
dayNow() in datetime-defs.php
Day of Month now as integer Returns the day of the month (1-31) as it is now.
Function daysinmonth
daysinmonth() in datetime-defs.php
Return the days in a month Given an integer month number 1-12, and an optional year (defaults to current) this function returns the number of days in the given month.
Constant DAY_AND_DATE
DAY_AND_DATE in datetime-defs.php
Example: Friday, 20th July 2001
Function displaydate_to_date
displaydate_to_date() in datetime-defs.php
Conversion: descriptive to datetime without the time element.
Function displaydate_to_datetime
displaydate_to_datetime() in datetime-defs.php
Conversion: descriptive to datetime.
Function displaydate_to_timestamp
displaydate_to_timestamp() in datetime-defs.php
Conversion: descriptive to timestamp.
Constant DISPLAY_DATE_FORMAT
DISPLAY_DATE_FORMAT in datetime-defs.php
Example: 31/12/1999 23:59
Constant DISPLAY_DATE_ONLY
DISPLAY_DATE_ONLY in datetime-defs.php
Example: 31/12/1999
Constant DISPLAY_TIMESTAMP_FORMAT
DISPLAY_TIMESTAMP_FORMAT in datetime-defs.php
Example: 31/12/1999 23:59:59
Constant DISPLAY_TIME_ONLY
DISPLAY_TIME_ONLY in datetime-defs.php
Example: 23:59
Constant DOW_HHMM
DOW_HHMM in datetime-defs.php
Example: Sun 23:59
f
top
Method formatted_microsecs
Return the micro-seconds on the clock to 2 decimal places.
Method formatted_millisecs
Return the milli-seconds on the clock to 2 decimal places.
Method formatted_secs
Return the seconds on the clock to 2 decimal places.
Method formatted_time
Return the time on the clock in a nice 'human' format. This is in the form of a string, viz: '14d 2h 12m 13s'.
Function format_DMY
format_DMY() in datetime-defs.php
Format date as DD/MM/YYYY
g
top
Function get_DMY
get_DMY() in datetime-defs.php
Get date components of datetime string Returns the date components of a formatted date string.
Function get_HMS
get_HMS() in datetime-defs.php
Get time components of datetime string Extract the HH:MM[:SS] from datetime string Returns the time components of a formatted date string.
i
top
Method inslot
timeslot::inslot() in datetime-defs.php
Function isLeapYear
isLeapYear() in datetime-defs.php
Check if year is a leap year.
Constant ISO_8601
ISO_8601 in datetime-defs.php
ISO 8601 Example: YYYYMMDDTHHMMSS-HHMM
Constant ISO_DATABASE_FORMAT
ISO_DATABASE_FORMAT in datetime-defs.php
Example: 1999-07-17 23:59:59
m
top
Method microsecs
microtimer::microsecs() in timer-defs.php
Returns the micro-seconds on the clock.
Class microtimer
microtimer in timer-defs.php
The microtimer class A generic microtimer. This timer allows elapsed times to be measured down to microseconds in theory, although depending on how 'real-time' the OS is, there may well be limitations.
Method microtimer
microtimer::microtimer() in timer-defs.php
Constructor Create a new microtimer.
Method millisecs
microtimer::millisecs() in timer-defs.php
Returns the milli-seconds on the clock.
Function mins_diff
mins_diff() in datetime-defs.php
Tell minutes difference between too datetimes Returns the minutes difference between the two given datetimes.
Function monthNameNow
monthNameNow() in datetime-defs.php
Month now as string Returns the month name (eg. "January") as it is now..
Function monthno
monthno() in datetime-defs.php
Return month number Return the number of the named month, default to Jan if problems arise.
Function monthNow
monthNow() in datetime-defs.php
Month now as integer Returns the month (1-12) as it is now.
n
top
Variable $name
timeslot::$name in datetime-defs.php
Constant NICE_DATE
NICE_DATE in datetime-defs.php
Example: Mar 3rd 1999
Constant NICE_DATETIME
NICE_DATETIME in datetime-defs.php
Example: Mar 3rd 1:30pm
Constant NICE_DATE_NOYEAR
NICE_DATE_NOYEAR in datetime-defs.php
Example: Mar 3rd
Constant NICE_FULLDATETIME
NICE_FULLDATETIME in datetime-defs.php
Example: Mar 3rd 1999 1:30pm
Constant NICE_TIME_ONLY
NICE_TIME_ONLY in datetime-defs.php
Example: 1:30pm
p
top
Constant POSTGRES_DATE_FORMAT
POSTGRES_DATE_FORMAT in datetime-defs.php
Example: 12-31-1999 23:59:59
Constant POSTGRES_STD_FORMAT
POSTGRES_STD_FORMAT in datetime-defs.php
Example: 1999-07-17 23:59:59
Function prose_diff
prose_diff() in datetime-defs.php
Tell nice difference between too datetimes
Function prose_diff_ts
prose_diff_ts() in datetime-defs.php
Tell nice difference between too Unix timestamps
r
top
Variable $reference
microtimer::$reference in timer-defs.php
Reference time to base elapsed interval on
Method reset
microtimer::reset() in timer-defs.php
Reset the timer. This zeroes the timer. If it was ticking it goes on ticking, but starting from zero.
Method restart
microtimer::restart() in timer-defs.php
Restart the timer. This zeroes the timer and then starts it. Has same effect as reset() but also makes sure the timer is ticking after resetting internal timer values.
s
top
Variable $seconds
microtimer::$seconds in timer-defs.php
Current number of seconds on the timer
Class schedule
schedule in datetime-defs.php
Classes to handle a 24-hr time schedule. Covers the setting of * any number of slots, and testing whether a given time is in one of * the slots. The schedule class. Holds multiple timeslots.
Method schedule
schedule::schedule() in datetime-defs.php
Method secs
microtimer::secs() in timer-defs.php
Returns the seconds on the clock as a floating point number.
Constant SHORT_DATETIME
SHORT_DATETIME in datetime-defs.php
Example: Mar 3 21:30
Constant SQL_FORMAT
SQL_FORMAT in datetime-defs.php
Example: 12/31/1999 23:59:59
Method start
microtimer::start() in timer-defs.php
Start the timer. Starts the timer ticking. If it was already ticking then there is no change in status.
Constant STD_DMY
STD_DMY in datetime-defs.php
Example: 23/5/2001
Method stop
microtimer::stop() in timer-defs.php
Stop the timer This freezes the internal seconds value, and stops the timer from ticking.
t
top
Variable $ticking
microtimer::$ticking in timer-defs.php
True if the timer is ticking
Variable $timeslots
schedule::$timeslots in datetime-defs.php
Array of timeslots in a schedule.
Variable $ts_end
timeslot::$ts_end in datetime-defs.php
Variable $ts_start
timeslot::$ts_start in datetime-defs.php
Function timeNow
timeNow() in datetime-defs.php
Time now as array
Function timeNowAsStr
timeNowAsStr() in datetime-defs.php
Time now as string
Method timeslot
timeslot::timeslot() in datetime-defs.php
Class timeslot
timeslot in datetime-defs.php
Classes to handle a 24-hr time schedule. Covers the setting of * any number of slots, and testing whether a given time is in one of * the slots. The timeslot class. Holds details of a single slot.
Method timeslot
schedule::timeslot() in datetime-defs.php
Function timestamp_to_datetime
timestamp_to_datetime() in datetime-defs.php
Conversion: timestamp to datetime.
Function timestamp_to_displaydate
timestamp_to_displaydate() in datetime-defs.php
Conversion: timestamp to descriptive Convert a Unix timestamp into a descriptive date/time format for the user display, using the given displayformat string.
Function todaysDate_DMY
todaysDate_DMY() in datetime-defs.php
Today as DD/MM/YYYY Returns the given datetime as a date, and in EUROPEAN 'd/m/Y' format.
Function todaysDate_MDY
todaysDate_MDY() in datetime-defs.php
Today as MM/DD/YYYY Returns the given datetime as a date, and in SQL 'm/d/Y' format.
y
top
Function yearNow
yearNow() in datetime-defs.php
Year now as integer Returns the year as it is now.
a b d f g i m n p r s t y