Public Member Functions | |
| _getDate ($origd=false, $fast=false, $is_gmt=false) | |
| _is_leap_year ($year) | |
| BitDate ($_display_offset=0) | |
| calculateTimeZoneDate ($dateTime, $fromTZ, $toTZ, $fromLocation= 'North America', $toLocation= 'GMT') | |
| date ($fmt, $d=false, $is_gmt=false) | |
| date2 ($fmt, $d=false, $is_gmt=false) | |
| dayOfWeek ($year, $month, $day) | |
| daysInMonth ($month, $year) | |
| get_display_offset ($_user=false) | |
| get_iso8601_datetime ($timestamp, $user=false) | |
| get_rfc2822_datetime ($timestamp=false, $user=false) | |
| get_rfc2822_timezone_offset ($time=false, $no_colon=false, $user=false) | |
| get_timezone_list ($use_default=false) | |
| getDate ($d=false, $fast=false) | |
| getDisplayDateFromUTC ($_timestamp) | |
| getHolidays ($pYear, $pCountryCode='US') | |
| getServerDateFromUTC ($_timestamp) | |
| getTimestampFromISO ($iso_date) | |
| getTzName () | |
| getUTCDate () | |
| getUTCFromDisplayDate ($_timestamp) | |
| getUTCFromServerDate ($_timestamp) | |
| getUTCTime () | |
| getUTCTimestamp () | |
| gmmktime ($hr, $min, $sec, $mon=false, $day=false, $year=false, $is_dst=false) | |
| gmstrftime ($fmt, $ls=false) | |
| gregorianToISO ($year, $month, $day) | |
| is_leap_year ($year) | |
| mktime ($hr, $min, $sec, $mon=false, $day=false, $year=false, $is_dst=false, $is_gmt=false) | |
| set_locale ($user=false) | |
| strftime ($fmt, $ls=false, $is_gmt=false) | |
| strtotime ($time, $now=NULL) | |
| weekOfYear ($year, $month, $day) | |
| year_digit_check ($y) | |
Public Attributes | |
| $display_offset | |
| $server_offset | |
Definition at line 28 of file BitDate.php.
| BitDate::_getDate | ( | $ | origd = false, |
|
| $ | fast = false, |
|||
| $ | is_gmt = false | |||
| ) |
Low-level function that returns the getdate() array. We have a special $fast flag, which if set to true, will return fewer array values, and is much faster as it does not calculate dow, etc.
| int | Date to be converted in Unix epochs | |
| boolean | Return short format array ( less weekday and month ) | |
| boolean | Ignore timezone |
Definition at line 336 of file BitDate.php.
References mktime().
Referenced by getDate().
Here is the call graph for this function:

| BitDate::_is_leap_year | ( | $ | year | ) |
Checks for leap year, returns true if it is. No 2-digit year check. Also handles julian calendar correctly.
| int |
Definition at line 236 of file BitDate.php.
Referenced by is_leap_year().
| BitDate::BitDate | ( | $ | _display_offset = 0 |
) |
Default constructor
| int | desired offset for date display, in minutes |
Definition at line 45 of file BitDate.php.
References gmmktime(), and mktime().
Here is the call graph for this function:

| BitDate::calculateTimeZoneDate | ( | $ | dateTime, | |
| $ | fromTZ, | |||
| $ | toTZ, | |||
| $ | fromLocation = 'North America', |
|||
| $ | toLocation = 'GMT' | |||
| ) |
Definition at line 1157 of file BitDate.php.
References date(), and strtotime().
Here is the call graph for this function:

| BitDate::date | ( | $ | fmt, | |
| $ | d = false, |
|||
| $ | is_gmt = false | |||
| ) |
Return formatted date based on timestamp $d
| string | Format of date output | |
| int | Date to be converted | |
| boolean | Ignore timezone |
Definition at line 545 of file BitDate.php.
References $i, $max, and mktime().
Referenced by calculateTimeZoneDate(), date2(), getHolidays(), getUTCDate(), getUTCTimestamp(), strftime(), and year_digit_check().
Here is the call graph for this function:

| BitDate::date2 | ( | $ | fmt, | |
| $ | d = false, |
|||
| $ | is_gmt = false | |||
| ) |
Definition at line 519 of file BitDate.php.
References date().
Here is the call graph for this function:

