From 2139ecdbe882dee32f60de5aec74ec2b8a509b7a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 11 Jan 2012 23:58:50 +0200 Subject: Added date_range() to the Date helper --- user_guide_src/source/helpers/date_helper.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index ad06dd628..f965e6166 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -296,6 +296,30 @@ Example If the second parameter is empty, the current year will be used. +date_range() +============ + +Returns a list of dates within a specified period. + +.. php:method:: date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d') + + :param integer $unix_start: UNIX timestamp of the range start date + :param integer $mixed: UNIX timestamp of the range end date or interval in days + :param boolean $is_unix: set to FALSE if $mixed is not a timestamp + :param string $format: output date format, same as in date() + :returns: array + +Example + +:: + + $range = date_range('2012-01-01', '2012-01-15'); + echo "First 15 days of 2012:"; + foreach ($range as $date) + { + echo $date."\n"; + } + timezones() =========== -- cgit v1.2.3-24-g4f1b From e90b6844701a8d7240cb2ac595c2d9d0d211d765 Mon Sep 17 00:00:00 2001 From: Kwaan Online <> Date: Tue, 31 Jan 2012 10:15:30 +0000 Subject: - Updated timezone selete list to match function output. - Updated timezone reference to match function output. - Note some reference locations have been abridged so they fit the table format. A note has been added to this effect. --- user_guide_src/source/helpers/date_helper.rst | 152 ++++++++++++++++---------- 1 file changed, 92 insertions(+), 60 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index ad06dd628..bd5a3aa18 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -327,36 +327,46 @@ Generates a pull-down menu of timezones, like this one:
@@ -393,66 +403,88 @@ Timezone Reference The following table indicates each timezone and its location. +Note some of the location lists have been abridged for clarity and formatting. + +------------+----------------------------------------------------------------+ | Time Zone | Location | +============+================================================================+ -| UM12 | (UTC - 12:00) Enitwetok, Kwajalien | +| UM12 | (UTC - 12:00) Baker/Howland Island | ++------------+----------------------------------------------------------------+ +| UM11 | (UTC - 11:00) Samoa Time Zone, Niue | ++------------+----------------------------------------------------------------+ +| UM10 | (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands | ++------------+----------------------------------------------------------------+ +| UM95 | (UTC - 09:30) Marquesas Islands | ++------------+----------------------------------------------------------------+ +| UM9 | (UTC - 09:00) Alaska Standard Time, Gambier Islands | ++------------+----------------------------------------------------------------+ +| UM8 | (UTC - 08:00) Pacific Standard Time, Clipperton Island | ++------------+----------------------------------------------------------------+ +| UM7 | (UTC - 11:00) Mountain Standard Time | ++------------+----------------------------------------------------------------+ +| UM6 | (UTC - 06:00) Central Standard Time | ++------------+----------------------------------------------------------------+ +| UM5 | (UTC - 05:00) Eastern Standard Time, Western Caribbean | ++------------+----------------------------------------------------------------+ +| UM45 | (UTC - 04:30) Venezuelan Standard Time | ++------------+----------------------------------------------------------------+ +| UM4 | (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean | +------------+----------------------------------------------------------------+ -| UM11 | (UTC - 11:00) Nome, Midway Island, Samoa | +| UM35 | (UTC - 03:30) Newfoundland Standard Time | +------------+----------------------------------------------------------------+ -| UM10 | (UTC - 10:00) Hawaii | +| UM3 | (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay | +------------+----------------------------------------------------------------+ -| UM9 | (UTC - 9:00) Alaska | +| UM2 | (UTC - 02:00) South Georgia/South Sandwich Islands | +------------+----------------------------------------------------------------+ -| UM8 | (UTC - 8:00) Pacific Time | +| UM1 | (UTC -1:00) Azores, Cape Verde Islands | +------------+----------------------------------------------------------------+ -| UM7 | (UTC - 7:00) Mountain Time | +| UTC | (UTC) Greenwich Mean Time, Western European Time | +------------+----------------------------------------------------------------+ -| UM6 | (UTC - 6:00) Central Time, Mexico City | +| UP1 | (UTC +1:00) Central European Time, West Africa Time | +------------+----------------------------------------------------------------+ -| UM5 | (UTC - 5:00) Eastern Time, Bogota, Lima, Quito | +| UP2 | (UTC +2:00) Central Africa Time, Eastern European Time | +------------+----------------------------------------------------------------+ -| UM4 | (UTC - 4:00) Atlantic Time, Caracas, La Paz | +| UP3 | (UTC +3:00) Moscow Time, East Africa Time | +------------+----------------------------------------------------------------+ -| UM25 | (UTC - 3:30) Newfoundland | +| UP35 | (UTC +3:30) Iran Standard Time | +------------+----------------------------------------------------------------+ -| UM3 | (UTC - 3:00) Brazil, Buenos Aires, Georgetown, Falkland Is. | +| UP4 | (UTC +4:00) Azerbaijan Standard Time, Samara Time | +------------+----------------------------------------------------------------+ -| UM2 | (UTC - 2:00) Mid-Atlantic, Ascention Is., St Helena | +| UP45 | (UTC +4:30) Afghanistan | +------------+----------------------------------------------------------------+ -| UM1 | (UTC - 1:00) Azores, Cape Verde Islands | +| UP5 | (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time | +------------+----------------------------------------------------------------+ -| UTC | (UTC) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia | +| UP55 | (UTC +5:30) Indian Standard Time, Sri Lanka Time | +------------+----------------------------------------------------------------+ -| UP1 | (UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome | +| UP575 | (UTC +5:45) Nepal Time | +------------+----------------------------------------------------------------+ -| UP2 | (UTC + 2:00) Kaliningrad, South Africa, Warsaw | +| UP6 | (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time | +------------+----------------------------------------------------------------+ -| UP3 | (UTC + 3:00) Baghdad, Riyadh, Moscow, Nairobi | +| UP65 | (UTC +6:30) Cocos Islands, Myanmar | +------------+----------------------------------------------------------------+ -| UP25 | (UTC + 3:30) Tehran | +| UP7 | (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam| +------------+----------------------------------------------------------------+ -| UP4 | (UTC + 4:00) Adu Dhabi, Baku, Muscat, Tbilisi | +| UP8 | (UTC +8:00) Australian Western Standard Time, Beijing Time | +------------+----------------------------------------------------------------+ -| UP35 | (UTC + 4:30) Kabul | +| UP875 | (UTC +8:45) Australian Central Western Standard Time | +------------+----------------------------------------------------------------+ -| UP5 | (UTC + 5:00) Islamabad, Karachi, Tashkent | +| UP9 | (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk | +------------+----------------------------------------------------------------+ -| UP45 | (UTC + 5:30) Bombay, Calcutta, Madras, New Delhi | +| UP95 | (UTC +9:30) Australian Central Standard Time | +------------+----------------------------------------------------------------+ -| UP6 | (UTC + 6:00) Almaty, Colomba, Dhaka | +| UP10 | (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time| +------------+----------------------------------------------------------------+ -| UP7 | (UTC + 7:00) Bangkok, Hanoi, Jakarta | +| UP105 | (UTC +10:30) Lord Howe Island | +------------+----------------------------------------------------------------+ -| UP8 | (UTC + 8:00) Beijing, Hong Kong, Perth, Singapore, Taipei | +| UP11 | (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu | +------------+----------------------------------------------------------------+ -| UP9 | (UTC + 9:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk | +| UP115 | (UTC +11:30) Norfolk Island | +------------+----------------------------------------------------------------+ -| UP85 | (UTC + 9:30) Adelaide, Darwin | +| UP12 | (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand | +------------+----------------------------------------------------------------+ -| UP10 | (UTC + 10:00) Melbourne, Papua New Guinea, Sydney, Vladivostok | +| UP1275 | (UTC +12:45) Chatham Islands Standard Time | +------------+----------------------------------------------------------------+ -| UP11 | (UTC + 11:00) Magadan, New Caledonia, Solomon Islands | +| UP13 | (UTC +13:00) Phoenix Islands Time, Tonga | +------------+----------------------------------------------------------------+ -| UP12 | (UTC + 12:00) Auckland, Wellington, Fiji, Marshall Island | +| UP14 | (UTC +14:00) Line Islands | +------------+----------------------------------------------------------------+ -- cgit v1.2.3-24-g4f1b From 7bf0a4ff35efc758ef43b3a848e655285946b8b6 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Tue, 27 Mar 2012 18:36:15 +0200 Subject: Added doccumentation for the new date helper. --- user_guide_src/source/helpers/date_helper.rst | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index b21d147bd..b8c3dd076 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -20,14 +20,20 @@ The following functions are available: now() ===== -Returns the current time as a Unix timestamp, referenced either to your -server's local time or GMT, based on the "time reference" setting in -your config file. If you do not intend to set your master time reference -to GMT (which you'll typically do if you run a site that lets each user -set their own timezone settings) there is no benefit to using this -function over PHP's time() function. - -.. php:method:: now() +Returns the current time as a Unix timestamp, based on the "timezone" parameter. +All PHP available timezones are supported. + +.. php:method:: now($timezone = NULL) + + :param string $timezone: The timezone you want to be returned + :returns: integer + +:: + + $tz = "Australia/Victoria"; + echo now($tz); + +If a timezone is not provided, it will return time() based on "timezone" setting. mdate() ======= -- cgit v1.2.3-24-g4f1b From e15e3dde9dca15e2d65f098010d3fb7004cef5e7 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Sat, 9 Jun 2012 23:52:27 +0200 Subject: Fixed timezone change in index.php Now it does not ever change the local timezone, and it adds the option to get the 'local' time() --- user_guide_src/source/helpers/date_helper.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index b6c6ed4bb..33b39bd5b 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -21,7 +21,8 @@ now() ===== Returns the current time as a Unix timestamp, based on the "timezone" parameter. -All PHP available timezones are supported. +All PHP available timezones are supported. You can also use 'local' timezone, and +it will return time(). .. php:method:: now($timezone = NULL) -- cgit v1.2.3-24-g4f1b From feb14dac4e7a417a48344a5188a8ad8074871df4 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Tue, 12 Jun 2012 16:09:36 +0200 Subject: Changed the config parameter. The session's _get_time() function has also changed. --- user_guide_src/source/helpers/date_helper.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 33b39bd5b..7bbfd4f15 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -30,11 +30,9 @@ it will return time(). :returns: integer :: + echo now("Australia/Victoria"); - $tz = "Australia/Victoria"; - echo now($tz); - -If a timezone is not provided, it will return time() based on "timezone" setting. +If a timezone is not provided, it will return time() based on "time_reference" setting. mdate() ======= -- cgit v1.2.3-24-g4f1b From 7400965017f87c3aba18bf75ed7d732359fd577d Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Wed, 13 Jun 2012 22:57:50 +0200 Subject: Fixed some stuff in documentation. --- user_guide_src/source/helpers/date_helper.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 7bbfd4f15..1b7177fc2 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -20,9 +20,12 @@ The following functions are available: now() ===== -Returns the current time as a Unix timestamp, based on the "timezone" parameter. -All PHP available timezones are supported. You can also use 'local' timezone, and -it will return time(). +Returns the current time as a Unix timestamp, referenced either to your +server's local time or any PHP suported timezone, based on the "time reference" +setting in your config file. If you do not intend to set your master time reference +to any other PHP suported timezone (which you'll typically do if you run a site that +lets each user set their own timezone settings) there is no benefit to using this +function over PHP's time() function. .. php:method:: now($timezone = NULL) -- cgit v1.2.3-24-g4f1b From c275b23b06195e4ea6424d96a0c76b825c71443a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 15 Jun 2012 16:13:17 +0300 Subject: Fix nice_date() documentation --- user_guide_src/source/helpers/date_helper.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 1b7177fc2..b6dc2e934 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -247,16 +247,18 @@ Example :: - $bad_time = 199605 // Should Produce: 1996-05-01 - $better_time = nice_date($bad_time,'Y-m-d'); - $bad_time = 9-11-2001 // Should Produce: 2001-09-11 - $better_time = nice_date($human,'Y-m-d'); + $bad_date = '199605'; + // Should Produce: 1996-05-01 + $better_date = nice_date($bad_date, 'Y-m-d'); + + $bad_date = '9-11-2001'; + // Should Produce: 2001-09-11 + $better_date = nice_date($bad_date, 'Y-m-d'); timespan() ========== Formats a unix timestamp so that is appears similar to this - :: 1 Year, 10 Months, 2 Weeks, 5 Days, 10 Hours, 16 Minutes -- cgit v1.2.3-24-g4f1b From 7540dede0f01acd7aa1ffd224defc5189305a815 Mon Sep 17 00:00:00 2001 From: Mat Whitney Date: Fri, 22 Jun 2012 12:02:10 -0700 Subject: Added optional fourth parameter to timezone_menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit allows setting one or more attributes on the generated select tag. This allows passing attributes needed for Section 508 compliance ยง 1194.22(n), such as an id. http://access-board.gov/sec508/guide/1194.22.htm#(n) http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels --- user_guide_src/source/helpers/date_helper.rst | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index b6dc2e934..ba079394d 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -115,7 +115,7 @@ Supported formats: local_to_gmt() ============== -Takes a Unix timestamp as input and returns it as GMT. +Takes a Unix timestamp as input and returns it as GMT. .. php:method:: local_to_gmt($time = '') @@ -159,7 +159,7 @@ Example mysql_to_unix() =============== -Takes a MySQL Timestamp as input and returns it as Unix. +Takes a MySQL Timestamp as input and returns it as Unix. .. php:method:: mysql_to_unix($time = '') @@ -212,7 +212,7 @@ human_to_unix() The opposite of the above function. Takes a "human" time as input and returns it as Unix. This function is useful if you accept "human" formatted dates submitted via a form. Returns FALSE (boolean) if the -date string passed to it is not formatted as indicated above. +date string passed to it is not formatted as indicated above. .. php:method:: human_to_unix($datestr = '') @@ -235,9 +235,9 @@ them into something useful. It also accepts well-formed dates. The function will return a Unix timestamp by default. You can, optionally, pass a format string (the same type as the PHP date function -accepts) as the second parameter. +accepts) as the second parameter. -.. php:method:: nice_date($bad_date = '', $format = FALSE) +.. php:method:: nice_date($bad_date = '', $format = FALSE) :param integer $bad_date: The terribly formatted date-like string :param string $format: Date format to return (same as php date function) @@ -265,10 +265,10 @@ Formats a unix timestamp so that is appears similar to this The first parameter must contain a Unix timestamp. The second parameter must contain a timestamp that is greater that the first timestamp. If -the second parameter empty, the current time will be used. The third -parameter is optional and limits the number of time units to display. -The most common purpose for this function is to show how much time has -elapsed from some point in time in the past to now. +the second parameter empty, the current time will be used. The third +parameter is optional and limits the number of time units to display. +The most common purpose for this function is to show how much time has +elapsed from some point in time in the past to now. .. php:method:: timespan($seconds = 1, $time = '', $units = '') @@ -293,7 +293,7 @@ days_in_month() =============== Returns the number of days in a given month/year. Takes leap years into -account. +account. .. php:method:: days_in_month($month = 0, $year = '') @@ -390,14 +390,15 @@ allowed to set their local timezone value. The first parameter lets you set the "selected" state of the menu. For example, to set Pacific time as the default you will do this -.. php:method:: timezone_menu($default = 'UTC', $class = "", $name = 'timezones') +.. php:method:: timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') :param string $default: timezone :param string $class: classname :param string $name: menu name + :param mixed $attributes: attributes :returns: string -Example: +Example: :: @@ -407,6 +408,8 @@ Please see the timezone reference below to see the values of this menu. The second parameter lets you set a CSS class name for the menu. +The fourth parameter lets you set one or more attributes on the generated select tag. + .. note:: The text contained in the menu is found in the following language file: `language//date_lang.php` -- cgit v1.2.3-24-g4f1b From ce79be0b5ffc9d5754c93771a8c289a252ec437b Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 25 Jun 2012 23:23:46 -0700 Subject: Fixing various Sphinx bugs and syntax errors in docs --- user_guide_src/source/helpers/date_helper.rst | 165 +++++++++----------------- 1 file changed, 58 insertions(+), 107 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index ba079394d..5adfb18d2 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -87,30 +87,20 @@ contain the date as a Unix timestamp. Supported formats: -+----------------+------------------------+-----------------------------------+ -| Constant | Description | Example | -+================+========================+===================================+ -| DATE_ATOM | Atom | 2005-08-15T16:13:03+0000 | -+----------------+------------------------+-----------------------------------+ -| DATE_COOKIE | HTTP Cookies | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_ISO8601 | ISO-8601 | 2005-08-14T16:13:03+00:00 | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC822 | RFC 822 | Sun, 14 Aug 05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC850 | RFC 850 | Sunday, 14-Aug-05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC1036 | RFC 1036 | Sunday, 14-Aug-05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC1123 | RFC 1123 | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC2822 | RFC 2822 | Sun, 14 Aug 2005 16:13:03 +0000 | -+----------------+------------------------+-----------------------------------+ -| DATE_RSS | RSS | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_W3C | W3C | 2005-08-14T16:13:03+0000 | -+----------------+------------------------+-----------------------------------+ - +=============== ======================= ====================================== +Constant Description Example +=============== ======================= ====================================== +DATE_ATOM Atom 2005-08-15T16:13:03+0000 +DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC +DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 +DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC +DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC +DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 +DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC +DATE_W3C W3C 2005-08-14T16:13:03+0000 +=============== ======================= ====================================== local_to_gmt() ============== @@ -421,86 +411,47 @@ The following table indicates each timezone and its location. Note some of the location lists have been abridged for clarity and formatting. -+------------+----------------------------------------------------------------+ -| Time Zone | Location | -+============+================================================================+ -| UM12 | (UTC - 12:00) Baker/Howland Island | -+------------+----------------------------------------------------------------+ -| UM11 | (UTC - 11:00) Samoa Time Zone, Niue | -+------------+----------------------------------------------------------------+ -| UM10 | (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands | -+------------+----------------------------------------------------------------+ -| UM95 | (UTC - 09:30) Marquesas Islands | -+------------+----------------------------------------------------------------+ -| UM9 | (UTC - 09:00) Alaska Standard Time, Gambier Islands | -+------------+----------------------------------------------------------------+ -| UM8 | (UTC - 08:00) Pacific Standard Time, Clipperton Island | -+------------+----------------------------------------------------------------+ -| UM7 | (UTC - 11:00) Mountain Standard Time | -+------------+----------------------------------------------------------------+ -| UM6 | (UTC - 06:00) Central Standard Time | -+------------+----------------------------------------------------------------+ -| UM5 | (UTC - 05:00) Eastern Standard Time, Western Caribbean | -+------------+----------------------------------------------------------------+ -| UM45 | (UTC - 04:30) Venezuelan Standard Time | -+------------+----------------------------------------------------------------+ -| UM4 | (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean | -+------------+----------------------------------------------------------------+ -| UM35 | (UTC - 03:30) Newfoundland Standard Time | -+------------+----------------------------------------------------------------+ -| UM3 | (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay | -+------------+----------------------------------------------------------------+ -| UM2 | (UTC - 02:00) South Georgia/South Sandwich Islands | -+------------+----------------------------------------------------------------+ -| UM1 | (UTC -1:00) Azores, Cape Verde Islands | -+------------+----------------------------------------------------------------+ -| UTC | (UTC) Greenwich Mean Time, Western European Time | -+------------+----------------------------------------------------------------+ -| UP1 | (UTC +1:00) Central European Time, West Africa Time | -+------------+----------------------------------------------------------------+ -| UP2 | (UTC +2:00) Central Africa Time, Eastern European Time | -+------------+----------------------------------------------------------------+ -| UP3 | (UTC +3:00) Moscow Time, East Africa Time | -+------------+----------------------------------------------------------------+ -| UP35 | (UTC +3:30) Iran Standard Time | -+------------+----------------------------------------------------------------+ -| UP4 | (UTC +4:00) Azerbaijan Standard Time, Samara Time | -+------------+----------------------------------------------------------------+ -| UP45 | (UTC +4:30) Afghanistan | -+------------+----------------------------------------------------------------+ -| UP5 | (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time | -+------------+----------------------------------------------------------------+ -| UP55 | (UTC +5:30) Indian Standard Time, Sri Lanka Time | -+------------+----------------------------------------------------------------+ -| UP575 | (UTC +5:45) Nepal Time | -+------------+----------------------------------------------------------------+ -| UP6 | (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time | -+------------+----------------------------------------------------------------+ -| UP65 | (UTC +6:30) Cocos Islands, Myanmar | -+------------+----------------------------------------------------------------+ -| UP7 | (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam| -+------------+----------------------------------------------------------------+ -| UP8 | (UTC +8:00) Australian Western Standard Time, Beijing Time | -+------------+----------------------------------------------------------------+ -| UP875 | (UTC +8:45) Australian Central Western Standard Time | -+------------+----------------------------------------------------------------+ -| UP9 | (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk | -+------------+----------------------------------------------------------------+ -| UP95 | (UTC +9:30) Australian Central Standard Time | -+------------+----------------------------------------------------------------+ -| UP10 | (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time| -+------------+----------------------------------------------------------------+ -| UP105 | (UTC +10:30) Lord Howe Island | -+------------+----------------------------------------------------------------+ -| UP11 | (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu | -+------------+----------------------------------------------------------------+ -| UP115 | (UTC +11:30) Norfolk Island | -+------------+----------------------------------------------------------------+ -| UP12 | (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand | -+------------+----------------------------------------------------------------+ -| UP1275 | (UTC +12:45) Chatham Islands Standard Time | -+------------+----------------------------------------------------------------+ -| UP13 | (UTC +13:00) Phoenix Islands Time, Tonga | -+------------+----------------------------------------------------------------+ -| UP14 | (UTC +14:00) Line Islands | -+------------+----------------------------------------------------------------+ +=========== ===================================================================== +Time Zone Location +=========== ===================================================================== +UM2 (UTC - 12:00) Baker/Howland Island +UM1 (UTC - 11:00) Samoa Time Zone, Niue +UM0 (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands +UM95 (UTC - 09:30) Marquesas Islands +UM9 (UTC - 09:00) Alaska Standard Time, Gambier Islands +UM8 (UTC - 08:00) Pacific Standard Time, Clipperton Island +UM7 (UTC - 11:00) Mountain Standard Time +UM6 (UTC - 06:00) Central Standard Time +UM5 (UTC - 05:00) Eastern Standard Time, Western Caribbean +UM45 (UTC - 04:30) Venezuelan Standard Time +UM4 (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean +UM35 (UTC - 03:30) Newfoundland Standard Time +UM3 (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay +UM2 (UTC - 02:00) South Georgia/South Sandwich Islands +UM (UTC -1:00) Azores, Cape Verde Islands +UTC (UTC) Greenwich Mean Time, Western European Time +UP1 (UTC +1:00) Central European Time, West Africa Time +UP2 (UTC +2:00) Central Africa Time, Eastern European Time +UP3 (UTC +3:00) Moscow Time, East Africa Time +UP35 (UTC +3:30) Iran Standard Time +UP4 (UTC +4:00) Azerbaijan Standard Time, Samara Time +UP45 (UTC +4:30) Afghanistan +UP5 (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time +UP55 (UTC +5:30) Indian Standard Time, Sri Lanka Time +UP575 (UTC +5:45) Nepal Time +UP6 (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time +UP65 (UTC +6:30) Cocos Islands, Myanmar +UP7 (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam +UP8 (UTC +8:00) Australian Western Standard Time, Beijing Time +UP875 (UTC +8:45) Australian Central Western Standard Time +UP9 (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk +UP95 (UTC +9:30) Australian Central Standard Time +UP10 (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time +UP105 (UTC +10:30) Lord Howe Island +UP11 (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu +UP115 (UTC +11:30) Norfolk Island +UP12 (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand +UP1275 (UTC +12:45) Chatham Islands Standard Time +UP1 (UTC +13:00) Phoenix Islands Time, Tonga +UP14 (UTC +14:00) Line Islands +=========== ===================================================================== \ No newline at end of file -- cgit v1.2.3-24-g4f1b From ac57033236d5b62ba553b6bea87623f0dbeb2f49 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Jul 2012 13:04:10 +0300 Subject: Deprecate Date helper standard_date() --- user_guide_src/source/helpers/date_helper.rst | 29 +++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 5adfb18d2..e332a913f 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -40,7 +40,7 @@ If a timezone is not provided, it will return time() based on "time_reference" s mdate() ======= -This function is identical to PHPs `date() `_ +This function is identical to PHP's `date() `_ function, except that it lets you use MySQL style date codes, where each code letter is preceded with a percent sign: %Y %m %d etc. @@ -85,21 +85,28 @@ Example The first parameter must contain the format, the second parameter must contain the date as a Unix timestamp. +.. note:: This function is DEPRECATED. Use the native ``date()`` combined + with `DateTime's format constants `_ + instead: + + | + | echo date(DATE_RFC822, time()); + Supported formats: =============== ======================= ====================================== Constant Description Example =============== ======================= ====================================== -DATE_ATOM Atom 2005-08-15T16:13:03+0000 -DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC -DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 -DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC -DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC -DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC -DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC -DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 -DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC -DATE_W3C W3C 2005-08-14T16:13:03+0000 +DATE_ATOM Atom 2005-08-15T16:13:03+0000 +DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC +DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 +DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC +DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC +DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 +DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC +DATE_W3C W3C 2005-08-14T16:13:03+0000 =============== ======================= ====================================== local_to_gmt() -- cgit v1.2.3-24-g4f1b From c60c2bd1ab70903ed3c1d12692aa5dd246f1c583 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 22:46:28 +0300 Subject: Remove an empty line --- user_guide_src/source/helpers/date_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index d0c72c3c4..9de925ba7 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -485,4 +485,4 @@ UP12 (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand UP1275 (UTC +12:45) Chatham Islands Standard Time UP1 (UTC +13:00) Phoenix Islands Time, Tonga UP14 (UTC +14:00) Line Islands -=========== ===================================================================== +=========== ===================================================================== \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 48a8675c3a50beba5a22080ea11050287b5866bb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 8 Nov 2012 15:16:34 +0200 Subject: Polish docs for Array, CAPTCHA, Cookie, Date, Directory and Download helpers --- user_guide_src/source/helpers/date_helper.rst | 339 ++++++++++++-------------- 1 file changed, 154 insertions(+), 185 deletions(-) (limited to 'user_guide_src/source/helpers/date_helper.rst') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 9de925ba7..3a3454edc 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -9,9 +9,7 @@ The Date Helper file contains functions that help you work with dates. Loading this Helper =================== -This helper is loaded using the following code - -:: +This helper is loaded using the following code:: $this->load->helper('date'); @@ -20,44 +18,45 @@ The following functions are available: now() ===== -Returns the current time as a Unix timestamp, referenced either to your -server's local time or any PHP suported timezone, based on the "time reference" -setting in your config file. If you do not intend to set your master time reference -to any other PHP suported timezone (which you'll typically do if you run a site that -lets each user set their own timezone settings) there is no benefit to using this -function over PHP's time() function. +.. php:function:: now($timezone = NULL) -.. php:method:: now($timezone = NULL) + :param string $timezone: Timezone + :returns: int - :param string $timezone: The timezone you want to be returned - :returns: integer +Returns the current time as a UNIX timestamp, referenced either to your server's +local time or any PHP suported timezone, based on the "time reference" setting +in your config file. If you do not intend to set your master time reference to +any other PHP supported timezone (which you'll typically do if you run a site +that lets each user set their own timezone settings) there is no benefit to using +this function over PHP's ``time()`` function. :: - echo now("Australia/Victoria"); -If a timezone is not provided, it will return time() based on "time_reference" setting. + echo now('Australia/Victoria'); + +If a timezone is not provided, it will return ``time()`` based on the +**time_reference** setting. mdate() ======= +.. php:function:: mdate($datestr = '', $time = '') + + :param string $datestr: Date string + :param int $time: UNIX timestamp + :returns: int + This function is identical to PHP's `date() `_ function, except that it lets you use MySQL style date codes, where each -code letter is preceded with a percent sign: %Y %m %d etc. +code letter is preceded with a percent sign, e.g. `%Y %m %d` The benefit of doing dates this way is that you don't have to worry about escaping any characters that are not date codes, as you would -normally have to do with the date() function. Example - -.. php:method:: mdate($datestr = '', $time = '') +normally have to do with the ``date()`` function. - :param string $datestr: Date String - :param integer $time: time - :returns: integer +Example:: - -:: - - $datestring = "Year: %Y Month: %m Day: %d - %h:%i %a"; + $datestring = 'Year: %Y Month: %m Day: %d - %h:%i %a'; $time = time(); echo mdate($datestring, $time); @@ -67,32 +66,30 @@ will be used. standard_date() =============== -Lets you generate a date string in one of several standardized formats. -Example +.. php:function:: standard_date($fmt = 'DATE_RFC822', $time = NULL) -.. php:method:: standard_date($fmt = 'DATE_RFC822', $time = '') + :param string $fmt: Date format + :param int $time: UNIX timestamp + :returns: string - :param string $fmt: the chosen format - :param string $time: Unix timestamp - :returns: string +Lets you generate a date string in one of several standardized formats. -:: +Example:: $format = 'DATE_RFC822'; $time = time(); echo standard_date($format, $time); -The first parameter must contain the format, the second parameter must -contain the date as a Unix timestamp. - -.. note:: This function is DEPRECATED. Use the native ``date()`` combined - with `DateTime's format constants `_ +.. note:: This function is DEPRECATED.Use the native ``date()`` combined with + `DateTime's format constants + `_ instead: | | echo date(DATE_RFC822, time()); -Supported formats: +Supported formats +----------------- =============== ======================= ====================================== Constant Description Example @@ -112,39 +109,34 @@ DATE_W3C W3C 2005-08-14T16:13:03+0000 local_to_gmt() ============== -Takes a Unix timestamp as input and returns it as GMT. +.. php:function:: local_to_gmt($time = '') -.. php:method:: local_to_gmt($time = '') + :param int $time: UNIX timestamp + :returns: string - :param integer $time: Unix timestamp - :returns: string +Takes a UNIX timestamp as input and returns it as GMT. -Example: +Example:: -:: - - $now = time(); - $gmt = local_to_gmt($now); + $gmt = local_to_gmt(time()); gmt_to_local() ============== -Takes a Unix timestamp (referenced to GMT) as input, and converts it to -a localized timestamp based on the timezone and Daylight Saving time -submitted. - -.. php:method:: gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE) +.. php:function:: gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE) - :param integer $time: Unix timestamp - :param string $timezone: timezone - :param boolean $dst: whether DST is active - :returns: integer + :param int $time: UNIX timestamp + :param string $timezone: Timezone + :param bool $dst: Whether DST is active + :returns: int -Example +Takes a UNIX timestamp (referenced to GMT) as input, and converts it to +a localized timestamp based on the timezone and Daylight Saving Time +submitted. -:: +Example:: - $timestamp = '1140153693'; + $timestamp = 1140153693; $timezone = 'UM8'; $daylight_saving = TRUE; echo gmt_to_local($timestamp, $timezone, $daylight_saving); @@ -152,40 +144,32 @@ Example .. note:: For a list of timezones see the reference at the bottom of this page. - mysql_to_unix() =============== -Takes a MySQL Timestamp as input and returns it as Unix. +.. php:function:: mysql_to_unix($time = '') -.. php:method:: mysql_to_unix($time = '') + :param int $time: UNIX timestamp + :returns: int - :param integer $time: Unix timestamp - :returns: integer - -Example +Takes a MySQL Timestamp as input and returns it as a UNIX timestamp. -:: +Example:: - $mysql = '20061124092345'; - $unix = mysql_to_unix($mysql); + $unix = mysql_to_unix('20061124092345'); unix_to_human() =============== -Takes a Unix timestamp as input and returns it in a human readable -format with this prototype +.. php:function:: unix_to_human($time = '', $seconds = FALSE, $fmt = 'us') -.. php:method:: unix_to_human($time = '', $seconds = FALSE, $fmt = 'us') - - :param integer $time: Unix timestamp - :param boolean $seconds: whether to show seconds - :param string $fmt: format: us or euro + :param int $time: UNIX timestamp + :param bool $seconds: Whether to show seconds + :param string $fmt: format (us or euro) :returns: integer -Example - -:: +Takes a UNIX timestamp as input and returns it in a human readable +format with this prototype:: YYYY-MM-DD HH:MM:SS AM/PM @@ -194,9 +178,9 @@ submission. The time can be formatted with or without seconds, and it can be set to European or US format. If only the timestamp is submitted it will return -the time without seconds formatted for the U.S. Examples +the time without seconds formatted for the U.S. -:: +Examples:: $now = time(); echo unix_to_human($now); // U.S. time, no seconds @@ -206,19 +190,17 @@ the time without seconds formatted for the U.S. Examples human_to_unix() =============== -The opposite of the above function. Takes a "human" time as input and -returns it as Unix. This function is useful if you accept "human" -formatted dates submitted via a form. Returns FALSE (boolean) if the -date string passed to it is not formatted as indicated above. +.. php:function:: human_to_unix($datestr = '') -.. php:method:: human_to_unix($datestr = '') - - :param integer $datestr: Date String - :returns: integer + :param int $datestr: Date string + :returns: int UNIX timestamp or FALSE on failure -Example: +The opposite of the :php:func:`unix_to_time()` function. Takes a "human" +time as input and returns it as a UNIX timestamp. This is useful if you +accept "human" formatted dates submitted via a form. Returns boolean FALSE +date string passed to it is not formatted as indicated above. -:: +Example:: $now = time(); $human = unix_to_human($now); @@ -227,22 +209,20 @@ Example: nice_date() =========== -This function can take a number poorly-formed date formats and convert -them into something useful. It also accepts well-formed dates. - -The function will return a Unix timestamp by default. You can, -optionally, pass a format string (the same type as the PHP date function -accepts) as the second parameter. +.. php:function:: nice_date($bad_date = '', $format = FALSE) -.. php:method:: nice_date($bad_date = '', $format = FALSE) + :param int $bad_date: The terribly formatted date-like string + :param string $format: Date format to return (same as PHP's ``date()`` function) + :returns: string - :param integer $bad_date: The terribly formatted date-like string - :param string $format: Date format to return (same as php date function) - :returns: string +This function can take a number poorly-formed date formats and convert +them into something useful. It also accepts well-formed dates. -Example +The function will return a UNIX timestamp by default. You can, optionally, +pass a format string (the same type as the PHP ``date()`` function accepts) +as the second parameter. -:: +Example:: $bad_date = '199605'; // Should Produce: 1996-05-01 @@ -255,28 +235,28 @@ Example timespan() ========== -Formats a unix timestamp so that is appears similar to this -:: +.. php:function:: timespan($seconds = 1, $time = '', $units = '') - 1 Year, 10 Months, 2 Weeks, 5 Days, 10 Hours, 16 Minutes + :param int $seconds: Number of seconds + :param string $time: UNIX timestamp + :param int $units: Number of time units to display + :returns: string -The first parameter must contain a Unix timestamp. The second parameter -must contain a timestamp that is greater that the first timestamp. If -the second parameter empty, the current time will be used. The third -parameter is optional and limits the number of time units to display. -The most common purpose for this function is to show how much time has -elapsed from some point in time in the past to now. +Formats a UNIX timestamp so that is appears similar to this:: -.. php:method:: timespan($seconds = 1, $time = '', $units = '') + 1 Year, 10 Months, 2 Weeks, 5 Days, 10 Hours, 16 Minutes - :param integer $seconds: a number of seconds - :param string $time: Unix timestamp - :param integer $units: a number of time units to display - :returns: string +The first parameter must contain a UNIX timestamp. +The second parameter must contain a timestamp that is greater that the +first timestamp. +The thirdparameter is optional and limits the number of time units to display. -Example +If the second parameter empty, the current time will be used. -:: +The most common purpose for this function is to show how much time has +elapsed from some point in time in the past to now. + +Example:: $post_date = '1079621429'; $now = time(); @@ -284,23 +264,21 @@ Example echo timespan($post_date, $now, $units); .. note:: The text generated by this function is found in the following language - file: language//date_lang.php + file: `language//date_lang.php` days_in_month() =============== -Returns the number of days in a given month/year. Takes leap years into -account. +.. php:function:: days_in_month($month = 0, $year = '') -.. php:method:: days_in_month($month = 0, $year = '') + :param int $month: a numeric month + :param int $year: a numeric year + :returns: int - :param integer $month: a numeric month - :param integer $year: a numeric year - :returns: integer - -Example +Returns the number of days in a given month/year. Takes leap years into +account. -:: +Example:: echo days_in_month(06, 2005); @@ -309,19 +287,17 @@ If the second parameter is empty, the current year will be used. date_range() ============ -Returns a list of dates within a specified period. - -.. php:method:: date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d') +.. php:function:: date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d') - :param integer $unix_start: UNIX timestamp of the range start date - :param integer $mixed: UNIX timestamp of the range end date or interval in days - :param boolean $is_unix: set to FALSE if $mixed is not a timestamp - :param string $format: output date format, same as in date() - :returns: array + :param int $unix_start: UNIX timestamp of the range start date + :param int $mixed: UNIX timestamp of the range end date or interval in days + :param bool $is_unix: set to FALSE if $mixed is not a timestamp + :param string $format: Output date format, same as in ``date()`` + :returns: array -Example +Returns a list of dates within a specified period. -:: +Example:: $range = date_range('2012-01-01', '2012-01-15'); echo "First 15 days of 2012:"; @@ -333,29 +309,34 @@ Example timezones() =========== +.. php:function:: timezones($tz = '') + + :param string $tz: a numeric timezone + :returns: string + Takes a timezone reference (for a list of valid timezones, see the "Timezone Reference" below) and returns the number of hours offset from UTC. -.. php:method:: timezones($tz = '') - - :param string $tz: a numeric timezone - :returns: string - -Example - -:: +Example:: echo timezones('UM5'); -This function is useful when used with `timezone_menu()`. +This function is useful when used with :php:func:`timezone_menu()`. timezone_menu() =============== -Generates a pull-down menu of timezones, like this one: +.. php:function:: timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') + :param string $default: Timezone + :param string $class: Class name + :param string $name: Menu name + :param mixed $attributes: HTML attributes + :returns: string + +Generates a pull-down menu of timezones, like this one: .. raw:: html @@ -409,19 +390,7 @@ This menu is useful if you run a membership site in which your users are allowed to set their local timezone value. The first parameter lets you set the "selected" state of the menu. For -example, to set Pacific time as the default you will do this - -.. php:method:: timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') - - :param string $default: timezone - :param string $class: classname - :param string $name: menu name - :param mixed $attributes: attributes - :returns: string - -Example: - -:: +example, to set Pacific time as the default you will do this:: echo timezone_menu('UM8'); @@ -445,37 +414,37 @@ Note some of the location lists have been abridged for clarity and formatting. =========== ===================================================================== Time Zone Location =========== ===================================================================== -UM2 (UTC - 12:00) Baker/Howland Island -UM1 (UTC - 11:00) Samoa Time Zone, Niue -UM0 (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands +UM2 (UTC - 12:00) Baker/Howland Island +UM1 (UTC - 11:00) Samoa Time Zone, Niue +UM0 (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands UM95 (UTC - 09:30) Marquesas Islands -UM9 (UTC - 09:00) Alaska Standard Time, Gambier Islands -UM8 (UTC - 08:00) Pacific Standard Time, Clipperton Island -UM7 (UTC - 11:00) Mountain Standard Time -UM6 (UTC - 06:00) Central Standard Time -UM5 (UTC - 05:00) Eastern Standard Time, Western Caribbean +UM9 (UTC - 09:00) Alaska Standard Time, Gambier Islands +UM8 (UTC - 08:00) Pacific Standard Time, Clipperton Island +UM7 (UTC - 11:00) Mountain Standard Time +UM6 (UTC - 06:00) Central Standard Time +UM5 (UTC - 05:00) Eastern Standard Time, Western Caribbean UM45 (UTC - 04:30) Venezuelan Standard Time -UM4 (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean +UM4 (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean UM35 (UTC - 03:30) Newfoundland Standard Time -UM3 (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay -UM2 (UTC - 02:00) South Georgia/South Sandwich Islands -UM (UTC -1:00) Azores, Cape Verde Islands -UTC (UTC) Greenwich Mean Time, Western European Time -UP1 (UTC +1:00) Central European Time, West Africa Time -UP2 (UTC +2:00) Central Africa Time, Eastern European Time -UP3 (UTC +3:00) Moscow Time, East Africa Time +UM3 (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay +UM2 (UTC - 02:00) South Georgia/South Sandwich Islands +UM (UTC -1:00) Azores, Cape Verde Islands +UTC (UTC) Greenwich Mean Time, Western European Time +UP1 (UTC +1:00) Central European Time, West Africa Time +UP2 (UTC +2:00) Central Africa Time, Eastern European Time +UP3 (UTC +3:00) Moscow Time, East Africa Time UP35 (UTC +3:30) Iran Standard Time -UP4 (UTC +4:00) Azerbaijan Standard Time, Samara Time +UP4 (UTC +4:00) Azerbaijan Standard Time, Samara Time UP45 (UTC +4:30) Afghanistan -UP5 (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time +UP5 (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time UP55 (UTC +5:30) Indian Standard Time, Sri Lanka Time UP575 (UTC +5:45) Nepal Time -UP6 (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time +UP6 (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time UP65 (UTC +6:30) Cocos Islands, Myanmar -UP7 (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam -UP8 (UTC +8:00) Australian Western Standard Time, Beijing Time +UP7 (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam +UP8 (UTC +8:00) Australian Western Standard Time, Beijing Time UP875 (UTC +8:45) Australian Central Western Standard Time -UP9 (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk +UP9 (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk UP95 (UTC +9:30) Australian Central Standard Time UP10 (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time UP105 (UTC +10:30) Lord Howe Island @@ -483,6 +452,6 @@ UP11 (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu UP115 (UTC +11:30) Norfolk Island UP12 (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand UP1275 (UTC +12:45) Chatham Islands Standard Time -UP1 (UTC +13:00) Phoenix Islands Time, Tonga +UP1 (UTC +13:00) Phoenix Islands Time, Tonga UP14 (UTC +14:00) Line Islands =========== ===================================================================== \ No newline at end of file -- cgit v1.2.3-24-g4f1b