Date/Time Class.
Library for standard date operations like formatting/unformatting.
Some parts of the code are based on PEAR::Date and PEAR::Date_Calc packages at {link http://pear.php.net/package-info.php?package=Date}, modified for p4a necessity.
Located in /p4a/libraries/date.php (line 48)
Converts a date to number of days since a distant unspecified epoch.
Converts number of days to a distant unspecified epoch.
Returns day of week for given date, 0=Sunday
Date pretty printing, similar to strftime()
Formats the date in the given format, much like strftime(). Most strftime() options are supported.
formatting options:
%a abbreviated weekday name (Sun, Mon, Tue)
%A full weekday name (Sunday, Monday, Tuesday)
%b abbreviated month name (Jan, Feb, Mar)
%B full month name (January, February, March)
%C century number (the year divided by 100 and truncated to an integer, range 00 to 99)
%d day of month (range 01 to 31)
%D same as "%m/%d/%y"
%e day of month, single digit (range 0 to 31)
%E number of days since unspecified epoch (integer, Date_Calc::dateToDays())
%H hour as decimal number (00 to 23)
%I hour as decimal number on 12-hour clock (01 to 12)
%j day of year (range 001 to 366)
%m month as decimal number (range 01 to 12)
%M minute as a decimal number (00 to 59)
%n newline character (\n)
%O dst-corrected timezone offset expressed as "+/-HH:MM"
%o raw timezone offset expressed as "+/-HH:MM"
%p either 'am' or 'pm' depending on the time
%P either 'AM' or 'PM' depending on the time
%r time in am/pm notation, same as "%I:%M:%S %p"
%R time in 24-hour notation, same as "%H:%M"
%S seconds as a decimal number (00 to 59)
%t tab character (\t)
%T current time, same as "%H:%M:%S"
%w weekday as decimal (0 = Sunday)
%U week number of current year, first sunday as first week
%y year as decimal (range 00 to 99)
%Y year as decimal including century (range 0000 to 9999)
%% literal '%'
Returns an array of month names Used to take advantage of the setlocale function to return language specific month names.
Returns the full month name for the given month
Returns the abbreviated month name for the given month
Returns an array of week days
Used to take advantage of the setlocale function to return language specific week days
Returns the full weekday name for the given date
Returns the abbreviated weekday name for the given date
Converts from Gregorian Year-Month-Day to ISO YearNumber-WeekNumber-WeekDay Uses ISO 8601 definitions.
Algorithm from Rick McCarty, 1999 at http://personal.ecu.edu/mccartyr/ISOwdALG.txt. Transcribed to PHP by Jesus M. Castagnetto
Determines if given date is a future date from now.
Returns true for a leap year, else false
Determines if given date is a past date from now.
Returns true for valid date, false for invalid date.
Returns number of days since 31 December of year before given date.
Returns the current local date. NOTE: This function retrieves the local date using strftime(), which may or may not be 32-bit safe on your system.
Parses a date in the standard datetime format and returns an associative array with every single date part.
Reverse date analysis on a formatted date.
This function takes the formatted date and the original format and try to get it back in standard datetime format.
Returns week of the year, first Sunday is first day of first week
Documentation generated on Mon, 07 Jan 2008 11:29:15 +0100 by phpDocumentor 1.4.0