| BitDate::dayOfWeek | ( | $ | year, | |
| $ | month, | |||
| $ | day | |||
| ) |
Returns day of week, 0 = Sunday,... 6=Saturday. Algorithm from PEAR::Date_Calc
| int | ||
| int | ||
| int |
Definition at line 179 of file BitDate.php.
| BitDate::daysInMonth | ( | $ | month, | |
| $ | year | |||
| ) |
Definition at line 1072 of file BitDate.php.
References FALSE, and is_leap_year().
Here is the call graph for this function:

| BitDate::get_display_offset | ( | $ | _user = false |
) |
Retrieves the user's preferred offset for displaying dates.
| int | the logged-in user. |
Definition at line 56 of file BitDate.php.
References $_COOKIE, and $gBitUser.
Referenced by BitEvents::BitEvents(), data_calendar(), and BitBlogPost::verify().
| BitDate::get_iso8601_datetime | ( | $ | timestamp, | |
| $ | user = false | |||
| ) |
Per http://www.w3.org/TR/NOTE-datetime
Definition at line 1019 of file BitDate.php.
References $timestamp, $user, and strftime().
Here is the call graph for this function:

| BitDate::get_rfc2822_datetime | ( | $ | timestamp = false, |
|
| $ | user = false | |||
| ) |
Definition at line 1023 of file BitDate.php.
References $timestamp, $user, get_rfc2822_timezone_offset(), and strftime().
Here is the call graph for this function:

| BitDate::get_rfc2822_timezone_offset | ( | $ | time = false, |
|
| $ | no_colon = false, |
|||
| $ | user = false | |||
| ) |
Definition at line 1040 of file BitDate.php.
References $time, $user, and strftime().
Referenced by get_rfc2822_datetime().
Here is the call graph for this function:

| BitDate::get_timezone_list | ( | $ | use_default = false |
) |
Get a list of timezones to be worked with
Definition at line 993 of file BitDate.php.
References $offset.
| BitDate::getDate | ( | $ | d = false, |
|
| $ | fast = false | |||
| ) |
Returns an array with date info.
| boolean | ||
| boolean |
Definition at line 296 of file BitDate.php.
References _getDate().
Here is the call graph for this function:

| BitDate::getDisplayDateFromUTC | ( | $ | _timestamp | ) |
Convert a UTC timestamp to the preferred display offset.
| timestamp | ISO format date yYYY-mM-dD hH:mM:sS.s ( Lower case letters optional, but should be 0 ) |
Definition at line 82 of file BitDate.php.
References getTimestampFromISO().
Here is the call graph for this function:

| BitDate::getHolidays | ( | $ | pYear, | |
| $ | pCountryCode = 'US' | |||
| ) |
Get a hash of holidays for a given year
| $pYear | the year in question | |
| $pCountryCode | -- the country in question - only US is supported currently |
Definition at line 1105 of file BitDate.php.
References date(), and strtotime().
Here is the call graph for this function:

| BitDate::getServerDateFromUTC | ( | $ | _timestamp | ) |
Convert a UTC timestamp to the local server time.
| timestamp | UTC timestamp to convert. |
Definition at line 101 of file BitDate.php.
References getTimestampFromISO().
Here is the call graph for this function:

| BitDate::getTimestampFromISO | ( | $ | iso_date | ) |
Convert ISO date to numberic timestamp.
| string | ISO format date yYYY-mM-dD hH:mM:sS.s ( Lower case letters optional, but should be 0 ) |
Definition at line 158 of file BitDate.php.
References $ret, and mktime().
Referenced by getDisplayDateFromUTC(), getServerDateFromUTC(), getUTCFromDisplayDate(), and getUTCFromServerDate().
Here is the call graph for this function:

| BitDate::getTzName | ( | ) |
Get the name of the current timezone. Currently, only "UTC" or an empty string (Local).
Definition at line 143 of file BitDate.php.
| BitDate::getUTCDate | ( | ) |
Retrieve a current UTC Date as an ISO formated date
Definition at line 134 of file BitDate.php.
References date().
Here is the call graph for this function:

| BitDate::getUTCFromDisplayDate | ( | $ | _timestamp | ) |
Convert a display-offset timestamp to UTC.
| timestamp | ISO format date yYYY-mM-dD hH:mM:sS.s ( Lower case letters optional, but should be 0 ) |
Definition at line 92 of file BitDate.php.
References getTimestampFromISO().
Here is the call graph for this function:

| BitDate::getUTCFromServerDate | ( | $ | _timestamp | ) |
Convert a local server timestamp to UTC.
| timestamp | Server timestamp to convert. |
Definition at line 110 of file BitDate.php.
References getTimestampFromISO().
Here is the call graph for this function:

