[datetime] element index

Package indexes

All elements
a b c d e f g h i l m n p r s t u v w y
a
top
Method abbreviate_dayname
Constant ABBREVIATE_DAYNAME
ABBREVIATE_DAYNAME in clock-defs.php
Abbreviate day name or not
Method add_holiday
holidays::add_holiday() in holiday-defs.php
Add a holiday date as a date-string in the usual kinds of form such as '25-12', or '25 December 2007' or '25/12/2007' etc. This is a friendly method for adding general holiday dates.
Method add_holiday_relative
Add a holiday which is calculated as being the Nth occurence of a given dayname, in a given month. This method is a common one for designating National holidays, eg. 'Queen's Birthday' as being the first Monday in June.
Method add_holiday_ts
holidays::add_holiday_ts() in holiday-defs.php
Add a holiday timestamp to the array. This is the internal method for adding raw holiday timestamps.
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
c
top
Variable $clockid
digital_clock::$clockid in clock-defs.php
Unique ID for this clock widget
Variable $css_date
digital_clock::$css_date in clock-defs.php
Style or class for date display
Variable $css_time
digital_clock::$css_time in clock-defs.php
Style or class for time digits
Method Calendar
Calendar::Calendar() in calendar-defs.php
Constructor. Create a new Calendar object with optional centre date (defaults to 'today'). This date is the one we return to when the 'today' button is clicked on the calendar & is the starting point.
Class Calendar
Calendar in calendar-defs.php
Calendar
Page calendar-defs.php
calendar-defs.php in calendar-defs.php
Page clock-defs.php
clock-defs.php in clock-defs.php
Constant CLOCK_ATTRS
CLOCK_ATTRS in clock-defs.php
Clock overall clock table attributes (eg. style, width etc.)
Constant CLOCK_DATE_CSS
CLOCK_DATE_CSS in clock-defs.php
Clock date string style and/or class
Constant CLOCK_DATE_FORMAT
CLOCK_DATE_FORMAT in clock-defs.php
Clock date format M=month no, m=month name, D=day no,
Constant CLOCK_TIME_CSS
CLOCK_TIME_CSS in clock-defs.php
Clock time string style and/or class
d
top
Variable $date_format
digital_clock::$date_format in clock-defs.php
Date format eg. 'M d, ccyy' for 'April 4, 2005'
Variable $dayname
Calendar::$dayname in calendar-defs.php
Variable $days
Calendar::$days in calendar-defs.php
Variable $daysinmonth
Calendar::$daysinmonth in calendar-defs.php
Variable $days_clickable
Calendar::$days_clickable in calendar-defs.php
Variable $DD
Calendar::$DD in calendar-defs.php
Variable $display_properties
Clock display settings. An array of booleans.
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
Method digital_clock
Constructor for the clock
Class digital_clock
digital_clock in clock-defs.php
The digital_clock class. This is implemented as a 'layer' or 'div'
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_24_HOURS
DISPLAY_24_HOURS in clock-defs.php
Clock display hours (am/pm)
Constant DISPLAY_DATE
DISPLAY_DATE in clock-defs.php
Show date or not
Constant DISPLAY_DATE_FIRST
DISPLAY_DATE_FIRST in clock-defs.php
Show the date first
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_DAYNAME
DISPLAY_DAYNAME in clock-defs.php
Show day name or not
Constant DISPLAY_INLINE
DISPLAY_INLINE in clock-defs.php
Show date and time on one line
Constant DISPLAY_SECONDS
DISPLAY_SECONDS in clock-defs.php
Display to seconds or mins
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
e
top
Variable $endyear
Calendar::$endyear in calendar-defs.php
f
top
Variable $formname
Calendar::$formname in calendar-defs.php
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
Method get_DB_datetime
Calendar::get_DB_datetime() in calendar-defs.php
Return the currently stored calendar date as a string which will be formatted so as to go into a database field nicely. This normally means ISO format (YYYY-MM-DD).
Method get_DDstr
Calendar::get_DDstr() in calendar-defs.php
Return the currently stored day-date as a two-digit string
Method get_displaydate
Calendar::get_displaydate() in calendar-defs.php
Return the currently stored calendar date as a string in a given date format (see Axyl datetime-defs.php for pre-defined formats).
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_easter_holidays
get_easter_holidays() in holiday-defs.php
Get the days of Easter for the given year (defaults to current year)
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.
Method get_MMstr
Calendar::get_MMstr() in calendar-defs.php
Return the currently stored month as a two-digit string
Function get_nth_day_of_month
get_nth_day_of_month() in holiday-defs.php
Return the timestamp of the date for the Nth dayname in the given month. Returns -1 if error encountered.
Method get_timestamp
Calendar::get_timestamp() in calendar-defs.php
Return the current calendar date as a timestamp. This will return the timestamp at 00:00:00 (hh:mm:ss) ie. at the beginning of that day.
Method get_YYstr
Calendar::get_YYstr() in calendar-defs.php
Return the currently stored year as a two-digit string
h
top
Variable $hols
holidays::$hols in holiday-defs.php
Page holiday-defs.php
holiday-defs.php in holiday-defs.php
Method holidays
holidays::holidays() in holiday-defs.php
Constructor. Optionally pass in an associative array with the key of a unique holiday description, and value as the timestamp of the holiday itself.
Class holidays
holidays in holiday-defs.php
A class to handle a list of public holidays. It allows you to add holidays in various ways, and also to query whether a particular date-time falls on a holiday.
Method html
Calendar::html() in calendar-defs.php
Return the calendar HTML
Method html
digital_clock::html() in clock-defs.php
Render the clock.
i
top
Variable $initDD
Calendar::$initDD in calendar-defs.php
Variable $initial_ts
digital_clock::$initial_ts in clock-defs.php
Initial time to set the clock to
Variable $initMM
Calendar::$initMM in calendar-defs.php
Variable $initYY
Calendar::$initYY in calendar-defs.php
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
Method is_holiday
holidays::is_holiday() in holiday-defs.php
Check if the given timestamp is the date of a public holiday. We
Function is_same_day
is_same_day() in holiday-defs.php
Return true if the two timestamps are on the same day of the calendar.
Method is_valid
Calendar::is_valid() in calendar-defs.php
Check that currently stored Month, Day and Year make a correct date. Returns true if so.
l
top
Variable $leftx
digital_clock::$leftx in clock-defs.php
X-offset from left
m
top
Variable $matched_holiday_desc
Variable $MM
Calendar::$MM in calendar-defs.php
Variable $months
Calendar::$months in calendar-defs.php
Method microsecs
microtimer::microsecs() in timer-defs.php
Returns the micro-seconds on the clock.
Method microtimer
microtimer::microtimer() in timer-defs.php
Constructor Create a new microtimer.
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 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
Variable $position
digital_clock::$position in clock-defs.php
Positioning mode
Variable $posturl
Calendar::$posturl in calendar-defs.php
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
Method POSTprocess
Calendar::POSTprocess() in calendar-defs.php
Process GET/POST from form.
Method post_to
Calendar::post_to() in calendar-defs.php
Set the URL of script to POST the calendar form to.
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
Variable $render_form
Calendar::$render_form in calendar-defs.php
Variable $render_subform
Calendar::$render_subform in calendar-defs.php
Method render_as_subform
Calendar::render_as_subform() in calendar-defs.php
Set the calendar to be rendered in a sub-form. This is just the same as rendering in a form, except we miss off the form tags.
Method render_days_clickable
Render calendar dates (the individual days) as clickable. This will cause a form submit, with the details of the date clicked on and the calendar will be set to that date.
Method render_in_form
Calendar::render_in_form() in calendar-defs.php
Set the calendar to be rendered in its own form. If your calendar sits in an existing form, then call this method with 'false' to prevent it rendering its own form.
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
Variable $startyear
Calendar::$startyear in calendar-defs.php
Method schedule
schedule::schedule() in datetime-defs.php
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 secs
microtimer::secs() in timer-defs.php
Returns the seconds on the clock as a floating point number.
Method set_css_date
Set the style of class for the date display
Method set_css_time
Set the style of class for the time display
Method set_date_format
Set the format for the date display. This is just done by replacement in a format string where d=month date, M=month name, m=month no, cc=century, and yy=year (99). Eg. 'm d, ccyy' would give 'April 4, 2005'. Another example would be 'd/m/yy' which would render '4/4/05'.
Method set_display_property
Set a display property for the clock. Display property IDs are defined at the top of this script, and can be any type of content. NB: Boolean properties are so arranged that the default is always false.
Method set_position
Set the position and the positioning directive for the clock.
Method set_timezone
Set the timezone to use for this clock. The argument should be an integer (or decimal) in the range +12 to -12, in hours offset from GMT.
Method set_today
Calendar::set_today() in calendar-defs.php
Set the 'today' date for the calendar. This is the date that is reset to when the user clicks on the 'TODAY' button. Of course it defaults to the current date when the calendar object is created, but this method allows for customised 'today' settings.
Method set_to_gmt
digital_clock::set_to_gmt() in clock-defs.php
Special set timezone case - setting to GMT (0 hours offset).
Method set_update_interval_secs
Set the number of seconds to wait before updating the clock each time.
Method set_visibility
Set the starting visibility for the clock. In case you want to reveal/hide it with some javascript.
Method set_year_limits
Calendar::set_year_limits() in calendar-defs.php
Set the starting and finishing year for the calendar - the range of operation. This defaults to +/-10 years around the current year.
Constant SHORT_DATETIME
SHORT_DATETIME in datetime-defs.php
Example: Mar 3 21:30
Method show_24hrs
digital_clock::show_24hrs() in clock-defs.php
Method show_date
digital_clock::show_date() in clock-defs.php
Method show_date_first
Method show_dayname
Method show_inline
Method show_seconds
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 $topy
digital_clock::$topy in clock-defs.php
Y-offset from top
Variable $ts_end
timeslot::$ts_end in datetime-defs.php
Variable $ts_start
timeslot::$ts_start in datetime-defs.php
Variable $tz
digital_clock::$tz in clock-defs.php
The timezone offset in +/- hours from GMT.
Function timeNow
timeNow() in datetime-defs.php
Time now as array
Function timeNowAsStr
timeNowAsStr() in datetime-defs.php
Time now as string
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
timeslot::timeslot() in datetime-defs.php
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.
u
top
Variable $update_interval_ms
Interval between clock updates in millisecs
v
top
Variable $visibility
digital_clock::$visibility in clock-defs.php
Visibility setting
w
top
Variable $weeks
Calendar::$weeks in calendar-defs.php
y
top
Variable $YY
Calendar::$YY in calendar-defs.php
Function yearNow
yearNow() in datetime-defs.php
Year now as integer Returns the year as it is now.
a b c d e f g h i l m n p r s t u v w y