[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/date/date_php4/ -> date_php4.inc (summary)

(no description)

File Size: 1071 lines (38 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 25 functions

  date_create()
  date_format()
  date_date_set()
  date_time_set()
  date_timezone_set()
  timezone_open()
  timezone_name_get()
  date_timezone_get()
  timezone_offset_get()
  date_offset_get()
  date_modify()
  timezone_identifiers_list()
  timezone_abbreviations_list()
  date_datetime2timestamp()
  date_is_dst()
  date_getdate()
  date_gmgetdate()
  date_date()
  date_gmdate()
  date_mktime()
  date_gmmktime()
  date_get_gmt_diff_ts()
  date_year_digit_check()
  date_dow()
  date_is_leap_year()

Functions
Functions that are not part of a class:

date_create($date_in = NULL, $timezone = NULL)   X-Ref
PHP 4 equivalent for date_create().

param: string $date_in
param: string $timezone
return: object

date_format($date, $format)   X-Ref
PHP 4 equivalent for date_format().

Some formats that work in PHP 5 won't work in PHP 4, many won't work for
dates earlier than 1970. Filter out those that need special treatment.
No translation done here because the PHP 5 date_format() function isn't
doing any translation and we need to return identical values in both.

param: object $date
param: string $format
return: string

date_date_set(&$date, $year, $month, $day)   X-Ref
PHP 4 equivalent for date_date_set().

param: $date
param: $year
param: $month
param: $day
return: $date

date_time_set(&$date, $hour, $minute, $second)   X-Ref
PHP 4 equivalent for date_date_set().

param: $date
param: $year
param: $month
param: $day
return: $date

date_timezone_set(&$date, $timezone)   X-Ref
PHP 4 equivalent for date_timezones_set().

param: $date
param: $timezone
return: $date

timezone_open($timezone)   X-Ref
PHP 4 equivalent for timezone_open().
Just track the timezone name.


timezone_name_get($timezone)   X-Ref
PHP 4 equivalent for timezone_name_get().


date_timezone_get($date)   X-Ref
PHP 4 equivalent for date_timezone_get().


timezone_offset_get($timezone, $date)   X-Ref
PHP 4 equivalent for timezone_offset_get().

Cache results for expensive process of getting offsets for each timezone.
Each cached timezone array will show whether the timezone has dst and the
dst and non-dst offset for that timezone.

param: $timezone
param: $date
return: $offset

date_offset_get($date)   X-Ref
PHP 4 equivalent for date_offset_get().

Cache results for expensive process of getting offsets for each timezone.
Each cached timezone array will show whether the timezone has dst and the
dst and non-dst offset for that timezone.

param: $date
return: $offset

date_modify(&$date, $change)   X-Ref
A limited set of options are provided here to modify dates.
Uses strtotime() on dates after 1970. Uses date_php4_calc.inc to do
calculations on older dates.

Will work for things like date_modify($date, '+1 Sunday');

param: $date
param: $change
return:

timezone_identifiers_list()   X-Ref
PHP 4 equivalent for timezone_identifiers_list().

Expanded array looks like:
array(
0 => 'Africa/Abidjan',
1 => 'Africa/Accra',
2 => 'Africa/Addis_Ababa',
...

timezone_abbreviations_list()   X-Ref
PHP 4 equivalent for timezone_abbreviations_list().
Array keyed on timezone abbreviation.

Expanded array looks like:
array(
'cdt' => array (
0 => array (
'dst' => true,
'offset' => -18000,
'timezone_id' => 'America/Chicago',
),
1 => array (
'dst' => true,
'offset' => -14400,
'timezone_id' => 'America/Havana',
)...


date_datetime2timestamp($datetime, $timezone)   X-Ref
Create a timestamp from a datetime value.

Can't use date_convert() to turn datetime to unix within the
PHP 4 emulation  because it creates endless loops.

date_is_dst($timestamp, $timezone = NULL)   X-Ref
Check if time is in Daylight Savings Time
Uses dst region code, as stored in the $timezone_map array
from date_php4_tz_map.inc

param: $timezone name
param: $timestamp
return:

date_getdate($timestamp = false, $timezone = false)   X-Ref
Returns an array with date info.

param: $timestamp
param: $timezone name

date_gmgetdate($timestamp = false)   X-Ref
Like date_getdate with no GMT conversion.


date_date($format, $timestamp = false, $timezone = false)   X-Ref
Return formatted date based on timestamp $timestamp.

param: $format
param: $timestamp
param: $timezone name

date_gmdate($format, $timestamp = false, $test = false)   X-Ref
Like date_date with no GMT conversion.


date_mktime($hr, $min, $sec, $mon = false, $day = false, $year = false, $timezone = false)   X-Ref
Return a timestamp given a local time.

param: $timezone name

date_gmmktime($hr, $min, $sec, $mon = false, $day = false, $year = false)   X-Ref
Like date_mktime with no GMT conversion.


date_get_gmt_diff_ts($timestamp, $timezone = NULL)   X-Ref
Get local time zone offset from GMT.

return: timezone offset in seconds

date_year_digit_check($y)   X-Ref
Fix 2-digit years. Works for any century. Assumes that if 2-digit is
more than 30 years in future, then previous century.


date_dow($day, $month, $year)   X-Ref
Returns day of week for given date (0 = Sunday), works on dates outside
normal date range.

Adapted from a function in the ADODB date library by John Lim, more info in
date_php4_lib.inc.

param: int  $day
param: int  $month
param: int  $year
return:

date_is_leap_year($year)   X-Ref
Returns true for a leap year, else false. Works outside normal date range.

param: int  $year
return: boolean



Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7