| BitDate::getUTCTime | ( | ) |
Retrieve a current UTC timestamp as Unix epoch.
Definition at line 118 of file BitDate.php.
Referenced by LibertyStars::calculateUserWeight(), LibertyStars::verify(), and LibertyRecommends::verify().
| BitDate::getUTCTimestamp | ( | ) |
Retrieve a current UTC Timestamp as an ISO formated date/time.
Definition at line 126 of file BitDate.php.
References date().
Here is the call graph for this function:

| BitDate::gmmktime | ( | $ | hr, | |
| $ | min, | |||
| $ | sec, | |||
| $ | mon = false, |
|||
| $ | day = false, |
|||
| $ | year = false, |
|||
| $ | is_dst = false | |||
| ) |
Returns a timestamp given a GMT/UTC time.
| int | Hour | |
| int | Minute | |
| int | Second | |
| int | Month | |
| int | Day | |
| int | Year | |
| int | $is_dst is not implemented and is ignored |
Definition at line 691 of file BitDate.php.
References $sec, and mktime().
Referenced by BitDate(), and mktime().
Here is the call graph for this function:

| BitDate::gmstrftime | ( | $ | fmt, | |
| $ | ls = false | |||
| ) |
Definition at line 810 of file BitDate.php.
References strftime().
Referenced by strftime().
Here is the call graph for this function:

| BitDate::gregorianToISO | ( | $ | year, | |
| $ | month, | |||
| $ | day | |||
| ) |
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
| int | $year | |
| int | $month | |
| int | $day |
Definition at line 931 of file BitDate.php.
References $c, $h, $i, and is_leap_year().
Referenced by weekOfYear().
Here is the call graph for this function:

| BitDate::is_leap_year | ( | $ | year | ) |
checks for leap year, returns true if it is. Has 2-digit year check
| int |
Definition at line 255 of file BitDate.php.
References _is_leap_year(), and year_digit_check().
Referenced by daysInMonth(), and gregorianToISO().
Here is the call graph for this function:

| BitDate::mktime | ( | $ | hr, | |
| $ | min, | |||
| $ | sec, | |||
| $ | mon = false, |
|||
| $ | day = false, |
|||
| $ | year = false, |
|||
| $ | is_dst = false, |
|||
| $ | is_gmt = false | |||
| ) |
Return a timestamp given a local time. Originally by jackbbs. Not a very fast algorithm - O(n) operation. Could be optimized to O(1).
| int | Hour | |
| int | Minute | |
| int | Second | |
| int | Month | |
| int | Day | |
| int | Year | |
| int | $is_dst is not implemented and is ignored |
Definition at line 708 of file BitDate.php.
References $b, $ret, $sec, gmmktime(), and year_digit_check().
Referenced by _getDate(), BitDate(), date(), getTimestampFromISO(), and gmmktime().
Here is the call graph for this function:

| BitDate::set_locale | ( | $ | user = false |
) |
| BitDate::strftime | ( | $ | fmt, | |
| $ | ls = false, |
|||
| $ | is_gmt = false | |||
| ) |
Definition at line 824 of file BitDate.php.
References $i, $max, $ret, date(), and gmstrftime().
Referenced by get_iso8601_datetime(), get_rfc2822_datetime(), get_rfc2822_timezone_offset(), and gmstrftime().
Here is the call graph for this function:

| BitDate::strtotime | ( | $ | time, | |
| $ | now = NULL | |||
| ) |
Definition at line 815 of file BitDate.php.
Referenced by calculateTimeZoneDate(), and getHolidays().
| BitDate::weekOfYear | ( | $ | year, | |
| $ | month, | |||
| $ | day | |||
| ) |
Returns week of year, 1 = first week of year. Algorithm from PEAR::Date_Calc This needs to be checked out for both start day and early date rules
| int | ||
| int | ||
| int |
Definition at line 221 of file BitDate.php.
References $parts, and gregorianToISO().
Here is the call graph for this function:

| BitDate::year_digit_check | ( | $ | y | ) |
Fix 2-digit years. Works for any century. Assumes that if 2-digit is more than 30 years in future, then previous century.
| int |
Definition at line 267 of file BitDate.php.
References date().
Referenced by is_leap_year(), and mktime().
Here is the call graph for this function:

| BitDate::$display_offset |
Definition at line 33 of file BitDate.php.
| BitDate::$server_offset |
Definition at line 39 of file BitDate.php.
1.5.2