translations : $(core_mo) $(plugin_mo)
+upgrade :
+ php scripts/upgrade.php
+
clean :
rm -f $(core_mo) $(plugin_mo)
"michelf/php-markdown": "^1.8.0",
"openid/php-openid": "^2.3",
"paragonie/constant_time_encoding": "^1.0.4",
+ "pear/console_getopt": "^1.4",
"phpseclib/phpseclib": "dev-master#f815e43077da67d3dd5b4d18a45753f5b79c1ab9",
"stomp-php/stomp-php": "^4.5.1"
},
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "443e1729de86d54a2d4e4707b15ad41d",
+ "content-hash": "f84a3a1654cf40103976cea8b2365b8c",
"packages": [
{
"name": "apereo/phpcas",
],
"time": "2019-01-03T20:59:08+00:00"
},
+ {
+ "name": "pear/console_getopt",
+ "version": "v1.4.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/pear/Console_Getopt.git",
+ "reference": "6c77aeb625b32bd752e89ee17972d103588b90c0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/6c77aeb625b32bd752e89ee17972d103588b90c0",
+ "reference": "6c77aeb625b32bd752e89ee17972d103588b90c0",
+ "shasum": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Console": "./"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ "./"
+ ],
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Greg Beaver",
+ "email": "cellog@php.net",
+ "role": "Helper"
+ },
+ {
+ "name": "Andrei Zmievski",
+ "email": "andrei@php.net",
+ "role": "Lead"
+ },
+ {
+ "name": "Stig Bakken",
+ "email": "stig@php.net",
+ "role": "Developer"
+ }
+ ],
+ "description": "More info available on: http://pear.php.net/package/Console_Getopt",
+ "time": "2019-02-06T16:52:33+00:00"
+ },
{
"name": "phpseclib/phpseclib",
"version": "dev-master",
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-/**
- * PHP Version 5
- *
- * Copyright (c) 1997-2004 The PHP Group
- *
- * This source file is subject to version 3.0 of the PHP license,
- * that is bundled with this package in the file LICENSE, and is
- * available through the world-wide-web at the following url:
- * http://www.php.net/license/3_0.txt.
- * If you did not receive a copy of the PHP license and are unable to
- * obtain it through the world-wide-web, please send a note to
- * license@php.net so we can mail you a copy immediately.
- *
- * @category Console
- * @package Console_Getopt
- * @author Andrei Zmievski <andrei@php.net>
- * @license http://www.php.net/license/3_0.txt PHP 3.0
- * @version CVS: $Id: Getopt.php 306067 2010-12-08 00:13:31Z dufuz $
- * @link http://pear.php.net/package/Console_Getopt
- */
-
-require_once 'PEAR.php';
-
-/**
- * Command-line options parsing class.
- *
- * @category Console
- * @package Console_Getopt
- * @author Andrei Zmievski <andrei@php.net>
- * @license http://www.php.net/license/3_0.txt PHP 3.0
- * @link http://pear.php.net/package/Console_Getopt
- */
-class Console_Getopt
-{
-
- /**
- * Parses the command-line options.
- *
- * The first parameter to this function should be the list of command-line
- * arguments without the leading reference to the running program.
- *
- * The second parameter is a string of allowed short options. Each of the
- * option letters can be followed by a colon ':' to specify that the option
- * requires an argument, or a double colon '::' to specify that the option
- * takes an optional argument.
- *
- * The third argument is an optional array of allowed long options. The
- * leading '--' should not be included in the option name. Options that
- * require an argument should be followed by '=', and options that take an
- * option argument should be followed by '=='.
- *
- * The return value is an array of two elements: the list of parsed
- * options and the list of non-option command-line arguments. Each entry in
- * the list of parsed options is a pair of elements - the first one
- * specifies the option, and the second one specifies the option argument,
- * if there was one.
- *
- * Long and short options can be mixed.
- *
- * Most of the semantics of this function are based on GNU getopt_long().
- *
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @return array two-element array containing the list of parsed options and
- * the non-option arguments
- * @access public
- */
- function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
- {
- return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
- }
-
- /**
- * This function expects $args to start with the script name (POSIX-style).
- * Preserved for backwards compatibility.
- *
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- *
- * @see getopt2()
- * @return array two-element array containing the list of parsed options and
- * the non-option arguments
- */
- function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
- {
- return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
- }
-
- /**
- * The actual implementation of the argument parsing code.
- *
- * @param int $version Version to use
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @return array
- */
- function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
- {
- // in case you pass directly readPHPArgv() as the first arg
- if (PEAR::isError($args)) {
- return $args;
- }
-
- if (empty($args)) {
- return array(array(), array());
- }
-
- $non_opts = $opts = array();
-
- settype($args, 'array');
-
- if ($long_options) {
- sort($long_options);
- }
-
- /*
- * Preserve backwards compatibility with callers that relied on
- * erroneous POSIX fix.
- */
- if ($version < 2) {
- if (isset($args[0]{0}) && $args[0]{0} != '-') {
- array_shift($args);
- }
- }
-
- reset($args);
- while (list($i, $arg) = each($args)) {
- /* The special element '--' means explicit end of
- options. Treat the rest of the arguments as non-options
- and end the loop. */
- if ($arg == '--') {
- $non_opts = array_merge($non_opts, array_slice($args, $i + 1));
- break;
- }
-
- if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-' && !$long_options)) {
- $non_opts = array_merge($non_opts, array_slice($args, $i));
- break;
- } elseif (strlen($arg) > 1 && $arg{1} == '-') {
- $error = Console_Getopt::_parseLongOption(substr($arg, 2),
- $long_options,
- $opts,
- $args,
- $skip_unknown);
- if (PEAR::isError($error)) {
- return $error;
- }
- } elseif ($arg == '-') {
- // - is stdin
- $non_opts = array_merge($non_opts, array_slice($args, $i));
- break;
- } else {
- $error = Console_Getopt::_parseShortOption(substr($arg, 1),
- $short_options,
- $opts,
- $args,
- $skip_unknown);
- if (PEAR::isError($error)) {
- return $error;
- }
- }
- }
-
- return array($opts, $non_opts);
- }
-
- /**
- * Parse short option
- *
- * @param string $arg Argument
- * @param string[] $short_options Available short options
- * @param string[][] &$opts
- * @param string[] &$args
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @access private
- * @return void
- */
- function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
- {
- for ($i = 0; $i < strlen($arg); $i++) {
- $opt = $arg{$i};
- $opt_arg = null;
-
- /* Try to find the short option in the specifier string. */
- if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':') {
- if ($skip_unknown === true) {
- break;
- }
-
- $msg = "Console_Getopt: unrecognized option -- $opt";
- return PEAR::raiseError($msg);
- }
-
- if (strlen($spec) > 1 && $spec{1} == ':') {
- if (strlen($spec) > 2 && $spec{2} == ':') {
- if ($i + 1 < strlen($arg)) {
- /* Option takes an optional argument. Use the remainder of
- the arg string if there is anything left. */
- $opts[] = array($opt, substr($arg, $i + 1));
- break;
- }
- } else {
- /* Option requires an argument. Use the remainder of the arg
- string if there is anything left. */
- if ($i + 1 < strlen($arg)) {
- $opts[] = array($opt, substr($arg, $i + 1));
- break;
- } else if (list(, $opt_arg) = each($args)) {
- /* Else use the next argument. */;
- if (Console_Getopt::_isShortOpt($opt_arg)
- || Console_Getopt::_isLongOpt($opt_arg)) {
- $msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt:" . $msg);
- }
- } else {
- $msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt:" . $msg);
- }
- }
- }
-
- $opts[] = array($opt, $opt_arg);
- }
- }
-
- /**
- * Checks if an argument is a short option
- *
- * @param string $arg Argument to check
- *
- * @access private
- * @return bool
- */
- function _isShortOpt($arg)
- {
- return strlen($arg) == 2 && $arg[0] == '-'
- && preg_match('/[a-zA-Z]/', $arg[1]);
- }
-
- /**
- * Checks if an argument is a long option
- *
- * @param string $arg Argument to check
- *
- * @access private
- * @return bool
- */
- function _isLongOpt($arg)
- {
- return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' &&
- preg_match('/[a-zA-Z]+$/', substr($arg, 2));
- }
-
- /**
- * Parse long option
- *
- * @param string $arg Argument
- * @param string[] $long_options Available long options
- * @param string[][] &$opts
- * @param string[] &$args
- *
- * @access private
- * @return void|PEAR_Error
- */
- function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
- {
- @list($opt, $opt_arg) = explode('=', $arg, 2);
-
- $opt_len = strlen($opt);
-
- for ($i = 0; $i < count($long_options); $i++) {
- $long_opt = $long_options[$i];
- $opt_start = substr($long_opt, 0, $opt_len);
-
- $long_opt_name = str_replace('=', '', $long_opt);
-
- /* Option doesn't match. Go on to the next one. */
- if ($long_opt_name != $opt) {
- continue;
- }
-
- $opt_rest = substr($long_opt, $opt_len);
-
- /* Check that the options uniquely matches one of the allowed
- options. */
- if ($i + 1 < count($long_options)) {
- $next_option_rest = substr($long_options[$i + 1], $opt_len);
- } else {
- $next_option_rest = '';
- }
-
- if ($opt_rest != '' && $opt{0} != '=' &&
- $i + 1 < count($long_options) &&
- $opt == substr($long_options[$i+1], 0, $opt_len) &&
- $next_option_rest != '' &&
- $next_option_rest{0} != '=') {
-
- $msg = "Console_Getopt: option --$opt is ambiguous";
- return PEAR::raiseError($msg);
- }
-
- if (substr($long_opt, -1) == '=') {
- if (substr($long_opt, -2) != '==') {
- /* Long option requires an argument.
- Take the next argument if one wasn't specified. */;
- if (!strlen($opt_arg) && !(list(, $opt_arg) = each($args))) {
- $msg = "Console_Getopt: option requires an argument --$opt";
- return PEAR::raiseError($msg);
- }
-
- if (Console_Getopt::_isShortOpt($opt_arg)
- || Console_Getopt::_isLongOpt($opt_arg)) {
- $msg = "Console_Getopt: option requires an argument --$opt";
- return PEAR::raiseError($msg);
- }
- }
- } else if ($opt_arg) {
- $msg = "Console_Getopt: option --$opt doesn't allow an argument";
- return PEAR::raiseError($msg);
- }
-
- $opts[] = array('--' . $opt, $opt_arg);
- return;
- }
-
- if ($skip_unknown === true) {
- return;
- }
-
- return PEAR::raiseError("Console_Getopt: unrecognized option --$opt");
- }
-
- /**
- * Safely read the $argv PHP array across different PHP configurations.
- * Will take care on register_globals and register_argc_argv ini directives
- *
- * @access public
- * @return mixed the $argv PHP array or PEAR error if not registered
- */
- function readPHPArgv()
- {
- global $argv;
- if (!is_array($argv)) {
- if (!@is_array($_SERVER['argv'])) {
- if (!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) {
- $msg = "Could not read cmd args (register_argc_argv=Off?)";
- return PEAR::raiseError("Console_Getopt: " . $msg);
- }
- return $GLOBALS['HTTP_SERVER_VARS']['argv'];
- }
- return $_SERVER['argv'];
- }
- return $argv;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
-
-// {{{ Header
-
-/**
- * Generic date handling class for PEAR
- *
- * Handles time zones and changes from local standard to local Summer
- * time (daylight-saving time) through the {@link Date_TimeZone} class.
- * Supports several operations from {@link Date_Calc} on Date objects.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 1997-2008 Baba Buehler, Pierre-Alain Joye, Firman
- * Wandayandi, C.A. Woodcock
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted under the terms of the BSD License.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @category Date and Time
- * @package Date
- * @author Baba Buehler <baba@babaz.com>
- * @author Pierre-Alain Joye <pajoye@php.net>
- * @author Firman Wandayandi <firman@php.net>
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright 1997-2007 Baba Buehler, Pierre-Alain Joye, Firman Wandayandi, C.A. Woodcock
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Date
- */
-
-
-// }}}
-// {{{ Error constants
-
-define('DATE_ERROR_INVALIDDATE', 1);
-define('DATE_ERROR_INVALIDTIME', 2);
-define('DATE_ERROR_INVALIDTIMEZONE', 3);
-define('DATE_ERROR_INVALIDDATEFORMAT', 4);
-define('DATE_ERROR_INVALIDFORMATSTRING', 5);
-
-
-// }}}
-// {{{ Includes
-
-require_once 'PEAR.php';
-
-/**
- * Load Date_TimeZone
- */
-require_once 'Date/TimeZone.php';
-
-/**
- * Load Date_Calc
- */
-require_once 'Date/Calc.php';
-
-/**
- * Load Date_Span
- */
-require_once 'Date/Span.php';
-
-
-// }}}
-// {{{ General constants
-
-/**
- * Whether to capture the micro-time (in microseconds) by default
- * in calls to {@link Date::setNow()}. Note that this makes a call to
- * {@link http://www.php.net/gettimeofday gettimeofday()}, which may
- * not work on all systems.
- *
- * @since Constant available since Release 1.5.0
- */
-define('DATE_CAPTURE_MICROTIME_BY_DEFAULT', false);
-
-/**
- * Whether to correct, by adding the local Summer time offset, the
- * specified time if it falls in the 'skipped hour' (encountered
- * when the clocks go forward).
- *
- * N.B. if specified as 'false', and if a time zone that adjusts
- * for Summer time is specified, then an object of this class will
- * be set to a semi-invalid state if an invalid time is set. That
- * is, an error will not be returned, unless the user then calls
- * a function, directly or indirectly, that accesses the time
- * part of the object. So, for example, if the user calls:
- *
- * <code>$date_object->formatLikeSQL('HH.MI.SS');</code>
- *
- * or:
- *
- * <code>$date_object->addSeconds(30);</code>
- *
- * an error will be returned if the time is invalid. However,
- * if the user calls:
- *
- * <code>$date_object->addDays(1);</code>
- *
- * for example, such that the time is no longer invalid, then the
- * object will no longer be in this invalid state. This behaviour
- * is intended to minimize unexpected errors when a user uses the
- * class to do addition with days only, and does not intend to
- * access the time.
- *
- * Of course, this constant will be unused if the user chooses to
- * work in UTC or a time zone without Summer time, in which case
- * this situation will never arise.
- *
- * This constant is set to 'true' by default for backwards-compatibility
- * reasons, however, you are recommended to set it to 'false'. Note that the
- * behaviour is not intended to match that of previous versions of the class
- * in terms of ignoring the Summer time offset when making calculations which
- * involve dates in both standard and Summer time - this was recognized as a
- * bug - but in terms of returning a PEAR error object when the user sets the
- * object to an invalid date (i.e. a time in the hour which is skipped when
- * the clocks go forwards, which in Europe would be a time such as 01.30).
- * Backwards compatibility here means that the behaviour is the same as it
- * used to be, less the bug.
- *
- * Note that this problem is not an issue for the user if any of these
- * conditions are satisfied:
- *
- * <ol>
- * <li>the user uses a time zone that does not observe Summer time, e.g. UTC</li>
- * <li>the user never accesses the time, that is, he never makes a call to
- * {@link Date::getHour()} or {@link Date::formatLikeStrftime()} using
- * format code '<b>%H</b>', for example, even if he sets the time to
- * something invalid</li>
- * <li>the user sets DATE_CORRECTINVALIDTIME_DEFAULT to true</li>
- * </ol>
- *
- * @since Constant available since Release 1.5.0
- * @see Date::isValidTime(), DATE_VALIDATE_DATE_BY_DEFAULT
- */
-define('DATE_CORRECTINVALIDTIME_DEFAULT', true);
-
-/**
- * Whether to validate dates (i.e. day/month/year, ignoring the time) by
- * disallowing invalid dates (e.g. 31st February) being set by the following
- * functions:
- *
- * - {@link Date::setYear()}
- * - {@link Date::setMonth()}
- * - {@link Date::setDay()}
- *
- * If the constant is set to 'true', then the date will be checked (by
- * default), and if invalid, an error will be returned with the Date object
- * left unmodified.
- *
- * This constant is set to 'false' by default for backwards-compatibility
- * reasons, however, you are recommended to set it to 'true'.
- *
- * Note that {@link Date::setHour()}, {@link Date::setMinute()},
- * {@link Date::setSecond()} and {@link Date::setPartSecond()}
- * allow an invalid date/time to be set regardless of the value of this
- * constant.
- *
- * @see Date::isValidDate(), Date::isValidTime(), Date::isNull(),
- * DATE_CORRECTINVALIDTIME_DEFAULT
- * @since Constant available since Release 1.5.0
- */
-define('DATE_VALIDATE_DATE_BY_DEFAULT', false);
-
-/**
- * Whether, by default, to accept times including leap seconds (i.e. '23.59.60')
- * when setting the date/time, and whether to count leap seconds in the
- * following functions:
- *
- * - {@link Date::addSeconds()}
- * - {@link Date::subtractSeconds()}
- * - {@link Date_Calc::addSeconds()}
- * - {@link Date::round()}
- * - {@link Date::roundSeconds()}
- *
- * This constant is set to 'false' by default for backwards-compatibility
- * reasons, however, you are recommended to set it to 'true'.
- *
- * Note that this constant does not affect {@link Date::addSpan()} and
- * {@link Date::subtractSpan()} which will not count leap seconds in any case.
- *
- * @since Constant available since Release 1.5.0
- */
-define('DATE_COUNT_LEAP_SECONDS', false);
-
-/**
- * Method to call when user invokes {@link Date::format()}
- *
- * @since Constant available since Release 1.5.1
- */
-define('DATE_FORMAT_METHOD', 'formatLikeStrftime');
-
-
-// }}}
-// {{{ Output format constants (used in {@link Date::getDate()})
-
-/**
- * "YYYY-MM-DD HH:MM:SS"
- */
-define('DATE_FORMAT_ISO', 1);
-
-/**
- * "YYYYMMDDTHHMMSS(Z|(+/-)HHMM)?"
- */
-define('DATE_FORMAT_ISO_BASIC', 2);
-
-/**
- * "YYYY-MM-DDTHH:MM:SS(Z|(+/-)HH:MM)?"
- */
-define('DATE_FORMAT_ISO_EXTENDED', 3);
-
-/**
- * "YYYY-MM-DDTHH:MM:SS(.S*)?(Z|(+/-)HH:MM)?"
- */
-define('DATE_FORMAT_ISO_EXTENDED_MICROTIME', 6);
-
-/**
- * "YYYYMMDDHHMMSS"
- */
-define('DATE_FORMAT_TIMESTAMP', 4);
-
-/**
- * long int, seconds since the unix epoch
- */
-define('DATE_FORMAT_UNIXTIME', 5);
-
-
-// }}}
-// {{{ Class: Date
-
-/**
- * Generic date handling class for PEAR
- *
- * Supports time zones with the Date_TimeZone class. Supports several
- * operations from Date_Calc on Date objects.
- *
- * Note to developers: the class stores the local time and date in the
- * local standard time. That is, it does not store the time as the
- * local Summer time when and if the time zone is in Summer time. It
- * is much easier to store local standard time and remember to offset
- * it when the user requests it.
- *
- * @category Date and Time
- * @package Date
- * @author Baba Buehler <baba@babaz.com>
- * @author Pierre-Alain Joye <pajoye@php.net>
- * @author Firman Wandayandi <firman@php.net>
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright 1997-2007 Baba Buehler, Pierre-Alain Joye, Firman Wandayandi, C.A. Woodcock
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version Release: 1.5.0a1
- * @link http://pear.php.net/package/Date
- */
-class Date
-{
-
- // {{{ Properties
-
- /**
- * The year
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $year;
-
- /**
- * The month
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $month;
-
- /**
- * The day
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $day;
-
- /**
- * The hour
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $hour;
-
- /**
- * The minute
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $minute;
-
- /**
- * The second
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $second;
-
- /**
- * The parts of a second
- *
- * @var float
- * @access private
- * @since Property available since Release 1.4.3
- */
- public $partsecond;
-
- /**
- * The year in local standard time
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_standardyear;
-
- /**
- * The month in local standard time
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_standardmonth;
-
- /**
- * The day in local standard time
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_standardday;
-
- /**
- * The hour in local standard time
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_standardhour;
-
- /**
- * The minute in local standard time
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_standardminute;
-
- /**
- * The second in local standard time
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_standardsecond;
-
- /**
- * The part-second in local standard time
- *
- * @var float
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_standardpartsecond;
-
- /**
- * Whether the object should accept and count leap seconds
- *
- * @var bool
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $ob_countleapseconds;
-
- /**
- * Whether the time is valid as a local time (an invalid time
- * is one that lies in the 'skipped hour' at the point that
- * the clocks go forward)
- *
- * @var bool
- * @access private
- * @see Date::isValidTime()
- * @since Property available since Release 1.5.0
- */
- public $ob_invalidtime = null;
-
- /**
- * Date_TimeZone object for this date
- *
- * @var object Date_TimeZone object
- * @access private
- * @since Property available since Release 1.0
- */
- public $tz;
-
- /**
- * Defines the default weekday abbreviation length
- *
- * Formerly used by {@link Date::formatLikeStrftime()}, but now
- * redundant - the abbreviation for the current locale of the machine
- * is used.
- *
- * @var int
- * @access private
- * @since Property available since Release 1.4.4
- */
- public $getWeekdayAbbrnameLength = 3;
-
-
- // }}}
- // {{{ Constructor
-
- /**
- * Constructor
- *
- * Creates a new Date Object initialized to the current date/time in the
- * system-default timezone by default. A date optionally
- * passed in may be in the ISO 8601, TIMESTAMP or UNIXTIME format,
- * or another Date object. If no date is passed, the current date/time
- * is used.
- *
- * If a date is passed and an exception is returned by {@link Date::setDate()}
- * there is nothing that this function can do, so for this reason, it
- * is advisable to pass no parameter and to make a separate call to
- * Date::setDate(). A date/time should only be passed if known to be a
- * valid ISO 8601 string or a valid Unix timestamp.
- *
- * @param mixed $date optional ISO 8601 date/time to initialize;
- * or, a Unix time stamp
- * @param bool $pb_countleapseconds whether to count leap seconds
- * (defaults to
- * {@link DATE_COUNT_LEAP_SECONDS})
- *
- * @return void
- * @access public
- * @see Date::setDate()
- */
- public function Date(
- $date = null,
- $pb_countleapseconds = DATE_COUNT_LEAP_SECONDS
- )
- {
- $this->ob_countleapseconds = $pb_countleapseconds;
-
- if (is_a($date, 'Date')) {
- $this->copy($date);
- } else {
- if (!is_null($date)) {
- // 'setDate()' expects a time zone to be already set:
- //
- $this->_setTZToDefault();
- $this->setDate($date);
- } else {
- $this->setNow();
- }
- }
- }
-
-
- // }}}
- // {{{ copy()
-
- /**
- * Copy values from another Date object
- *
- * Makes this Date a copy of another Date object. This is a
- * PHP4-compatible implementation of {@link Date::__clone()} in PHP5.
- *
- * @param object $date Date object to copy
- *
- * @return void
- * @access public
- */
- public function copy($date)
- {
- $this->year = $date->year;
- $this->month = $date->month;
- $this->day = $date->day;
- $this->hour = $date->hour;
- $this->minute = $date->minute;
- $this->second = $date->second;
- $this->partsecond = $date->partsecond;
-
- $this->on_standardyear = $date->on_standardyear;
- $this->on_standardmonth = $date->on_standardmonth;
- $this->on_standardday = $date->on_standardday;
- $this->on_standardhour = $date->on_standardhour;
- $this->on_standardminute = $date->on_standardminute;
- $this->on_standardsecond = $date->on_standardsecond;
- $this->on_standardpartsecond = $date->on_standardpartsecond;
-
- $this->ob_countleapseconds = $date->ob_countleapseconds;
- $this->ob_invalidtime = $date->ob_invalidtime;
-
- $this->tz = new Date_TimeZone($date->getTZID());
-
- $this->getWeekdayAbbrnameLength = $date->getWeekdayAbbrnameLength;
- }
-
-
- // }}}
- // {{{ __clone()
-
- /**
- * Copy values from another Date object
- *
- * Makes this Date a copy of another Date object. For PHP5
- * only.
- *
- * @return void
- * @access public
- * @see Date::copy()
- */
- public function __clone()
- {
- // This line of code would be preferable, but will only
- // compile in PHP5:
- //
- // $this->tz = clone $this->tz;
-
- $this->tz = new Date_TimeZone($this->getTZID());
- }
-
-
- // }}}
- // {{{ isNull()
-
- /**
- * Returns whether the object is null (i.e. no date has been set)
- *
- * If the object is set to an invalid date, then this function will
- * still return 'false'. To check whether the date is valid use
- * either {@link Date::isValidDate()} (to check the day/month/year
- * part of the object only) or {@link Date::isValidTime()} (to check
- * the time, in addition to the day/month/year part).
- *
- * @return bool
- * @access public
- * @see Date::setDate(), Date::isValidDate(), Date::isValidTime()
- * @since Method available since Release 1.5.0
- */
- public function isNull()
- {
- return is_null($this->year);
- }
-
-
- // }}}
- // {{{ isValidDate()
-
- /**
- * Returns whether the date (i.e. day/month/year) is valid
- *
- * It is not possible to set the object to an invalid date using
- * {@link Date::setDate()}, but it is possible to do so using the
- * following functions:
- *
- * - {@link Date::setYear()}
- * - {@link Date::setMonth()}
- * - {@link Date::setDay()}
- *
- * However you can prevent this possibility (by default) by setting
- * {@link DATE_VALIDATE_DATE_BY_DEFAULT} to 'true', in which case
- * these three functions will return an error if they specify an
- * invalid date, and the object will be unmodified.
- *
- * Note that this function only checks the day/month/year part of
- * the object. Even if this is valid, it is still possible for the
- * time to be invalid (see {@link DATE_CORRECTINVALIDTIME_DEFAULT}).
- * To check the time as well, use {@link Date::isValidTime()}.
- *
- * @return bool
- * @access public
- * @see Date::setDate(), Date::isNull(), Date::isValidTime()
- * @since Method available since Release 1.5.0
- */
- public function isValidDate()
- {
- return
- !Date::isNull() &&
- Date_Calc::isValidDate($this->year, $this->month, $this->day);
- }
-
-
- // }}}
- // {{{ setDate()
-
- /**
- * Sets the date/time of the object based on the input date and format
- *
- * Accepts a string in three possible formats, and in this order of
- * precedence:
- *
- * - ISO 8601 date (see {@link http://en.wikipedia.org/wiki/ISO_8601})
- * - Time-Stamp (i.e. 'YYYYMMDDHHMMSS')
- * - Unix time-stamp (see {@link http://en.wikipedia.org/wiki/Unix_time})
- *
- * Note that if you want to pass a Unix time-stamp then you need to set
- * the $format parameter to {@link DATE_FORMAT_UNIXTIME}, or else use the
- * method {@link Date::setFromTime()}.
- *
- * The input string should be a date/time representation in one of the
- * following general formats:
- *
- * - <b><date>T<time><time-zone></b>
- * - <b><date> <time><time-zone></b> (non-ISO-standard)
- * - <b><date><time><time-zone></b> (non-ISO-standard)
- * - <b><date>T<time></b> i.e. without optional <time-zone> representation
- * - <b><date> <time></b>
- * - <b><date><time></b>
- * - <b><date></b> i.e. without optional <time> representation
- *
- * that is, the representation must be comprised of a <b><date></b> part,
- * with an optional <b><time></b> part, which itself may include an optional
- * <time-zone> part, each of which may consist of any one of the permitted
- * formats detailed below. The <b><date></b> and <b><time</b> representations
- * should be divided with the time designator <b>T</b> according to the ISO 8601
- * standard, although this method also permits representations divided by a
- * space, or by no delimiter at all.
- *
- * The <b><date></b> representation should be in one of the following formats:
- *
- * - <b>Calendar date</b>: <b>YYYY-MM-DD</b> (extended format) or
- * <b>YYYYMMDD</b> (basic format), where [YYYY]
- * indicates the four-digit year (0000-9999), [MM]
- * indicates the month (01-12) and [DD] indicates the
- * day of the month [01-31]
- * - <b>ISO week date</b>: <b>YYYY-Www-D</b> (extended format) or
- * <b>YYYYWwwD</b> (basic format), where [YYYY]
- * indicates the ISO year (slightly different from the
- * calendar year (see below)), [Www] indicates the ISO
- * week no prefixed by the letter 'W' (W01-W53) and
- * [D] indicates the ISO week-day (1-7), beginning on
- * Monday and ending on Sunday. (Also see
- * {@link http://en.wikipedia.org/wiki/ISO_week_date}.)
- * - <b>Ordinal date</b>: <b>YYYY-DDD</b> (extended format) or
- * <b>YYYYDDD</b> (basic format), where [YYYY]
- * indicates the four-digit year (0000-9999) and [DDD]
- * indicates the day of the year (001-366)
- *
- * The <b><time></b> representation should be in one of the following formats:
- *
- * - <b>hh:mm:ss</b> (extended format) or <b>hhmmss</b> (basic format)
- * - <b>hh:mm</b> (extended format) or <b>hhmm</b> (basic format)
- * - <b>hh</b> (extended format) or <b>hh</b> (basic format)
- *
- * where [hh] represents the hour (00-24), [mm] represents the minute (00-59)
- * and [ss] represents the second (00-60)
- *
- * Format parameter should be one of the specified DATE_FORMAT_* constants:
- *
- * - <b>{@link DATE_FORMAT_ISO}</b> - 'YYYY-MM-DD HH:MI:SS'
- * - <b>{@link DATE_FORMAT_ISO_BASIC}</b> - 'YYYYMMDDTHHMMSS(Z|(+/-)HHMM)?'
- * - <b>{@link DATE_FORMAT_ISO_EXTENDED}</b> - 'YYYY-MM-DDTHH:MM:SS(Z|(+/-)HH:MM)?'
- * - <b>{@link DATE_FORMAT_ISO_EXTENDED_MICROTIME}</b> - 'YYYY-MM-DDTHH:MM:SS(.S*)?(Z|(+/-)HH:MM)?'
- * - <b>{@link DATE_FORMAT_TIMESTAMP}</b> - 'YYYYMMDDHHMMSS'
- * - <b>{@link DATE_FORMAT_UNIXTIME}</b> - long integer of the no of seconds since
- * the Unix Epoch
- * (1st January 1970 00.00.00 GMT)
- *
- * @param string $date input date
- * @param int $format optional format constant
- * (DATE_FORMAT_*) of the input date.
- * This parameter is not needed,
- * except to force the setting of the
- * date from a Unix time-stamp (for
- * which use
- * {@link DATE_FORMAT_UNIXTIME}).
- * (Defaults to
- * {@link DATE_FORMAT_ISO}.)
- * @param bool $pb_repeatedhourdefault value to return if repeated
- * hour is specified (defaults
- * to false)
- *
- * @return void
- * @access public
- * @see Date::isNull(), Date::isValidDate(), Date::isValidTime(),
- * Date::setFromTime()
- */
- public function setDate(
- $date,
- $format = DATE_FORMAT_ISO,
- $pb_repeatedhourdefault = false
- )
- {
- if ($format == DATE_FORMAT_UNIXTIME) {
- if (is_numeric($date)) {
- // Assume Unix time-stamp:
- //
- $this->setFromTime((int)$date);
- } else {
- return PEAR::raiseError("'$date' not valid Unix time-stamp");
- }
- } elseif (preg_match('/^([0-9]{4,4})-?(' .
- '(0[1-9]|1[0-2])-?(0[1-9]|[12][0-9]|3[01])|' . // [mm]-[dd]
- 'W(0[1-9]|[1-4][0-9]|5[0-3])-?([1-7])|' . // ISO week date
- '(0(0[1-9]|[1-9][0-9])|[12][0-9]{2,2}|3([0-5][0-9]|6[1-6]))' . // [ddd]
- ')([T\s]?' .
- '([01][0-9]|2[0-3])(:?' . // [hh]
- '([0-5][0-9])(:?' . // [mm]
- '([0-5][0-9]|60)([,.][0-9]+)?)?)?' . // [ss]
- '(Z|[+\-][0-9]{2,2}(:?[0-5][0-9])?)?)?$/i', // offset
- $date, $regs)
- ) {
- if (substr($regs[2], 0, 1) == "W") {
- // ISO week date (YYYY-Www-D)
- //
-
- $hs_date = Date_Calc::isoWeekToDate(
- $regs[6],
- $regs[5],
- $regs[1],
- "%Y %m %d"
- );
- if (PEAR::isError($hs_date)) {
- return $hs_date;
- }
-
- list($hs_year, $hs_month, $hs_day) = explode(" ", $hs_date);
- } elseif (strlen($regs[2]) == 3) {
- // ISO ordinal date (YYYY-DDD)
- //
-
- $hn_jd = Date_Calc::firstDayOfYear($regs[1]) + $regs[2] - 1;
- list($hs_year, $hs_month, $hs_day) =
- explode(" ", Date_Calc::daysToDate($hn_jd, "%Y %m %d"));
- } else {
- // ISO calendar date (YYYY-MM-DD)
- //
- // DATE_FORMAT_ISO, ISO_BASIC, ISO_EXTENDED, and TIMESTAMP
- // These formats are extremely close to each other. This regex
- // is very loose and accepts almost any butchered format you could
- // throw at it. e.g. 2003-10-07 19:45:15 and 2003-10071945:15
- // are the same thing in the eyes of this regex, even though the
- // latter is not a valid ISO 8601 date.
- //
-
- $hs_year = $regs[1];
- $hs_month = $regs[3];
- $hs_day = $regs[4];
-
- if (!Date_Calc::isValidDate($hs_day, $hs_month, $hs_year)) {
- return PEAR::raiseError(
- "'" .
- Date_Calc::dateFormat(
- $hs_year,
- $hs_month,
- $hs_day,
- "%Y-%m-%d"
- ) .
- "' is invalid calendar date",
- DATE_ERROR_INVALIDDATE
- );
- }
- }
-
- if (isset($regs[17])) {
- if ($regs[17] == "Z") {
- $this->tz = new Date_TimeZone("UTC");
- } else {
- $this->tz = new Date_TimeZone("UTC" . $regs[17]);
- }
- }
-
- $this->setLocalTime(
- $hs_day,
- $hs_month,
- $hs_year,
- isset($regs[11]) && $regs[11] != "" ?
- $regs[11] : 0,
- isset($regs[13]) && $regs[13] != "" ?
- $regs[13] : 0,
- isset($regs[15]) && $regs[15] != "" ?
- $regs[15] : 0,
- isset($regs[16]) && $regs[16] != "" ?
- $regs[16] : 0.0,
- $pb_repeatedhourdefault
- );
- } else {
- return PEAR::raiseError(
- "Date '$date' not in ISO 8601 format",
- DATE_ERROR_INVALIDDATEFORMAT
- );
- }
- }
-
-
- // }}}
- // {{{ setNow()
-
- /**
- * Sets to local current time and time zone
- *
- * @param bool $pb_setmicrotime whether to set micro-time (defaults to the
- * value of the constant
- * {@link DATE_CAPTURE_MICROTIME_BY_DEFAULT})
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function setNow($pb_setmicrotime = DATE_CAPTURE_MICROTIME_BY_DEFAULT)
- {
- $this->_setTZToDefault();
-
- if ($pb_setmicrotime) {
- $ha_unixtime = gettimeofday();
- } else {
- $ha_unixtime = array("sec" => time());
- }
-
- $this->setDate(date("Y-m-d H:i:s", $ha_unixtime["sec"]) .
- (isset($ha_unixtime["usec"]) ?
- "." . sprintf("%06d", $ha_unixtime["usec"]) :
- ""));
- }
-
-
- // }}}
- // {{{ round()
-
- /**
- * Rounds the date according to the specified precision (defaults
- * to nearest day)
- *
- * The precision parameter must be one of the following constants:
- *
- * - <b>{@link DATE_PRECISION_YEAR}</b>
- * - <b>{@link DATE_PRECISION_MONTH}</b>
- * - <b>{@link DATE_PRECISION_DAY}</b> (default)
- * - <b>{@link DATE_PRECISION_HOUR}</b>
- * - <b>{@link DATE_PRECISION_10MINUTES}</b>
- * - <b>{@link DATE_PRECISION_MINUTE}</b>
- * - <b>{@link DATE_PRECISION_10SECONDS}</b>
- * - <b>{@link DATE_PRECISION_SECOND}</b>
- *
- * The precision can also be specified as an integral offset from
- * one of these constants, where the offset reflects a precision
- * of 10 to the power of the offset greater than the constant.
- * For example:
- *
- * - <b>(DATE_PRECISION_YEAR - 1)</b> - rounds the date to the nearest 10 years
- * - <b>(DATE_PRECISION_YEAR - 3)</b> - rounds the date to the nearest 1000
- * years
- * - <b>(DATE_PRECISION_SECOND + 1)</b> - rounds the date to 1 decimal
- * point of a second
- * - <b>(DATE_PRECISION_SECOND + 3)</b> - rounds the date to 3 decimal
- * points of a second
- * - <b>(DATE_PRECISION_SECOND - 1)</b> - rounds the date to the nearest 10
- * seconds (thus it is equivalent to
- * <b>DATE_PRECISION_10SECONDS</b>)
- *
- * @param int $pn_precision a 'DATE_PRECISION_*' constant (defaults to
- * {@link DATE_PRECISION_DAY})
- * @param bool $pb_correctinvalidtime whether to correct, by adding the
- * local Summer time offset, the rounded
- * time if it falls in the skipped hour
- * (defaults to
- * {@link DATE_CORRECTINVALIDTIME_DEFAULT})
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function round(
- $pn_precision = DATE_PRECISION_DAY,
- $pb_correctinvalidtime = DATE_CORRECTINVALIDTIME_DEFAULT
- )
- {
- if ($pn_precision <= DATE_PRECISION_DAY) {
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute,
- $hn_secondraw) =
- Date_Calc::round(
- $pn_precision,
- $this->day,
- $this->month,
- $this->year,
- $this->hour,
- $this->minute,
- $this->partsecond == 0.0 ?
- $this->second :
- $this->second + $this->partsecond,
- $this->ob_countleapseconds
- );
- if (is_float($hn_secondraw)) {
- $hn_second = intval($hn_secondraw);
- $hn_partsecond = $hn_secondraw - $hn_second;
- } else {
- $hn_second = $hn_secondraw;
- $hn_partsecond = 0.0;
- }
-
- $this->setLocalTime(
- $hn_day,
- $hn_month,
- $hn_year,
- $hn_hour,
- $hn_minute,
- $hn_second,
- $hn_partsecond,
- true, // This is unlikely anyway, but the
- // day starts with the repeated hour
- // the first time around
- $pb_correctinvalidtime
- );
- return;
- }
-
- // ($pn_precision >= DATE_PRECISION_HOUR)
- //
- if ($this->tz->getDSTSavings() % 3600000 == 0 ||
- ($this->tz->getDSTSavings() % 60000 == 0 &&
- $pn_precision >= DATE_PRECISION_MINUTE)
- ) {
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute,
- $hn_secondraw) =
- Date_Calc::round(
- $pn_precision,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardpartsecond == 0.0 ?
- $this->on_standardsecond :
- $this->on_standardsecond +
- $this->on_standardpartsecond,
- $this->ob_countleapseconds
- );
- if (is_float($hn_secondraw)) {
- $hn_second = intval($hn_secondraw);
- $hn_partsecond = $hn_secondraw - $hn_second;
- } else {
- $hn_second = $hn_secondraw;
- $hn_partsecond = 0.0;
- }
-
- $this->setStandardTime(
- $hn_day,
- $hn_month,
- $hn_year,
- $hn_hour,
- $hn_minute,
- $hn_second,
- $hn_partsecond
- );
- return;
- }
-
- // Very unlikely anyway (as I write, the only time zone like this
- // is Lord Howe Island in Australia (offset of half an hour)):
- //
- // (This algorithm could be better)
- //
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute,
- $hn_secondraw) =
- Date_Calc::round(
- $pn_precision,
- $this->day,
- $this->month,
- $this->year,
- $this->hour,
- $this->minute,
- $this->partsecond == 0.0 ?
- $this->second :
- $this->second + $this->partsecond,
- $this->ob_countleapseconds
- );
- if (is_float($hn_secondraw)) {
- $hn_second = intval($hn_secondraw);
- $hn_partsecond = $hn_secondraw - $hn_second;
- } else {
- $hn_second = $hn_secondraw;
- $hn_partsecond = 0.0;
- }
-
- $this->setLocalTime(
- $hn_day,
- $hn_month,
- $hn_year,
- $hn_hour,
- $hn_minute,
- $hn_second,
- $hn_partsecond,
- false, // This will be right half the time
- $pb_correctinvalidtime
- ); // This will be right
- // some of the time
- // (depends on Summer
- // time offset)
- }
-
-
- // }}}
- // {{{ roundSeconds()
-
- /**
- * Rounds seconds up or down to the nearest specified unit
- *
- * N.B. this function is equivalent to calling:
- *
- * <code>$date_object->round(DATE_PRECISION_SECOND + $pn_precision);</code>
- *
- * @param int $pn_precision number of digits after the decimal point
- * @param bool $pb_correctinvalidtime whether to correct, by adding the
- * local Summer time offset, the rounded
- * time if it falls in the skipped hour
- * (defaults to
- * {@link DATE_CORRECTINVALIDTIME_DEFAULT})
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function roundSeconds(
- $pn_precision = 0,
- $pb_correctinvalidtime = DATE_CORRECTINVALIDTIME_DEFAULT
- )
- {
- $this->round(
- DATE_PRECISION_SECOND + $pn_precision,
- $pb_correctinvalidtime
- );
- }
-
-
- // }}}
- // {{{ trunc()
-
- /**
- * Truncates the date according to the specified precision (by
- * default, it truncates the time part of the date)
- *
- * The precision parameter must be one of the following constants:
- *
- * - {@link DATE_PRECISION_YEAR}
- * - {@link DATE_PRECISION_MONTH}
- * - {@link DATE_PRECISION_DAY} (default)
- * - {@link DATE_PRECISION_HOUR}
- * - {@link DATE_PRECISION_10MINUTES}
- * - {@link DATE_PRECISION_MINUTE}
- * - {@link DATE_PRECISION_10SECONDS}
- * - {@link DATE_PRECISION_SECOND}
- *
- * The precision can also be specified as an integral offset from
- * one of these constants, where the offset reflects a precision
- * of 10 to the power of the offset greater than the constant.
- * For example:
- *
- * - <b>DATE_PRECISION_YEAR</b> - truncates the month, day and time
- * part of the year
- * - <b>(DATE_PRECISION_YEAR - 1)</b> - truncates the unit part of the
- * year, e.g. 1987 becomes 1980
- * - <b>(DATE_PRECISION_YEAR - 3)</b> - truncates the hundreds part of the
- * year, e.g. 1987 becomes 1000
- * - <b>(DATE_PRECISION_SECOND + 1)</b> - truncates the part of the second
- * less than 0.1 of a second, e.g.
- * 3.26301 becomes 3.2 seconds
- * - <b>(DATE_PRECISION_SECOND + 3)</b> - truncates the part of the second
- * less than 0.001 of a second, e.g.
- * 3.26301 becomes 3.263 seconds
- * - <b>(DATE_PRECISION_SECOND - 1)</b> - truncates the unit part of the
- * seconds (thus it is equivalent to
- * <b>DATE_PRECISION_10SECONDS</b>)
- *
- * @param int $pn_precision a 'DATE_PRECISION_*' constant (defaults
- * to {@link DATE_PRECISION_DAY})
- * @param bool $pb_correctinvalidtime whether to correct, by adding the
- * local Summer time offset, the
- * truncated time if it falls in the
- * skipped hour (defaults to
- * {@link DATE_CORRECTINVALIDTIME_DEFAULT})
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function trunc(
- $pn_precision = DATE_PRECISION_DAY,
- $pb_correctinvalidtime = DATE_CORRECTINVALIDTIME_DEFAULT
- )
- {
- if ($pn_precision <= DATE_PRECISION_DAY) {
- if ($pn_precision <= DATE_PRECISION_YEAR) {
- $hn_month = 0;
- $hn_day = 0;
- $hn_hour = 0;
- $hn_minute = 0;
- $hn_second = 0;
- $hn_partsecond = 0.0;
-
- $hn_invprecision = DATE_PRECISION_YEAR - $pn_precision;
- if ($hn_invprecision > 0) {
- $hn_year = intval($this->year / pow(10, $hn_invprecision)) *
- pow(10, $hn_invprecision);
- //
- // (Conversion to int necessary for PHP <= 4.0.6)
- } else {
- $hn_year = $this->year;
- }
- } elseif ($pn_precision == DATE_PRECISION_MONTH) {
- $hn_year = $this->year;
- $hn_month = $this->month;
- $hn_day = 0;
- $hn_hour = 0;
- $hn_minute = 0;
- $hn_second = 0;
- $hn_partsecond = 0.0;
- } elseif ($pn_precision == DATE_PRECISION_DAY) {
- $hn_year = $this->year;
- $hn_month = $this->month;
- $hn_day = $this->day;
- $hn_hour = 0;
- $hn_minute = 0;
- $hn_second = 0;
- $hn_partsecond = 0.0;
- }
-
- $this->setLocalTime(
- $hn_day,
- $hn_month,
- $hn_year,
- $hn_hour,
- $hn_minute,
- $hn_second,
- $hn_partsecond,
- true, // This is unlikely anyway, but the
- // day starts with the repeated
- // hour the first time around
- $pb_correctinvalidtime
- );
- return;
- }
-
- // Precision is at least equal to DATE_PRECISION_HOUR
- //
- if ($pn_precision == DATE_PRECISION_HOUR) {
- $this->addSeconds($this->partsecond == 0.0 ?
- -$this->second :
- -$this->second - $this->partsecond);
- //
- // (leap seconds irrelevant)
-
- $this->addMinutes(-$this->minute);
- } elseif ($pn_precision <= DATE_PRECISION_MINUTE) {
- if ($pn_precision == DATE_PRECISION_10MINUTES) {
- $this->addMinutes(-$this->minute % 10);
- }
-
- $this->addSeconds($this->partsecond == 0.0 ?
- -$this->second :
- -$this->second - $this->partsecond);
- //
- // (leap seconds irrelevant)
- } elseif ($pn_precision == DATE_PRECISION_10SECONDS) {
- $this->addSeconds($this->partsecond == 0.0 ?
- -$this->second % 10 :
- (-$this->second % 10) - $this->partsecond);
- //
- // (leap seconds irrelevant)
- } else {
- // Assume Summer time offset cannot be composed of part-seconds:
- //
- $hn_precision = $pn_precision - DATE_PRECISION_SECOND;
- $hn_partsecond = intval($this->on_standardpartsecond *
- pow(10, $hn_precision)) /
- pow(10, $hn_precision);
- $this->setStandardTime(
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardsecond,
- $hn_partsecond
- );
- }
- }
-
-
- // }}}
- // {{{ truncSeconds()
-
- /**
- * Truncates seconds according to the specified precision
- *
- * N.B. this function is equivalent to calling:
- *
- * <code>
- * $date_object->trunc(DATE_PRECISION_SECOND + $pn_precision);
- * </code>
- *
- * @param int $pn_precision number of digits after the decimal point
- * @param bool $pb_correctinvalidtime whether to correct, by adding the
- * local Summer time offset, the
- * truncated time if it falls in the
- * skipped hour (defaults to
- * {@link DATE_CORRECTINVALIDTIME_DEFAULT})
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function truncSeconds(
- $pn_precision = 0,
- $pb_correctinvalidtime = DATE_CORRECTINVALIDTIME_DEFAULT
- )
- {
- $this->trunc(
- DATE_PRECISION_SECOND + $pn_precision,
- $pb_correctinvalidtime
- );
- }
-
-
- // }}}
- // {{{ getDate()
-
- /**
- * Gets a string (or other) representation of this date
- *
- * Returns a date in the format specified by the DATE_FORMAT_* constants,
- * which should be one of the following:
- *
- * - {@link DATE_FORMAT_ISO} (default)
- * - {@link DATE_FORMAT_ISO_BASIC}
- * - {@link DATE_FORMAT_ISO_EXTENDED}
- * - {@link DATE_FORMAT_ISO_EXTENDED_MICROTIME}
- * - {@link DATE_FORMAT_TIMESTAMP}
- * - {@link DATE_FORMAT_UNIXTIME}
- *
- * @param int $format format constant (DATE_FORMAT_*) of the output date
- *
- * @return string the date in the requested format (defaults to
- * {@link DATE_FORMAT_ISO})
- * @access public
- */
- public function getDate($format = DATE_FORMAT_ISO)
- {
- $ret;
- switch ($format) {
- case DATE_FORMAT_ISO:
- $ret = $this->formatLikeStrftime("%Y-%m-%d %T");
- break;
- case DATE_FORMAT_ISO_BASIC:
- $format = "%Y%m%dT%H%M%S";
- if ($this->getTZID() == 'UTC') {
- $format .= "Z";
- }
- $ret = $this->formatLikeStrftime($format);
- break;
- case DATE_FORMAT_ISO_EXTENDED:
- $format = "%Y-%m-%dT%H:%M:%S";
- if ($this->getTZID() == 'UTC') {
- $format .= "Z";
- }
- $ret = $this->formatLikeStrftime($format);
- break;
- case DATE_FORMAT_ISO_EXTENDED_MICROTIME:
- $format = "%Y-%m-%dT%H:%M:%s";
- if ($this->getTZID() == 'UTC') {
- $format .= "Z";
- }
- $ret = $this->formatLikeStrftime($format);
- break;
- case DATE_FORMAT_TIMESTAMP:
- $ret = $this->formatLikeStrftime("%Y%m%d%H%M%S");
- break;
- case DATE_FORMAT_UNIXTIME:
- $ret = $this->getTime();
- if (!PEAR::isError($ret)) {
- $ret = (string)$ret;
- }
- break;
- }
-
- return $ret;
- }
-
-
- // }}}
- // {{{ format()
-
- /**
- * Formats the date according to the specified formatting code string
- *
- * This function is an alias for the method specified by the constant
- * {@link DATE_FORMAT_METHOD} (which defaults to 'formatLikeStrftime'
- * for backwards-compatibility).
- *
- * @return string date/time in given format
- * @access public
- * @see Date::formatLikeStrftime(), Date::formatLikeDate(),
- * Date::formatLikeSQL()
- */
- public function format()
- {
- $ha_args = func_get_args();
- return call_user_func_array(
- array(&$this, DATE_FORMAT_METHOD),
- $ha_args
- );
- }
-
-
- // }}}
- // {{{ formatLikeStrftime()
-
- /**
- * Formats the date according to the specified formatting code string,
- * based on {@link http://www.php.net/strftime strftime()}
- *
- * Formats the date in the given format, much like
- * strftime(). Most strftime() options are supported.
- *
- *
- * Formatting options:
- *
- * - <b>%a</b> - abbreviated weekday name (Sun, Mon, Tue)
- * - <b>%A</b> - full weekday name (Sunday, Monday, Tuesday)
- * - <b>%b</b> - abbreviated month name (Jan, Feb, Mar)
- * - <b>%B</b> - full month name (January, February, March)
- * - <b>%C</b> - century number (the year divided by 100 and truncated
- * to an integer, range 00 to 99)
- * - <b>%d</b> - day of month (range 00 to 31)
- * - <b>%D</b> - equivalent to '<b>%m/%d/%y</b>'
- * - <b>%e</b> - day of month without leading noughts (range 0 to 31)
- * - <b>%E</b> - {@link http://en.wikipedia.org/wiki/Julian_day Julian day} -
- * no of days since Monday, 24th November, 4714 B.C. (in
- * the proleptic Gregorian calendar)
- * - <b>%g</b> - like '<b>%G</b>', but without the century
- * - <b>%G</b> - the 4-digit year corresponding to the ISO week
- * number (see '<b>%V</b>'). This has the same
- * format and value as '<b>%Y</b>', except that if
- * the ISO week number belongs to the previous or
- * next year, that year is used instead.
- * - <b>%h</b> - hour as decimal number without leading noughts (0
- * to 23)
- * - <b>%H</b> - hour as decimal number (00 to 23)
- * - <b>%i</b> - hour as decimal number on 12-hour clock without
- * leading noughts (1 to 12)
- * - <b>%I</b> - hour as decimal number on 12-hour clock (01 to 12)
- * - <b>%j</b> - day of year (range 001 to 366)
- * - <b>%m</b> - month as decimal number (range 01 to 12)
- * - <b>%M</b> - minute as a decimal number (00 to 59)
- * - <b>%n</b> - newline character ("\n")
- * - <b>%o</b> - raw timezone offset expressed as '+/-HH:MM'
- * - <b>%O</b> - dst-corrected timezone offset expressed as '+/-HH:MM'
- * - <b>%p</b> - either 'am' or 'pm' depending on the time
- * - <b>%P</b> - either 'AM' or 'PM' depending on the time
- * - <b>%r</b> - time in am/pm notation; equivalent to
- * '<b>%I:%M:%S %p</b>'
- * - <b>%R</b> - time in 24-hour notation; equivalent to
- * '<b>%H:%M</b>'
- * - <b>%s</b> - seconds including the micro-time (the decimal
- * representation less than one second to six
- * decimal places
- * - <b>%S</b> - seconds as a decimal number (00 to 59)
- * - <b>%t</b> - tab character ("\t")
- * - <b>%T</b> - current time; equivalent to '<b>%H:%M:%S</b>'
- * - <b>%u</b> - day of week as decimal (1 to 7; where 1 = Monday)
- * - <b>%U</b> - week number of the current year as a decimal
- * number, starting with the first Sunday as the first
- * day of the first week (i.e. the first full week of
- * the year, and the week that contains 7th January)
- * (00 to 53)
- * - <b>%V</b> - the {@link http://en.wikipedia.org/wiki/ISO_week_date ISO 8601:1988}
- * week number of the current year
- * as a decimal number, range 01 to 53, where week 1
- * is the first week that has at least 4 days in the
- * current year, and with Monday as the first day of
- * the week. (Use '<b>%G</b>' or '<b>%g</b>' for the
- * year component that corresponds to the week number
- * for the specified timestamp.)
- * - <b>%w</b> - day of week as decimal (0 to 6; where 0 = Sunday)
- * - <b>%W</b> - week number of the current year as a decimal
- * number, starting with the first Monday as the first
- * day of the first week (i.e. the first full week of
- * the year, and the week that contains 7th January)
- * (00 to 53)
- * - <b>%y</b> - year as decimal (range 00 to 99)
- * - <b>%Y</b> - year as decimal including century (range 0000 to
- * 9999)
- * - <b>%Z</b> - Abbreviated form of time zone name, e.g. 'GMT', or
- * the abbreviation for Summer time if the date falls
- * in Summer time, e.g. 'BST'.
- * - <b>%%</b> - literal '%'
- *
- *
- * The following codes render a different output to that of
- * {@link http://www.php.net/strftime strftime()}:
- *
- * - <b>%e</b> - in 'strftime()' a single digit is preceded by a space
- * - <b>%h</b> - in 'strftime()' is equivalent to '<b>%b</b>'
- * - <b>%U</b> - '<b>%U</b>' and '<b>%W</b>' are different in
- * 'strftime()' in that if week 1 does not start on 1st
- * January, '00' is returned, whereas this function
- * returns '53', that is, the week is counted as the
- * last of the previous year.
- * - <b>%W</b>
- *
- * @param string $format the format string for returned date/time
- *
- * @return string date/time in given format
- * @access public
- * @see Date::format(), Date::formatLikeDate(), Date::formatLikeSQL()
- * @since Method available since Release 1.5.1
- */
- public function formatLikeStrftime($format)
- {
- $output = "";
-
- $hn_isoyear = null;
- $hn_isoweek = null;
- $hn_isoday = null;
-
- for ($strpos = 0; $strpos < strlen($format); $strpos++) {
- $char = substr($format, $strpos, 1);
- if ($char == "%") {
- $nextchar = substr($format, $strpos + 1, 1);
- switch ($nextchar) {
- case "a":
- $output .= Date_Calc::getWeekdayAbbrname(
- $this->day,
- $this->month,
- $this->year,
- $this->getWeekdayAbbrnameLength
- );
- break;
- case "A":
- $output .= Date_Calc::getWeekdayFullname(
- $this->day,
- $this->month,
- $this->year
- );
- break;
- case "b":
- $output .= Date_Calc::getMonthAbbrname($this->month);
- break;
- case "B":
- $output .= Date_Calc::getMonthFullname($this->month);
- break;
- case "C":
- $output .= sprintf("%02d", intval($this->year / 100));
- break;
- case "d":
- $output .= sprintf("%02d", $this->day);
- break;
- case "D":
- $output .= sprintf(
- "%02d/%02d/%02d",
- $this->month,
- $this->day,
- $this->year
- );
- break;
- case "e":
- $output .= $this->day;
- break;
- case "E":
- $output .= Date_Calc::dateToDays(
- $this->day,
- $this->month,
- $this->year
- );
- break;
- case "g":
- if (is_null($hn_isoyear)) {
- list($hn_isoyear, $hn_isoweek, $hn_isoday) =
- Date_Calc::isoWeekDate(
- $this->day,
- $this->month,
- $this->year
- );
- }
-
- $output .= sprintf("%02d", $hn_isoyear % 100);
- break;
- case "G":
- if (is_null($hn_isoyear)) {
- list($hn_isoyear, $hn_isoweek, $hn_isoday) =
- Date_Calc::isoWeekDate(
- $this->day,
- $this->month,
- $this->year
- );
- }
-
- $output .= sprintf("%04d", $hn_isoyear);
- break;
- case 'h':
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $output .= sprintf("%d", $this->hour);
- break;
- case "H":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $output .= sprintf("%02d", $this->hour);
- break;
- case "i":
- case "I":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $hour = $this->hour + 1 > 12 ?
- $this->hour - 12 :
- $this->hour;
- $output .= $hour == 0 ?
- 12 :
- ($nextchar == "i" ?
- $hour :
- sprintf('%02d', $hour));
- break;
- case "j":
- $output .= sprintf(
- "%03d",
- Date_Calc::dayOfYear(
- $this->day,
- $this->month,
- $this->year
- )
- );
- break;
- case "m":
- $output .= sprintf("%02d", $this->month);
- break;
- case "M":
- $output .= sprintf("%02d", $this->minute);
- break;
- case "n":
- $output .= "\n";
- break;
- case "O":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $offms = $this->getTZOffset();
- $direction = $offms >= 0 ? "+" : "-";
- $offmins = abs($offms) / 1000 / 60;
- $hours = $offmins / 60;
- $minutes = $offmins % 60;
-
- $output .= sprintf("%s%02d:%02d", $direction, $hours, $minutes);
- break;
- case "o":
- $offms = $this->tz->getRawOffset($this);
- $direction = $offms >= 0 ? "+" : "-";
- $offmins = abs($offms) / 1000 / 60;
- $hours = $offmins / 60;
- $minutes = $offmins % 60;
-
- $output .= sprintf("%s%02d:%02d", $direction, $hours, $minutes);
- break;
- case "p":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $output .= $this->hour >= 12 ? "pm" : "am";
- break;
- case "P":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $output .= $this->hour >= 12 ? "PM" : "AM";
- break;
- case "r":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $hour = $this->hour + 1 > 12 ?
- $this->hour - 12 :
- $this->hour;
- $output .= sprintf(
- "%02d:%02d:%02d %s",
- $hour == 0 ? 12 : $hour,
- $this->minute,
- $this->second,
- $this->hour >= 12 ? "PM" : "AM"
- );
- break;
- case "R":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $output .= sprintf("%02d:%02d", $this->hour, $this->minute);
- break;
- case "s":
- $output .= str_replace(
- ',',
- '.',
- sprintf(
- "%09f",
- (float)((float)$this->second +
- $this->partsecond)
- )
- );
- break;
- case "S":
- $output .= sprintf("%02d", $this->second);
- break;
- case "t":
- $output .= "\t";
- break;
- case "T":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $output .= sprintf(
- "%02d:%02d:%02d",
- $this->hour,
- $this->minute,
- $this->second
- );
- break;
- case "u":
- $hn_dayofweek = $this->getDayOfWeek();
- $output .= $hn_dayofweek == 0 ? 7 : $hn_dayofweek;
- break;
- case "U":
- $ha_week = Date_Calc::weekOfYear7th(
- $this->day,
- $this->month,
- $this->year,
- 0
- );
- $output .= sprintf("%02d", $ha_week[1]);
- break;
- case "V":
- if (is_null($hn_isoyear)) {
- list($hn_isoyear, $hn_isoweek, $hn_isoday) =
- Date_Calc::isoWeekDate(
- $this->day,
- $this->month,
- $this->year
- );
- }
-
- $output .= $hn_isoweek;
- break;
- case "w":
- $output .= $this->getDayOfWeek();
- break;
- case "W":
- $ha_week = Date_Calc::weekOfYear7th(
- $this->day,
- $this->month,
- $this->year,
- 1
- );
- $output .= sprintf("%02d", $ha_week[1]);
- break;
- case 'y':
- $output .= sprintf(
- '%0' .
- ($this->year < 0 ? '3' : '2') .
- 'd',
- $this->year % 100
- );
- break;
- case "Y":
- $output .= sprintf(
- '%0' .
- ($this->year < 0 ? '5' : '4') .
- 'd',
- $this->year
- );
- break;
- case "Z":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $output .= $this->getTZShortName();
- break;
- case "%":
- $output .= "%";
- break;
- default:
- $output .= $char . $nextchar;
- }
- $strpos++;
- } else {
- $output .= $char;
- }
- }
- return $output;
- }
-
-
- // }}}
- // {{{ _getOrdinalSuffix()
-
- /**
- * Returns appropriate ordinal suffix (i.e. 'th', 'st', 'nd' or 'rd')
- *
- * @param int $pn_num number with which to determine suffix
- * @param bool $pb_uppercase boolean specifying if the suffix should be
- * capitalized
- *
- * @return string
- * @access private
- * @since Method available since Release 1.5.0
- */
- public function _getOrdinalSuffix($pn_num, $pb_uppercase = true)
- {
- switch (($pn_numabs = abs($pn_num)) % 100) {
- case 11:
- case 12:
- case 13:
- $hs_suffix = "th";
- break;
- default:
- switch ($pn_numabs % 10) {
- case 1:
- $hs_suffix = "st";
- break;
- case 2:
- $hs_suffix = "nd";
- break;
- case 3:
- $hs_suffix = "rd";
- break;
- default:
- $hs_suffix = "th";
- }
- }
-
- return $pb_uppercase ? strtoupper($hs_suffix) : $hs_suffix;
- }
-
-
- // }}}
- // {{{ _spellNumber()
-
- /**
- * Converts a number to its word representation
- *
- * Private helper function, particularly for {@link Date::formatLikeSQL()}.
- * N.B. The second argument is the 'SP' code which can be specified in the
- * format string for 'formatLikeSQL()' and is interpreted as follows:
- *
- * - <b>SP</b> - returns upper-case spelling, e.g. 'FOUR HUNDRED'
- * - <b>Sp</b> - returns spelling with first character of each word
- * capitalized, e.g. 'Four Hundred'
- * - <b>sp</b> - returns lower-case spelling, e.g. 'four hundred'
- *
- * @param int $pn_num number to be converted to words
- * @param bool $pb_ordinal boolean specifying if the number should
- * be ordinal
- * @param string $ps_capitalization string for specifying capitalization
- * options
- * @param string $ps_locale language name abbreviation used for
- * formatting numbers as spelled-out words
- *
- * @return string
- * @access private
- * @since Method available since Release 1.5.0
- */
- public function _spellNumber(
- $pn_num,
- $pb_ordinal = false,
- $ps_capitalization = "SP",
- $ps_locale = "en_GB"
- )
- {
- include_once "Numbers/Words.php";
- $hs_words = Numbers_Words::toWords($pn_num, $ps_locale);
- if (Pear::isError($hs_words)) {
- return $hs_words;
- }
-
- if ($pb_ordinal && substr($ps_locale, 0, 2) == "en") {
- if (($pn_rem = ($pn_numabs = abs($pn_num)) % 100) == 12) {
- $hs_words = substr($hs_words, 0, -2) . "fth";
- } elseif ($pn_rem >= 11 && $pn_rem <= 15) {
- $hs_words .= "th";
- } else {
- switch ($pn_numabs % 10) {
- case 1:
- $hs_words = substr($hs_words, 0, -3) . "first";
- break;
- case 2:
- $hs_words = substr($hs_words, 0, -3) . "second";
- break;
- case 3:
- $hs_words = substr($hs_words, 0, -3) . "ird";
- break;
- case 5:
- $hs_words = substr($hs_words, 0, -2) . "fth";
- break;
- default:
- switch (substr($hs_words, -1)) {
- case "e":
- $hs_words = substr($hs_words, 0, -1) . "th";
- break;
- case "t":
- $hs_words .= "h";
- break;
- case "y":
- $hs_words = substr($hs_words, 0, -1) . "ieth";
- break;
- default:
- $hs_words .= "th";
- }
- }
- }
- }
-
- if (($hs_char = substr($ps_capitalization, 0, 1)) ==
- strtolower($hs_char)) {
- $hb_upper = false;
- $hs_words = strtolower($hs_words);
- } elseif (($hs_char = substr($ps_capitalization, 1, 1)) ==
- strtolower($hs_char)) {
- $hb_upper = false;
- $hs_words = ucwords($hs_words);
- } else {
- $hb_upper = true;
- $hs_words = strtoupper($hs_words);
- }
-
- return $hs_words;
- }
-
-
- // }}}
- // {{{ _formatNumber()
-
- /**
- * Formats a number according to the specified format string
- *
- * Private helper function, for {@link Date::formatLikeSQL()}, which
- * interprets the codes '<b>SP</b>' and '<b>TH</b>' and the combination
- * of the two as follows:
- *
- * - <b>TH</b> - Ordinal number
- * - <b>SP</b> - Spelled cardinal number
- * - <b>SPTH</b> - Spelled ordinal number (combination of '<b>SP</b>'
- * and '<b>TH</b>' in any order)
- * - <b>THSP</b>
- *
- * Code '<b>SP</b>' can have the following three variations (which
- * can also be used in combination with '<b>TH</b>'):
- *
- * - <b>SP</b> - returns upper-case spelling, e.g. 'FOUR HUNDRED'
- * - <b>Sp</b> - returns spelling with first character of each word
- * capitalized, e.g. 'Four Hundred'
- * - <b>sp</b> - returns lower-case spelling, e.g. 'four hundred'
- *
- * Code '<b>TH</b>' can have the following two variations (although in
- * combination with code '<b>SP</b>', the case specification of
- * '<b>SP</b>' takes precedence):
- *
- * - <b>TH</b> - returns upper-case ordinal suffix, e.g. 400TH
- * - <b>th</b> - returns lower-case ordinal suffix, e.g. 400th
- *
- * N.B. The format string is passed by reference, in order to pass back
- * the part of the format string that matches the valid codes '<b>SP</b>'
- * and '<b>TH</b>'. If none of these are found, then it is set to an
- * empty string; If both codes are found then a string is returned with
- * code '<b>SP</b>' preceding code '<b>TH</b>' (i.e. '<b>SPTH</b>',
- * '<b>Spth</b>' or '<b>spth</b>').
- *
- * @param int $pn_num integer to be converted to words
- * @param string &$ps_format string of formatting codes (max. length 4)
- * @param int $pn_numofdigits no of digits to display if displayed as
- * numeral (i.e. not spelled out), not
- * including the sign (if negative); to
- * allow all digits specify 0
- * @param bool $pb_nopad boolean specifying whether to suppress
- * padding with leading noughts (if displayed
- * as numeral)
- * @param bool $pb_nosign boolean specifying whether to suppress the
- * display of the sign (if negative)
- * @param string $ps_locale language name abbreviation used for
- * formatting
- * @param string $ps_thousandsep optional thousand-separator (e.g. a comma)
- * numbers as spelled-out words
- * @param int $pn_padtype optional integer to specify padding (if
- * displayed as numeral) - can be
- * STR_PAD_LEFT or STR_PAD_RIGHT
- *
- * @return string
- * @access private
- * @since Method available since Release 1.5.0
- */
- public function _formatNumber(
- $pn_num,
- &$ps_format,
- $pn_numofdigits,
- $pb_nopad = false,
- $pb_nosign = false,
- $ps_locale = "en_GB",
- $ps_thousandsep = null,
- $pn_padtype = STR_PAD_LEFT
- )
- {
- $hs_code1 = substr($ps_format, 0, 2);
- $hs_code2 = substr($ps_format, 2, 2);
-
- $hs_sp = null;
- $hs_th = null;
- if (strtoupper($hs_code1) == "SP") {
- $hs_sp = $hs_code1;
- if (strtoupper($hs_code2) == "TH") {
- $hs_th = $hs_code2;
- }
- } elseif (strtoupper($hs_code1) == "TH") {
- $hs_th = $hs_code1;
- if (strtoupper($hs_code2) == "SP") {
- $hs_sp = $hs_code2;
- }
- }
-
- $hn_absnum = abs($pn_num);
- if ($pn_numofdigits > 0 && strlen($hn_absnum) > $pn_numofdigits) {
- $hn_absnum = intval(substr($hn_absnum, -$pn_numofdigits));
- }
- $hs_num = $hn_absnum;
-
- if (!is_null($hs_sp)) {
- // Spell out number:
- //
- $ps_format = $hs_sp .
- (is_null($hs_th) ? "" : ($hs_sp == "SP" ? "TH" : "th"));
- return $this->_spellNumber(
- !$pb_nosign && $pn_num < 0 ?
- $hn_absnum * -1 :
- $hn_absnum,
- !is_null($hs_th),
- $hs_sp,
- $ps_locale
- );
- } else {
- // Display number as Arabic numeral:
- //
- if (!$pb_nopad) {
- $hs_num = str_pad($hs_num, $pn_numofdigits, "0", $pn_padtype);
- }
-
- if (!is_null($ps_thousandsep)) {
- for ($i = strlen($hs_num) - 3; $i > 0; $i -= 3) {
- $hs_num = substr($hs_num, 0, $i) .
- $ps_thousandsep .
- substr($hs_num, $i);
- }
- }
-
- if (!$pb_nosign) {
- if ($pn_num < 0) {
- $hs_num = "-" . $hs_num;
- } elseif (!$pb_nopad) {
- $hs_num = " " . $hs_num;
- }
- }
-
- if (!is_null($hs_th)) {
- $ps_format = $hs_th;
- return $hs_num .
- $this->_getOrdinalSuffix(
- $pn_num,
- substr($hs_th, 0, 1) == "T"
- );
- } else {
- $ps_format = "";
- return $hs_num;
- }
- }
- }
-
-
- // }}}
- // {{{ formatLikeSQL()
-
- /**
- * Formats the date according to the specified formatting code string,
- * based on SQL date-formatting codes
- *
- * Most codes reproduce the no of digits equal to the length of the
- * code, for example, '<b>YYY</b>' will return the last 3 digits of
- * the year, and so the year 2007 will produce '007', and the year 89
- * will produce '089', unless the no-padding code is used as in
- * '<b>NPYYY</b>', which will return '89'.
- *
- * For negative values, the sign will be discarded, unless the
- * '<b>S</b>' code is used in combination, but note that for positive
- * values the value will be padded with a leading space unless it
- * is suppressed with the no-padding modifier, for example for 2007:
- *
- * - <b>YYYY</b> - returns '2007'
- * - <b>SYYYY</b> - returns ' 2007'
- * - <b>NPSYYYY</b> - returns '2007'
- *
- * The no-padding modifier '<b>NP</b>' can be used with numeric codes
- * to suppress leading (or trailing in the case of code '<b>F</b>')
- * noughts, and with character-returning codes such as '<b>DAY</b>'
- * to suppress trailing spaces, which will otherwise be padded to the
- * maximum possible length of the return-value of the code; for
- * example, for Monday:
- *
- * - <b>Day</b> - returns 'Monday ' because the maximum length of
- * this code is 'Wednesday';
- * - <b>NPDay</b> - returns 'Monday'
- *
- * N.B. this code affects the code immediately following only, and
- * without this code the default is always to apply padding.
- *
- * Most character-returning codes, such as '<b>MONTH</b>', will
- * set the capitalization according to the code, so for example:
- *
- * - <b>MONTH</b> - returns upper-case spelling, e.g. 'JANUARY'
- * - <b>Month</b> - returns spelling with first character of each word
- * capitalized, e.g. 'January'
- * - <b>month</b> - returns lower-case spelling, e.g. 'january'
- *
- * Where it makes sense, numeric codes can be combined with a following
- * '<b>SP</b>' code which spells out the number, or with a '<b>TH</b>'
- * code, which renders the code as an ordinal ('<b>TH</b>' only works
- * in English), for example, for 31st December:
- *
- * - <b>DD</b> - returns '31'
- * - <b>DDTH</b> - returns '31ST'
- * - <b>DDth</b> - returns '31st'
- * - <b>DDSP</b> - returns 'THIRTY-ONE'
- * - <b>DDSp</b> - returns 'Thirty-one'
- * - <b>DDsp</b> - returns 'thirty-one'
- * - <b>DDSPTH</b> - returns 'THIRTY-FIRST'
- * - <b>DDSpth</b> - returns 'Thirty-first'
- * - <b>DDspth</b> - returns 'thirty-first'
- *
- *
- * All formatting options:
- *
- * - <b>-</b> (All punctuation and white-space is reproduced unchanged)
- * - <b>/</b>
- * - <b>,</b>
- * - <b>.</b>
- * - <b>;</b>
- * - <b>:</b>
- * - <b>"text"</b> - Quoted text is reproduced unchanged (escape using
- * '\')
- * - <b>AD</b> - AD indicator with or without full stops
- * - <b>A.D.</b>
- * - <b>AM</b> - Meridian indicator with or without full stops
- * - <b>A.M.</b>
- * - <b>BC</b> - BC indicator with or without full stops
- * - <b>B.C.</b>
- * - <b>BCE</b> - BCE indicator with or without full stops
- * - <b>B.C.E.</b>
- * - <b>CC</b> - Century, i.e. the year divided by 100, discarding the
- * remainder; '<b>S</b>' prefixes negative years with a
- * minus sign
- * - <b>SCC</b>
- * - <b>CE</b> - CE indicator with or without full stops
- * - <b>C.E.</b>
- * - <b>D</b> - Day of week (0-6), where 0 represents Sunday
- * - <b>DAY</b> - Name of day, padded with blanks to display width of the
- * widest name of day in the locale of the machine
- * - <b>DD</b> - Day of month (1-31)
- * - <b>DDD</b> - Day of year (1-366)
- * - <b>DY</b> - Abbreviated name of day
- * - <b>FFF</b> - Fractional seconds; no radix character is printed. The
- * no of '<b>F</b>'s determines the no of digits of the
- * part-second to return; e.g. 'HH:MI:SS.FF'
- * - <b>F[integer]</b> - The integer after '<b>F</b>' specifies the
- * number of digits of the part-second to return.
- * This is an alternative to using several
- * '<b>F</b>'s in sequence, and '<b>F3</b>' is thus
- * equivalent to using '<b>FFF</b>'.
- * - <b>HH</b> - Hour of day (0-23)
- * - <b>HH12</b> - Hour of day (1-12)
- * - <b>HH24</b> - Hour of day (0-23)
- * - <b>ID</b> - Day of week (1-7) based on the ISO 8601 standard (see
- * '<b>IW</b>')
- * - <b>IW</b> - Week of year (1-52 or 1-53) based on the
- * {@link http://en.wikipedia.org/wiki/ISO_week_date ISO 8601 standard}
- * - <b>IYYY</b> - 4-digit year based on the ISO 8601 standard (see
- * '<b>IW</b>'); '<b>S</b>' prefixes negative years with a
- * minus sign
- * - <b>SIYYY</b>
- * - <b>IYY</b> - Last 3, 2, or 1 digit(s) of ISO year
- * - <b>IY</b>
- * - <b>I</b>
- * - <b>J</b> - {@link http://en.wikipedia.org/wiki/Julian_day Julian day} -
- * the number of days since Monday, 24th November, 4714 B.C.
- * (proleptic Gregorian calendar)
- * - <b>MI</b> - Minute (0-59)
- * - <b>MM</b> - Month (01-12; January = 01)
- * - <b>MON</b> - Abbreviated name of month
- * - <b>MONTH</b> - Name of month, padded with blanks to display width of
- * the widest name of month in the date language used for
- * - <b>PM</b> - Meridian indicator with or without full stops
- * - <b>P.M.</b>
- * - <b>Q</b> - Quarter of year (1, 2, 3, 4; January - March = 1)
- * - <b>RM</b> - Roman numeral month (I-XII; January = I); N.B. padded
- * with leading spaces.
- * - <b>SS</b> - Second (0-59)
- * - <b>SSSSS</b> - Seconds past midnight (0-86399)
- * - <b>TZC</b> - Abbreviated form of time zone name, e.g. 'GMT', or the
- * abbreviation for Summer time if the date falls in Summer
- * time, e.g. 'BST'.
- * N.B. this is not a unique identifier - for this purpose
- * use the time zone region (code '<b>TZR</b>').
- * - <b>TZH</b> - Time zone hour; '<b>S</b>' prefixes the hour with the
- * correct sign, (+/-), which otherwise is not displayed.
- * Note that the leading nought can be suppressed with the
- * no-padding code '<b>NP</b>'). Also note that if you
- * combine with the '<b>SP</b>' code, the sign will not be
- * spelled out. (I.e. '<b>STZHSp</b>' will produce '+One',
- * for example, and not 'Plus One'.
- * '<b>TZH:TZM</b>' will produce, for example, '+05:30'.
- * (Also see '<b>TZM</b>' format code)
- * - <b>STZH</b>
- * - <b>TZI</b> - Whether or not the date is in Summer time (daylight
- * saving time). Returns '1' if Summer time, else '0'.
- * - <b>TZM</b> - Time zone minute, without any +/- sign. (Also see
- * '<b>TZH</b>' format element)
- * - <b>TZN</b> - Long form of time zone name, e.g.
- * 'Greenwich Mean Time', or the name of the Summer time if
- * the date falls in Summer time, e.g.
- * 'British Summer Time'. N.B. this is not a unique
- * identifier - for this purpose use the time zone region
- * (code '<b>TZR</b>').
- * - <b>TZO</b> - Time zone offset in ISO 8601 form - that is, 'Z' if
- * UTC, else [+/-][hh]:[mm] (which would be equivalent
- * to '<b>STZH:TZM</b>'). Note that this result is right
- * padded.
- * with spaces by default, (i.e. if 'Z').
- * - <b>TZS</b> - Time zone offset in seconds; '<b>S</b>' prefixes
- * negative sign with minus sign '-' if negative, and no
- * sign if positive (i.e. -43200 to 50400).
- * - <b>STZS</b>
- * - <b>TZR</b> - Time zone region, that is, the name or ID of the time
- * zone e.g. 'Europe/London'. This value is unique for
- * each time zone.
- * - <b>U</b> - Seconds since the Unix Epoch -
- * January 1 1970 00:00:00 GMT
- * - <b>W</b> - 'Absolute' week of month (1-5), counting week 1 as
- * 1st-7th of the year, regardless of the day
- * - <b>W1</b> - Week of year (1-54), counting week 1 as the week that
- * contains 1st January
- * - <b>W4</b> - Week of year (1-53), counting week 1 as the week that
- * contains 4th January (i.e. first week with at least 4
- * days)
- * - <b>W7</b> - Week of year (1-53), counting week 1 as the week that
- * contains 7th January (i.e. first full week)
- * - <b>WW</b> - 'Absolute' week of year (1-53), counting week 1 as
- * 1st-7th of the year, regardless of the day
- * - <b>YEAR</b> - Year, spelled out; '<b>S</b>' prefixes negative
- * years with 'MINUS'; N.B. '<b>YEAR</b>' differs from
- * '<b>YYYYSP</b>' in that the first will render 1923,
- * for example, as 'NINETEEN TWENTY-THREE, and the
- * second as 'ONE THOUSAND NINE HUNDRED TWENTY-THREE'
- * - <b>SYEAR</b>
- * - <b>YYYY</b> - 4-digit year; '<b>S</b>' prefixes negative years
- * with a minus sign
- * - <b>SYYYY</b>
- * - <b>YYY</b> - Last 3, 2, or 1 digit(s) of year
- * - <b>YY</b>
- * - <b>Y</b>
- * - <b>Y,YYY</b> - Year with thousands-separator in this position; five
- * possible separators
- * - <b>Y.YYY</b>
- * - <b>Y�YYY</b> - N.B. space-dot (mid-dot, interpunct) is valid only in
- * ISO 8859-1 (so take care when using UTF-8 in
- * particular)
- * - <b>Y'YYY</b>
- * - <b>Y YYY</b>
- *
- * In addition the following codes can be used in combination with other
- * codes;
- * Codes that modify the next code in the format string:
- *
- * - <b>NP</b> - 'No Padding' - Returns a value with no trailing blanks
- * and no leading or trailing noughts; N.B. that the
- * default is to include this padding in the return string.
- * N.B. affects the code immediately following only.
- *
- * Codes that modify the previous code in the format string (can only
- * be used with integral codes such as '<b>MM</b>'):
- *
- * - <b>TH</b> - Ordinal number
- * - <b>SP</b> - Spelled cardinal number
- * - <b>SPTH</b> - Spelled ordinal number (combination of '<b>SP</b>'
- * and '<b>TH</b>' in any order)
- * - <b>THSP</b>
- *
- * Code '<b>SP</b>' can have the following three variations (which can
- * also be used in combination with '<b>TH</b>'):
- *
- * - <b>SP</b> - returns upper-case spelling, e.g. 'FOUR HUNDRED'
- * - <b>Sp</b> - returns spelling with first character of each word
- * capitalized, e.g. 'Four Hundred'
- * - <b>sp</b> - returns lower-case spelling, e.g. 'four hundred'
- *
- * Code '<b>TH</b>' can have the following two variations (although in
- * combination with code '<b>SP</b>', the case specification of
- * '<b>SP</b>' takes precedence):
- *
- * - <b>TH</b> - returns upper-case ordinal suffix, e.g. 400TH
- * - <b>th</b> - returns lower-case ordinal suffix, e.g. 400th
- *
- * @param string $ps_format format string for returned date/time
- * @param string $ps_locale language name abbreviation used for formatting
- * numbers as spelled-out words
- *
- * @return string date/time in given format
- * @access public
- * @see Date::format(), Date::formatLikeStrftime(), Date::formatLikeDate()
- * @since Method available since Release 1.5.0
- */
- public function formatLikeSQL($ps_format, $ps_locale = "en_GB")
- {
- if (!preg_match(
- '/^("([^"\\\\]|\\\\\\\\|\\\\")*"|(D{1,3}|S?C+|' .
- 'HH(12|24)?|I[DW]|S?IY*|J|M[IM]|Q|SS(SSS)?|S?TZ[HS]|' .
- 'TZM|U|W[W147]?|S?Y{1,3}([,.�\' ]?YYY)*)(SP(TH)?|' .
- 'TH(SP)?)?|AD|A\.D\.|AM|A\.M\.|BCE?|B\.C\.(E\.)?|CE|' .
- 'C\.E\.|DAY|DY|F(F*|[1-9][0-9]*)|MON(TH)?|NP|PM|' .
- 'P\.M\.|RM|TZ[CINOR]|S?YEAR|[^A-Z0-9"])*$/i',
- $ps_format
- )) {
- return PEAR::raiseError(
- "Invalid date format '$ps_format'",
- DATE_ERROR_INVALIDFORMATSTRING
- );
- }
-
- $ret = "";
- $i = 0;
-
- $hb_nopadflag = false;
- $hb_showsignflag = false;
-
- $hn_weekdaypad = null;
- $hn_monthpad = null;
- $hn_isoyear = null;
- $hn_isoweek = null;
- $hn_isoday = null;
- $hn_tzoffset = null;
-
- while ($i < strlen($ps_format)) {
- $hb_lower = false;
-
- if ($hb_nopadflag) {
- $hb_nopad = true;
- } else {
- $hb_nopad = false;
- }
- if ($hb_showsignflag) {
- $hb_nosign = false;
- } else {
- $hb_nosign = true;
- }
- $hb_nopadflag = false;
- $hb_showsignflag = false;
-
- switch ($hs_char = substr($ps_format, $i, 1)) {
- case "-":
- case "/":
- case ",":
- case ".":
- case ";":
- case ":":
- case " ":
- $ret .= $hs_char;
- $i += 1;
- break;
- case "\"":
- preg_match(
- '/(([^"\\\\]|\\\\\\\\|\\\\")*)"/',
- $ps_format,
- $ha_matches,
- PREG_OFFSET_CAPTURE,
- $i + 1
- );
- $ret .= str_replace(
- array('\\\\', '\\"'),
- array('\\', '"'),
- $ha_matches[1][0]
- );
- $i += strlen($ha_matches[0][0]) + 1;
- break;
- case "a":
- $hb_lower = true;
- // no break
- case "A":
- if (strtoupper(substr($ps_format, $i, 4)) == "A.D.") {
- $ret .= $this->year >= 0 ?
- ($hb_lower ? "a.d." : "A.D.") :
- ($hb_lower ? "b.c." : "B.C.");
- $i += 4;
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "AD") {
- $ret .= $this->year >= 0 ?
- ($hb_lower ? "ad" : "AD") :
- ($hb_lower ? "bc" : "BC");
- $i += 2;
- } else {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- if (strtoupper(substr($ps_format, $i, 4)) == "A.M.") {
- $ret .= $this->hour < 12 ?
- ($hb_lower ? "a.m." : "A.M.") :
- ($hb_lower ? "p.m." : "P.M.");
- $i += 4;
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "AM") {
- $ret .= $this->hour < 12 ?
- ($hb_lower ? "am" : "AM") :
- ($hb_lower ? "pm" : "PM");
- $i += 2;
- }
- }
-
- break;
- case "b":
- $hb_lower = true;
- // no break
- case "B":
- // Check for 'B.C.E.' first:
- //
- if (strtoupper(substr($ps_format, $i, 6)) == "B.C.E.") {
- if ($this->year >= 0) {
- $hs_era = $hb_lower ? "c.e." : "C.E.";
- $ret .= $hb_nopad ?
- $hs_era :
- str_pad($hs_era, 6, " ", STR_PAD_RIGHT);
- } else {
- $ret .= $hb_lower ? "b.c.e." : "B.C.E.";
- }
- $i += 6;
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "BCE") {
- if ($this->year >= 0) {
- $hs_era = $hb_lower ? "ce" : "CE";
- $ret .= $hb_nopad ?
- $hs_era :
- str_pad($hs_era, 3, " ", STR_PAD_RIGHT);
- } else {
- $ret .= $hb_lower ? "bce" : "BCE";
- }
- $i += 3;
- } elseif (strtoupper(substr($ps_format, $i, 4)) == "B.C.") {
- $ret .= $this->year >= 0 ?
- ($hb_lower ? "a.d." : "A.D.") :
- ($hb_lower ? "b.c." : "B.C.");
- $i += 4;
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "BC") {
- $ret .= $this->year >= 0 ?
- ($hb_lower ? "ad" : "AD") :
- ($hb_lower ? "bc" : "BC");
- $i += 2;
- }
-
- break;
- case "c":
- $hb_lower = true;
- // no break
- case "C":
- if (strtoupper(substr($ps_format, $i, 4)) == "C.E.") {
- if ($this->year >= 0) {
- $hs_era = $hb_lower ? "c.e." : "C.E.";
- $ret .= $hb_nopad ?
- $hs_era :
- str_pad($hs_era, 6, " ", STR_PAD_RIGHT);
- } else {
- $ret .= $hb_lower ? "b.c.e." : "B.C.E.";
- }
- $i += 4;
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "CE") {
- if ($this->year >= 0) {
- $hs_era = $hb_lower ? "ce" : "CE";
- $ret .= $hb_nopad ?
- $hs_era :
- str_pad($hs_era, 3, " ", STR_PAD_RIGHT);
- } else {
- $ret .= $hb_lower ? "bce" : "BCE";
- }
- $i += 2;
- } else {
- // Code C(CCC...):
- //
- $hn_codelen = 1;
- while (strtoupper(substr(
- $ps_format,
- $i + $hn_codelen,
- 1
- )) == "C") {
- ++$hn_codelen;
- }
-
- // Check next code is not 'CE' or 'C.E.'
- //
- if ($hn_codelen > 1 &&
- (
- strtoupper(substr(
- $ps_format,
- $i + $hn_codelen - 1,
- 4
- )) == "C.E." ||
- strtoupper(substr(
- $ps_format,
- $i + $hn_codelen - 1,
- 2
- )) == "CE"
- )) {
- --$hn_codelen;
- }
-
- $hn_century = intval($this->year / 100);
- $hs_numberformat = substr($ps_format, $i + $hn_codelen, 4);
- $hs_century = $this->_formatNumber(
- $hn_century,
- $hs_numberformat,
- $hn_codelen,
- $hb_nopad,
- $hb_nosign,
- $ps_locale
- );
- if (Pear::isError($hs_century)) {
- return $hs_century;
- }
-
- $ret .= $hs_century;
- $i += $hn_codelen + strlen($hs_numberformat);
- }
-
- break;
- case "d":
- $hb_lower = true;
- // no break
- case "D":
- if (strtoupper(substr($ps_format, $i, 3)) == "DAY") {
- $hs_day = Date_Calc::getWeekdayFullname(
- $this->day,
- $this->month,
- $this->year
- );
-
- if (!$hb_nopad) {
- if (is_null($hn_weekdaypad)) {
- // Set week-day padding variable:
- //
- $hn_weekdaypad = 0;
- foreach (Date_Calc::getWeekDays() as $hs_weekday) {
- $hn_weekdaypad = max(
- $hn_weekdaypad,
- strlen($hs_weekday)
- );
- }
- }
- $hs_day = str_pad(
- $hs_day,
- $hn_weekdaypad,
- " ",
- STR_PAD_RIGHT
- );
- }
-
- $ret .= $hb_lower ?
- strtolower($hs_day) :
- (substr($ps_format, $i + 1, 1) == "A" ?
- strtoupper($hs_day) :
- $hs_day);
- $i += 3;
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "DY") {
- $hs_day = Date_Calc::getWeekdayAbbrname(
- $this->day,
- $this->month,
- $this->year
- );
- $ret .= $hb_lower ?
- strtolower($hs_day) :
- (substr($ps_format, $i + 1, 1) == "Y" ?
- strtoupper($hs_day) :
- $hs_day);
- $i += 2;
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "DDD" &&
- strtoupper(substr($ps_format, $i + 2, 3)) != "DAY" &&
- strtoupper(substr($ps_format, $i + 2, 2)) != "DY"
- ) {
- $hn_day = Date_Calc::dayOfYear(
- $this->day,
- $this->month,
- $this->year
- );
- $hs_numberformat = substr($ps_format, $i + 3, 4);
- $hs_day = $this->_formatNumber(
- $hn_day,
- $hs_numberformat,
- 3,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_day)) {
- return $hs_day;
- }
-
- $ret .= $hs_day;
- $i += 3 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "DD" &&
- strtoupper(substr($ps_format, $i + 1, 3)) != "DAY" &&
- strtoupper(substr($ps_format, $i + 1, 2)) != "DY"
- ) {
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_day = $this->_formatNumber(
- $this->day,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_day)) {
- return $hs_day;
- }
-
- $ret .= $hs_day;
- $i += 2 + strlen($hs_numberformat);
- } else {
- // Code 'D':
- //
- $hn_day = Date_Calc::dayOfWeek(
- $this->day,
- $this->month,
- $this->year
- );
- $hs_numberformat = substr($ps_format, $i + 1, 4);
- $hs_day = $this->_formatNumber(
- $hn_day,
- $hs_numberformat,
- 1,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_day)) {
- return $hs_day;
- }
-
- $ret .= $hs_day;
- $i += 1 + strlen($hs_numberformat);
- }
-
- break;
- case "f":
- case "F":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $hn_codelen = 1;
- if (is_numeric(substr($ps_format, $i + $hn_codelen, 1))) {
- ++$hn_codelen;
- while (is_numeric(substr($ps_format, $i + $hn_codelen, 1))) {
- ++$hn_codelen;
- }
-
- $hn_partsecdigits = substr($ps_format, $i + 1, $hn_codelen - 1);
- } else {
- while (strtoupper(substr(
- $ps_format,
- $i + $hn_codelen,
- 1
- )) == "F") {
- ++$hn_codelen;
- }
-
- // Check next code is not F[numeric]:
- //
- if ($hn_codelen > 1 &&
- is_numeric(substr($ps_format, $i + $hn_codelen, 1))) {
- --$hn_codelen;
- }
-
- $hn_partsecdigits = $hn_codelen;
- }
-
- $hs_partsec = (string)$this->partsecond;
- if (preg_match(
- '/^([0-9]+)(\.([0-9]+))?E-([0-9]+)$/i',
- $hs_partsec,
- $ha_matches
- )) {
- $hs_partsec =
- str_repeat("0", $ha_matches[4] - strlen($ha_matches[1])) .
- $ha_matches[1] .
- $ha_matches[3];
- } else {
- $hs_partsec = substr($hs_partsec, 2);
- }
- $hs_partsec = substr($hs_partsec, 0, $hn_partsecdigits);
-
- // '_formatNumber() will not work for this because the
- // part-second is an int, and we want it to behave like a float:
- //
- if ($hb_nopad) {
- $hs_partsec = rtrim($hs_partsec, "0");
- if ($hs_partsec == "") {
- $hs_partsec = "0";
- }
- } else {
- $hs_partsec = str_pad(
- $hs_partsec,
- $hn_partsecdigits,
- "0",
- STR_PAD_RIGHT
- );
- }
-
- $ret .= $hs_partsec;
- $i += $hn_codelen;
- break;
- case "h":
- case "H":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- if (strtoupper(substr($ps_format, $i, 4)) == "HH12") {
- $hn_hour = $this->hour % 12;
- if ($hn_hour == 0) {
- $hn_hour = 12;
- }
-
- $hn_codelen = 4;
- } else {
- // Code 'HH' or 'HH24':
- //
- $hn_hour = $this->hour;
- $hn_codelen = strtoupper(substr(
- $ps_format,
- $i,
- 4
- )) == "HH24" ? 4 : 2;
- }
-
- $hs_numberformat = substr($ps_format, $i + $hn_codelen, 4);
- $hs_hour = $this->_formatNumber(
- $hn_hour,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_hour)) {
- return $hs_hour;
- }
-
- $ret .= $hs_hour;
- $i += $hn_codelen + strlen($hs_numberformat);
- break;
- case "i":
- case "I":
- if (is_null($hn_isoyear)) {
- list($hn_isoyear, $hn_isoweek, $hn_isoday) =
- Date_Calc::isoWeekDate(
- $this->day,
- $this->month,
- $this->year
- );
- }
-
- if (strtoupper(substr($ps_format, $i, 2)) == "ID" &&
- strtoupper(substr($ps_format, $i + 1, 3)) != "DAY"
- ) {
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_isoday = $this->_formatNumber(
- $hn_isoday,
- $hs_numberformat,
- 1,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_isoday)) {
- return $hs_isoday;
- }
-
- $ret .= $hs_isoday;
- $i += 2 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "IW") {
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_isoweek = $this->_formatNumber(
- $hn_isoweek,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_isoweek)) {
- return $hs_isoweek;
- }
-
- $ret .= $hs_isoweek;
- $i += 2 + strlen($hs_numberformat);
- } else {
- // Code I(YYY...):
- //
- $hn_codelen = 1;
- while (strtoupper(substr(
- $ps_format,
- $i + $hn_codelen,
- 1
- )) == "Y") {
- ++$hn_codelen;
- }
-
- $hs_numberformat = substr($ps_format, $i + $hn_codelen, 4);
- $hs_isoyear = $this->_formatNumber(
- $hn_isoyear,
- $hs_numberformat,
- $hn_codelen,
- $hb_nopad,
- $hb_nosign,
- $ps_locale
- );
- if (Pear::isError($hs_isoyear)) {
- return $hs_isoyear;
- }
-
- $ret .= $hs_isoyear;
- $i += $hn_codelen + strlen($hs_numberformat);
- }
-
- break;
- case "j":
- case "J":
- $hn_jd = Date_Calc::dateToDays(
- $this->day,
- $this->month,
- $this->year
- );
- $hs_numberformat = substr($ps_format, $i + 1, 4);
-
- // Allow sign if negative; allow all digits (specify nought);
- // suppress padding:
- //
- $hs_jd = $this->_formatNumber(
- $hn_jd,
- $hs_numberformat,
- 0,
- true,
- false,
- $ps_locale
- );
- if (Pear::isError($hs_jd)) {
- return $hs_jd;
- }
-
- $ret .= $hs_jd;
- $i += 1 + strlen($hs_numberformat);
- break;
- case "m":
- $hb_lower = true;
- // no break
- case "M":
- if (strtoupper(substr($ps_format, $i, 2)) == "MI") {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_minute = $this->_formatNumber(
- $this->minute,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_minute)) {
- return $hs_minute;
- }
-
- $ret .= $hs_minute;
- $i += 2 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "MM") {
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_month = $this->_formatNumber(
- $this->month,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_month)) {
- return $hs_month;
- }
-
- $ret .= $hs_month;
- $i += 2 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 5)) == "MONTH") {
- $hs_month = Date_Calc::getMonthFullname($this->month);
-
- if (!$hb_nopad) {
- if (is_null($hn_monthpad)) {
- // Set month padding variable:
- //
- $hn_monthpad = 0;
- foreach (Date_Calc::getMonthNames() as $hs_monthofyear) {
- $hn_monthpad = max(
- $hn_monthpad,
- strlen($hs_monthofyear)
- );
- }
- }
- $hs_month = str_pad(
- $hs_month,
- $hn_monthpad,
- " ",
- STR_PAD_RIGHT
- );
- }
-
- $ret .= $hb_lower ?
- strtolower($hs_month) :
- (substr($ps_format, $i + 1, 1) == "O" ?
- strtoupper($hs_month) :
- $hs_month);
- $i += 5;
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "MON") {
- $hs_month = Date_Calc::getMonthAbbrname($this->month);
- $ret .= $hb_lower ?
- strtolower($hs_month) :
- (substr($ps_format, $i + 1, 1) == "O" ?
- strtoupper($hs_month) :
- $hs_month);
- $i += 3;
- }
-
- break;
- case "n":
- case "N":
- // No-Padding rule 'NP' applies to the next code (either trailing
- // spaces or leading/trailing noughts):
- //
- $hb_nopadflag = true;
- $i += 2;
- break;
- case "p":
- $hb_lower = true;
- // no break
- case "P":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- if (strtoupper(substr($ps_format, $i, 4)) == "P.M.") {
- $ret .= $this->hour < 12 ?
- ($hb_lower ? "a.m." : "A.M.") :
- ($hb_lower ? "p.m." : "P.M.");
- $i += 4;
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "PM") {
- $ret .= $this->hour < 12 ?
- ($hb_lower ? "am" : "AM") :
- ($hb_lower ? "pm" : "PM");
- $i += 2;
- }
-
- break;
- case "q":
- case "Q":
- // N.B. Current implementation ignores the day and year, but
- // it is possible that a different implementation might be
- // desired, so pass these parameters anyway:
- //
- $hn_quarter = Date_Calc::quarterOfYear(
- $this->day,
- $this->month,
- $this->year
- );
- $hs_numberformat = substr($ps_format, $i + 1, 4);
- $hs_quarter = $this->_formatNumber(
- $hn_quarter,
- $hs_numberformat,
- 1,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_quarter)) {
- return $hs_quarter;
- }
-
- $ret .= $hs_quarter;
- $i += 1 + strlen($hs_numberformat);
- break;
- case "r":
- $hb_lower = true;
- // no break
- case "R":
- // Code 'RM':
- //
- switch ($this->month) {
- case 1:
- $hs_monthroman = "i";
- break;
- case 2:
- $hs_monthroman = "ii";
- break;
- case 3:
- $hs_monthroman = "iii";
- break;
- case 4:
- $hs_monthroman = "iv";
- break;
- case 5:
- $hs_monthroman = "v";
- break;
- case 6:
- $hs_monthroman = "vi";
- break;
- case 7:
- $hs_monthroman = "vii";
- break;
- case 8:
- $hs_monthroman = "viii";
- break;
- case 9:
- $hs_monthroman = "ix";
- break;
- case 10:
- $hs_monthroman = "x";
- break;
- case 11:
- $hs_monthroman = "xi";
- break;
- case 12:
- $hs_monthroman = "xii";
- break;
- }
-
- $hs_monthroman = $hb_lower ?
- $hs_monthroman :
- strtoupper($hs_monthroman);
- $ret .= $hb_nopad ?
- $hs_monthroman :
- str_pad($hs_monthroman, 4, " ", STR_PAD_LEFT);
- $i += 2;
- break;
- case "s":
- case "S":
- // Check for 'SSSSS' before 'SS':
- //
- if (strtoupper(substr($ps_format, $i, 5)) == "SSSSS") {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $hs_numberformat = substr($ps_format, $i + 5, 4);
- $hn_second = Date_Calc::secondsPastMidnight(
- $this->hour,
- $this->minute,
- $this->second
- );
- $hs_second = $this->_formatNumber(
- $hn_second,
- $hs_numberformat,
- 5,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_second)) {
- return $hs_second;
- }
-
- $ret .= $hs_second;
- $i += 5 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "SS") {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_second = $this->_formatNumber(
- $this->second,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_second)) {
- return $hs_second;
- }
-
- $ret .= $hs_second;
- $i += 2 + strlen($hs_numberformat);
- } else {
- // One of the following codes:
- // 'SC(CCC...)'
- // 'SY(YYY...)'
- // 'SIY(YYY...)'
- // 'STZH'
- // 'STZS'
- // 'SYEAR'
- //
- $hb_showsignflag = true;
- if ($hb_nopad) {
- $hb_nopadflag = true;
- }
- ++$i;
- }
-
- break;
- case "t":
- case "T":
- // Code TZ[...]:
- //
-
- if (strtoupper(substr($ps_format, $i, 3)) == "TZR") {
- // This time-zone-related code can be called when the time is
- // invalid, but the others should return an error:
- //
- $ret .= $this->getTZID();
- $i += 3;
- } else {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- if (strtoupper(substr($ps_format, $i, 3)) == "TZC") {
- $ret .= $this->getTZShortName();
- $i += 3;
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "TZH") {
- if (is_null($hn_tzoffset)) {
- $hn_tzoffset = $this->getTZOffset();
- }
-
- $hs_numberformat = substr($ps_format, $i + 3, 4);
- $hn_tzh = intval($hn_tzoffset / 3600000);
-
- // Suppress sign here (it is added later):
- //
- $hs_tzh = $this->_formatNumber(
- $hn_tzh,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_tzh)) {
- return $hs_tzh;
- }
-
- // Display sign, even if positive:
- //
- $ret .= ($hb_nosign ? "" : ($hn_tzh >= 0 ? '+' : '-')) .
- $hs_tzh;
- $i += 3 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "TZI") {
- $ret .= ($this->inDaylightTime() ? '1' : '0');
- $i += 3;
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "TZM") {
- if (is_null($hn_tzoffset)) {
- $hn_tzoffset = $this->getTZOffset();
- }
-
- $hs_numberformat = substr($ps_format, $i + 3, 4);
- $hn_tzm = intval(($hn_tzoffset % 3600000) / 60000);
-
- // Suppress sign:
- //
- $hs_tzm = $this->_formatNumber(
- $hn_tzm,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_tzm)) {
- return $hs_tzm;
- }
-
- $ret .= $hs_tzm;
- $i += 3 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "TZN") {
- $ret .= $this->getTZLongName();
- $i += 3;
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "TZO") {
- if (is_null($hn_tzoffset)) {
- $hn_tzoffset = $this->getTZOffset();
- }
-
- $hn_tzh = intval(abs($hn_tzoffset) / 3600000);
- $hn_tzm = intval((abs($hn_tzoffset) % 3600000) / 60000);
-
- if ($hn_tzoffset == 0) {
- $ret .= $hb_nopad ? "Z" : "Z ";
- } else {
- // Display sign, even if positive:
- //
- $ret .= ($hn_tzoffset >= 0 ? '+' : '-') .
- sprintf("%02d", $hn_tzh) .
- ":" .
- sprintf("%02d", $hn_tzm);
- }
- $i += 3;
- } elseif (strtoupper(substr($ps_format, $i, 3)) == "TZS") {
- if (is_null($hn_tzoffset)) {
- $hn_tzoffset = $this->getTZOffset();
- }
-
- $hs_numberformat = substr($ps_format, $i + 3, 4);
- $hn_tzs = intval($hn_tzoffset / 1000);
- $hs_tzs = $this->_formatNumber(
- $hn_tzs,
- $hs_numberformat,
- 5,
- $hb_nopad,
- $hb_nosign,
- $ps_locale
- );
- if (Pear::isError($hs_tzs)) {
- return $hs_tzs;
- }
-
- $ret .= $hs_tzs;
- $i += 3 + strlen($hs_numberformat);
- }
- }
-
- break;
- case "u":
- case "U":
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- $hn_unixtime = $this->getTime();
- $hs_numberformat = substr($ps_format, $i + 1, 4);
-
- // Allow sign if negative; allow all digits (specify nought);
- // suppress padding:
- //
- $hs_unixtime = $this->_formatNumber(
- $hn_unixtime,
- $hs_numberformat,
- 0,
- true,
- false,
- $ps_locale
- );
- if (Pear::isError($hs_unixtime)) {
- return $hs_unixtime;
- }
-
- $ret .= $hs_unixtime;
- $i += 1 + strlen($hs_numberformat);
- break;
- case "w":
- case "W":
- // Check for 'WW' before 'W':
- //
- if (strtoupper(substr($ps_format, $i, 2)) == "WW") {
- $hn_week = Date_Calc::weekOfYearAbsolute(
- $this->day,
- $this->month,
- $this->year
- );
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_week = $this->_formatNumber(
- $hn_week,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_week)) {
- return $hs_week;
- }
-
- $ret .= $hs_week;
- $i += 2 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "W1") {
- $hn_week = Date_Calc::weekOfYear1st(
- $this->day,
- $this->month,
- $this->year
- );
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_week = $this->_formatNumber(
- $hn_week,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_week)) {
- return $hs_week;
- }
-
- $ret .= $hs_week;
- $i += 2 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "W4") {
- $ha_week = Date_Calc::weekOfYear4th(
- $this->day,
- $this->month,
- $this->year
- );
- $hn_week = $ha_week[1];
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_week = $this->_formatNumber(
- $hn_week,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_week)) {
- return $hs_week;
- }
-
- $ret .= $hs_week;
- $i += 2 + strlen($hs_numberformat);
- } elseif (strtoupper(substr($ps_format, $i, 2)) == "W7") {
- $ha_week = Date_Calc::weekOfYear7th(
- $this->day,
- $this->month,
- $this->year
- );
- $hn_week = $ha_week[1];
- $hs_numberformat = substr($ps_format, $i + 2, 4);
- $hs_week = $this->_formatNumber(
- $hn_week,
- $hs_numberformat,
- 2,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_week)) {
- return $hs_week;
- }
-
- $ret .= $hs_week;
- $i += 2 + strlen($hs_numberformat);
- } else {
- // Code 'W':
- //
- $hn_week = Date_Calc::weekOfMonthAbsolute(
- $this->day,
- $this->month,
- $this->year
- );
- $hs_numberformat = substr($ps_format, $i + 1, 4);
- $hs_week = $this->_formatNumber(
- $hn_week,
- $hs_numberformat,
- 1,
- $hb_nopad,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_week)) {
- return $hs_week;
- }
-
- $ret .= $hs_week;
- $i += 1 + strlen($hs_numberformat);
- }
-
- break;
- case "y":
- case "Y":
- // Check for 'YEAR' first:
- //
- if (strtoupper(substr($ps_format, $i, 4)) == "YEAR") {
- switch (substr($ps_format, $i, 2)) {
- case "YE":
- $hs_spformat = "SP";
- break;
- case "Ye":
- $hs_spformat = "Sp";
- break;
- default:
- $hs_spformat = "sp";
- }
-
- if (($hn_yearabs = abs($this->year)) < 100 ||
- $hn_yearabs % 100 < 10) {
- $hs_numberformat = $hs_spformat;
-
- // Allow all digits (specify nought); padding irrelevant:
- //
- $hs_year = $this->_formatNumber(
- $this->year,
- $hs_numberformat,
- 0,
- true,
- $hb_nosign,
- $ps_locale
- );
- if (Pear::isError($hs_year)) {
- return $hs_year;
- }
-
- $ret .= $hs_year;
- } else {
- // Year is spelled 'Nineteen Twelve' rather than
- // 'One thousand Nine Hundred Twelve':
- //
- $hn_century = intval($this->year / 100);
- $hs_numberformat = $hs_spformat;
-
- // Allow all digits (specify nought); padding irrelevant:
- //
- $hs_century = $this->_formatNumber(
- $hn_century,
- $hs_numberformat,
- 0,
- true,
- $hb_nosign,
- $ps_locale
- );
- if (Pear::isError($hs_century)) {
- return $hs_century;
- }
-
- $ret .= $hs_century . " ";
-
- $hs_numberformat = $hs_spformat;
-
- // Discard sign; padding irrelevant:
- //
- $hs_year = $this->_formatNumber(
- $this->year,
- $hs_numberformat,
- 2,
- false,
- true,
- $ps_locale
- );
- if (Pear::isError($hs_year)) {
- return $hs_year;
- }
-
- $ret .= $hs_year;
- }
-
- $i += 4;
- } else {
- // Code Y(YYY...):
- //
- $hn_codelen = 1;
- while (strtoupper(substr(
- $ps_format,
- $i + $hn_codelen,
- 1
- )) == "Y") {
- ++$hn_codelen;
- }
-
- $hs_thousandsep = null;
- $hn_thousandseps = 0;
- if ($hn_codelen <= 3) {
- while (preg_match(
- '/([,.�\' ])YYY/i',
- substr(
- $ps_format,
- $i + $hn_codelen,
- 4
- ),
- $ha_matches
- )) {
- $hn_codelen += 4;
- $hs_thousandsep = $ha_matches[1];
- ++$hn_thousandseps;
- }
- }
-
- // Check next code is not 'YEAR'
- //
- if ($hn_codelen > 1 &&
- strtoupper(substr(
- $ps_format,
- $i + $hn_codelen - 1,
- 4
- )) == "YEAR") {
- --$hn_codelen;
- }
-
- $hs_numberformat = substr($ps_format, $i + $hn_codelen, 4);
- $hs_year = $this->_formatNumber(
- $this->year,
- $hs_numberformat,
- $hn_codelen -
- $hn_thousandseps,
- $hb_nopad,
- $hb_nosign,
- $ps_locale,
- $hs_thousandsep
- );
- if (Pear::isError($hs_year)) {
- return $hs_year;
- }
-
- $ret .= $hs_year;
- $i += $hn_codelen + strlen($hs_numberformat);
- }
-
- break;
- default:
- $ret .= $hs_char;
- ++$i;
- break;
- }
- }
- return $ret;
- }
-
-
- // }}}
- // {{{ formatLikeDate()
-
- /**
- * Formats the date according to the specified formatting code string,
- * based on {@link http://www.php.net/date date()}
- *
- * All date() formatting options are supported except '<b>B</b>'. This
- * function also responds to the DATE_* constants, such as DATE_COOKIE,
- * which are specified at:
- *
- * {@link http://www.php.net/manual/en/datetime.constants.php}
- *
- *
- * Formatting options:
- *
- * (Day)
- *
- * - <b>d</b> - Day of the month, 2 digits with leading zeros (01 to 31)
- * - <b>D</b> - A textual representation of a day, three letters ('Mon'
- * to 'Sun')
- * - <b>j</b> - Day of the month without leading zeros (1 to 31)
- * - <b>l</b> - [lowercase 'L'] A full textual representation of the day
- * of the week ('Sunday' to 'Saturday')
- * - <b>N</b> - ISO-8601 numeric representation of the day of the week
- * (1 (for Monday) to 7 (for Sunday)) (see '<b>W</b>')
- * - <b>S</b> - English ordinal suffix for the day of the month, 2
- * characters ('st', 'nd', 'rd' or 'th')
- * - <b>w</b> - Numeric representation of the day of the week (0 (for
- * Sunday) to 6 (for Saturday))
- * - <b>z</b> - The day of the year, starting from 0 (0 to 365)
- *
- * (Week)
- *
- * - <b>W</b> - {@link http://en.wikipedia.org/wiki/ISO_week_date ISO-8601}
- * week number of year, weeks starting on Monday (00 to 53)
- *
- * (Month)
- *
- * - <b>F</b> - A full textual representation of a month ('January' to
- * 'December')
- * - <b>m</b> - Numeric representation of a month, with leading zeros
- * (01 to 12)
- * - <b>M</b> - A short textual representation of a month, three letters
- * ('Jan' to 'Dec')
- * - <b>n</b> - Numeric representation of a month, without leading zeros
- * (1 to 12)
- * - <b>t</b> - Number of days in the given month (28 to 31)
- *
- * (Year)
- *
- * - <b>L</b> - Whether it is a leap year (1 if it is a leap year, 0
- * otherwise)
- * - <b>o</b> - ISO-8601 year number (see '<b>W</b>'). This has the same
- * value as '<b>Y</b>', except that if the ISO week number
- * ('<b>W</b>') belongs to the previous or next year, that
- * year is used instead.
- * - <b>Y</b> - A full numeric representation of a year, 4 digits (0000
- * to 9999)
- * - <b>y</b> - A two digit representation of a year (00 to 99)
- *
- * (Time)
- *
- * - <b>a</b> - Lowercase Ante meridiem and Post meridiem ('am' or
- * 'pm')
- * - <b>A</b> - Uppercase Ante meridiem and Post meridiem ('AM' or
- * 'PM')
- * - <b>g</b> - 12-hour format of an hour without leading zeros (1 to 12)
- * - <b>G</b> - 24-hour format of an hour without leading zeros (0 to 23)
- * - <b>h</b> - 12-hour format of an hour with leading zeros (01 to 12)
- * - <b>H</b> - 24-hour format of an hour with leading zeros (00 to 23)
- * - <b>i</b> - Minutes with leading zeros (00 to 59)
- * - <b>s</b> - Seconds, with leading zeros (00 to 59)
- * - <b>u</b> - Milliseconds, e.g. '54321'
- *
- * (Time Zone)
- *
- * - <b>e</b> - Timezone identifier, e.g. Europe/London
- * - <b>I</b> - Whether or not the date is in Summer time (1 if Summer
- * time, 0 otherwise)
- * - <b>O</b> - Difference to Greenwich time (GMT) in hours, e.g. '+0200'
- * - <b>P</b> - Difference to Greenwich time (GMT) with colon between
- * hours and minutes, e.g. '+02:00'
- * - <b>T</b> - Timezone abbreviation, e.g. 'GMT', 'EST'
- * - <b>Z</b> - Timezone offset in seconds. The offset for timezones west
- * of UTC is always negative, and for those east of UTC is
- * always positive. (-43200 to 50400)
- *
- * (Full Date/Time)
- *
- * - <b>c</b> - ISO 8601 date, e.g. '2004-02-12T15:19:21+00:00'
- * - <b>r</b> - RFC 2822 formatted date, e.g.
- * 'Thu, 21 Dec 2000 16:01:07 +0200'
- * - <b>U</b> - Seconds since the Unix Epoch
- * (January 1 1970 00:00:00 GMT)
- *
- * @param string $ps_format the format string for returned date/time
- *
- * @return string date/time in given format
- * @access public
- * @see Date::format(), Date::formatLikeStrftime(), Date::formatLikeSQL()
- * @since Method available since Release 1.5.0
- */
- public function formatLikeDate($ps_format)
- {
- $hs_formatlikesqlstr = "";
-
- for ($i = 0; $i < strlen($ps_format); ++$i) {
- switch ($hs_char = substr($ps_format, $i, 1)) {
- case 'd':
- $hs_formatlikesqlstr .= 'DD';
- break;
- case 'D':
- $hs_formatlikesqlstr .= 'NPDy';
- break;
- case 'j':
- $hs_formatlikesqlstr .= 'NPDD';
- break;
- case 'l':
- $hs_formatlikesqlstr .= 'NPDay';
- break;
- case 'N':
- $hs_formatlikesqlstr .= 'ID';
- break;
- case 'S':
- $hs_formatlikesqlstr .= 'th';
- break;
- case 'w':
- $hs_formatlikesqlstr .= 'D';
- break;
- case 'z':
- $hs_formatlikesqlstr .= '"' . ($this->getDayOfYear() - 1) . '"';
- break;
- case 'W':
- $hs_formatlikesqlstr .= 'IW';
- break;
- case 'F':
- $hs_formatlikesqlstr .= 'NPMonth';
- break;
- case 'm':
- $hs_formatlikesqlstr .= 'MM';
- break;
- case 'M':
- $hs_formatlikesqlstr .= 'NPMon';
- break;
- case 'n':
- $hs_formatlikesqlstr .= 'NPMM';
- break;
- case 't':
- $hs_formatlikesqlstr .= '"' . $this->getDaysInMonth() . '"';
- break;
- case 'L':
- $hs_formatlikesqlstr .= '"' . ($this->isLeapYear() ? 1 : 0) . '"';
- break;
- case 'o':
- $hs_formatlikesqlstr .= 'IYYY';
- break;
- case 'Y':
- $hs_formatlikesqlstr .= 'YYYY';
- break;
- case 'y':
- $hs_formatlikesqlstr .= 'YY';
- break;
- case 'a':
- $hs_formatlikesqlstr .= 'am';
- break;
- case 'A':
- $hs_formatlikesqlstr .= 'AM';
- break;
- case 'g':
- $hs_formatlikesqlstr .= 'NPHH12';
- break;
- case 'G':
- $hs_formatlikesqlstr .= 'NPHH24';
- break;
- case 'h':
- $hs_formatlikesqlstr .= 'HH12';
- break;
- case 'H':
- $hs_formatlikesqlstr .= 'HH24';
- break;
- case 'i':
- $hs_formatlikesqlstr .= 'MI';
- break;
- case 's':
- $hs_formatlikesqlstr .= 'SS';
- break;
- case 'u':
- $hs_formatlikesqlstr .= 'SSFFF';
- break;
- case 'e':
- $hs_formatlikesqlstr .= 'TZR';
- break;
- case 'I':
- $hs_formatlikesqlstr .= 'TZI';
- break;
- case 'O':
- $hs_formatlikesqlstr .= 'STZHTZM';
- break;
- case 'P':
- $hs_formatlikesqlstr .= 'STZH:TZM';
- break;
- case 'T':
- $hs_formatlikesqlstr .= 'TZC';
- break;
- case 'Z':
- $hs_formatlikesqlstr .= 'TZS';
- break;
- case 'c':
- $hs_formatlikesqlstr .= 'YYYY-MM-DD"T"HH24:MI:SSSTZH:TZM';
- break;
- case 'r':
- $hs_formatlikesqlstr .= 'Dy, DD Mon YYYY HH24:MI:SS STZHTZM';
- break;
- case 'U':
- $hs_formatlikesqlstr .= 'U';
- break;
- case '\\':
- $hs_char = substr($ps_format, ++$i, 1);
- $hs_formatlikesqlstr .= '"' .
- ($hs_char == '\\' ? '\\\\' : $hs_char) .
- '"';
- break;
- case '"':
- $hs_formatlikesqlstr .= '"\\""';
- break;
- default:
- $hs_formatlikesqlstr .= '"' . $hs_char . '"';
- }
- }
-
- $ret = $this->formatLikeSQL($hs_formatlikesqlstr);
- if (PEAR::isError($ret) &&
- $ret->getCode() == DATE_ERROR_INVALIDFORMATSTRING) {
- return PEAR::raiseError(
- "Invalid date format '$ps_format'",
- DATE_ERROR_INVALIDFORMATSTRING
- );
- }
-
- return $ret;
- }
-
-
- // }}}
- // {{{ setFromTime()
-
- /**
- * Sets the date/time using a Unix time-stamp
- *
- * This may only be valid for dates from 1970 to ~2038. N.B. this
- * function makes a call to {@link http://www.php.net/gmdate gmdate()}
- *
- * @param int $pn_timestamp Unix time-stamp
- *
- * @return void
- * @access public
- * @see Date::getTime(), Date::setDate()
- */
- public function setFromTime($pn_timestamp)
- {
- // Unix Time; N.B. Unix Time is defined relative to GMT,
- // so it needs to be adjusted for the current time zone;
- // however we do not know if it is in Summer time until
- // we have converted it from Unix time:
- //
-
- // Get current time zone details:
- //
- $hs_id = $this->getTZID();
-
- // Input Unix time as UTC:
- //
- $this->tz = new Date_TimeZone("UTC");
- $this->setDate(gmdate("Y-m-d H:i:s", $pn_timestamp));
-
- // Convert back to correct time zone:
- //
- $this->convertTZByID($hs_id);
- }
-
-
- // }}}
- // {{{ getTime()
-
- /**
- * Returns the date/time as Unix time-stamp (as returned for example by
- * {@link http://www.php.net/time time()})
- *
- * This may only be valid for dates from 1970 to ~2038. N.B. this
- * function makes a call to {@link http://www.php.net/gmmktime gmmktime()}
- *
- * @return int number of seconds since the Unix epoch
- * @access public
- */
- public function getTime()
- {
- if ($this->ob_invalidtime) {
- $ret = $this->_getErrorInvalidTime();
- } else {
- // Use 'gmmktime()' and offset result (to get UTC):
- //
- return gmmktime(
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardsecond,
- $this->on_standardmonth,
- $this->on_standardday,
- $this->on_standardyear
- ) -
- $this->tz->getRawOffset() / 1000; // N.B. Unix-time excludes
- // leap seconds by
- // definition
- }
- }
-
-
- // }}}
- // {{{ getTZID()
-
- /**
- * Returns the unique ID of the time zone, e.g. 'America/Chicago'
- *
- * @return string the time zone ID
- * @access public
- * @see Date::setTZByID(), Date::getTZLongName(),
- * Date::getTZShortName(), Date_TimeZone
- * @since Method available since Release 1.5.0
- */
- public function getTZID()
- {
- return $this->tz->getID();
- }
-
-
- // }}}
- // {{{ _setTZToDefault()
-
- /**
- * sets time zone to the default time zone
- *
- * If PHP version >= 5.1.0, uses date_default_timezone_get(),
- * else the value returned by
- * '{@link http://www.php.net/date date("e")}'
- * if valid, else the default specified if the global
- * constant '$GLOBALS["_DATE_TIMEZONE_DEFAULT"]', which if itself
- * left unset, defaults to "UTC".
- *
- * N.B. this is a private method; to set the time zone to the
- * default publicly you should call '{@link Date::setTZByID()}',
- * that is, with no parameter (or a parameter of null).
- *
- * @return void
- * @access private
- * @since Method available since Release 1.5.0
- */
- public function _setTZToDefault()
- {
- if (function_exists('version_compare') &&
- version_compare(phpversion(), "5.1.0", ">=") &&
- (
- Date_TimeZone::isValidID($hs_id = date_default_timezone_get()) ||
- Date_TimeZone::isValidID($hs_id = date("e"))
- )
- ) {
- $this->tz = new Date_TimeZone($hs_id);
- } else {
- $this->tz = Date_TimeZone::getDefault();
- }
- }
-
-
- // }}}
- // {{{ setTZ()
-
- /**
- * Sets the time zone of this Date
- *
- * Sets the time zone of this date with the given
- * Date_TimeZone object. Does not alter the date/time,
- * only assigns a new time zone. For conversion, use
- * {@link Date::convertTZ()}.
- *
- * @param object $tz the Date_TimeZone object to use. If called with a
- * parameter that is not a Date_TimeZone object, will
- * fall through to setTZByID().
- *
- * @return void
- * @access public
- * @see Date::setTZByID(), Date::convertTZ(),
- * Date_TimeZone::Date_TimeZone(), Date_TimeZone
- */
- public function setTZ($tz)
- {
- if (is_a($tz, 'Date_Timezone')) {
- $this->setTZByID($tz->getID());
- } else {
- $res = $this->setTZByID($tz);
- if (PEAR::isError($res)) {
- return $res;
- }
- }
- }
-
-
- // }}}
- // {{{ setTZByID()
-
- /**
- * Sets the time zone of this date with the given time zone ID
- *
- * The time zone IDs are drawn from the 'tz data-base' (see
- * {@link http://en.wikipedia.org/wiki/Zoneinfo}), which is the de facto
- * internet and IT standard. (There is no official standard, and
- * the tz data-base is not intended to be a regulating body
- * anyway.) Lists of valid IDs are maintained at:
- *
- * - {@link http://en.wikipedia.org/wiki/List_of_zoneinfo_timezones}
- * - {@link http://www.php.net/manual/en/timezones.php}
- *
- * If no time-zone is specified and PHP version >= 5.1.0, the time
- * zone is set automatically to the output of date_default_timezone_get()
- * if set and valid, else the value returned by
- * '{@link http://www.php.net/date date("e")}'
- * if valid, else the default specified if the global
- * constant '$GLOBALS["_DATE_TIMEZONE_DEFAULT"]', which if itself
- * left unset, defaults to "UTC".
- *
- * N.B. this function preserves the local date and time, that is,
- * whether in local Summer time or local standard time. For example,
- * if the time is set to 11.00 Summer time, and the time zone is then
- * set to another time zone, using this function, in which the date
- * falls in standard time, then the time will remain set to 11.00 UTC,
- * and not 10.00. You can convert a date to another time zone by
- * calling '{@link Date::convertTZ()}', which preserves the actual
- * time as measured against UTC.
- *
- * The ID can also be specified as a UTC offset in one of the following
- * forms, i.e. an offset with no geographical or political base:
- *
- * - <b>UTC[+/-][h]</b> - e.g. UTC-1 (the preferred form)
- * - <b>UTC[+/-][hh]</b> - e.g. UTC+03
- * - <b>UTC[+/-][hh][mm]</b> - e.g. UTC-0530
- * - <b>UTC[+/-][hh]:[mm]</b> - e.g. UTC+03:00
- *
- * N.B. 'UTC' seems to be technically preferred over 'GMT'. GMT-based
- * IDs still exist in the tz data-base, but beware of POSIX-style
- * offsets which are the opposite way round to what people normally
- * expect.
- *
- * @param string $ps_id a valid time zone id, e.g. 'Europe/London'
- *
- * @return void
- * @access public
- * @see Date::getTZID(), Date::setTZ(), Date::convertTZByID(),
- * Date_TimeZone::isValidID(), Date_TimeZone::Date_TimeZone(),
- * Date_TimeZone
- */
- public function setTZByID($ps_id = null)
- {
- // Whether the date is in Summer time forms the default for
- // the new time zone (if needed, which is very unlikely anyway).
- // This is mainly to prevent unexpected (defaulting) behaviour
- // if the user is in the repeated hour, and switches to a time
- // zone that is also in the repeated hour (e.g. 'Europe/London'
- // and 'Europe/Lisbon').
- //
- $hb_insummertime = $this->inDaylightTime();
- if (PEAR::isError($hb_insummertime)) {
- if ($hb_insummertime->getCode() == DATE_ERROR_INVALIDTIME) {
- $hb_insummertime = false;
- } else {
- return $hb_insummertime;
- }
- }
-
- if (is_null($ps_id)) {
- $this->_setTZToDefault();
- } elseif (Date_TimeZone::isValidID($ps_id)) {
- $this->tz = new Date_TimeZone($ps_id);
- } else {
- return PEAR::raiseError(
- "Invalid time zone ID '$ps_id'",
- DATE_ERROR_INVALIDTIMEZONE
- );
- }
-
- $this->setLocalTime(
- $this->day,
- $this->month,
- $this->year,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond,
- $hb_insummertime
- );
- }
-
-
- // }}}
- // {{{ getTZLongName()
-
- /**
- * Returns the long name of the time zone
- *
- * Returns long form of time zone name, e.g. 'Greenwich Mean Time'.
- * N.B. if the date falls in Summer time, the Summer time name will be
- * returned instead, e.g. 'British Summer Time'.
- *
- * N.B. this is not a unique identifier for the time zone - for this
- * purpose use the time zone ID.
- *
- * @return string the long name of the time zone
- * @access public
- * @see Date::getTZID(), Date::getTZShortName(),
- * Date_TimeZone::getLongName()
- * @since Method available since Release 1.5.0
- */
- public function getTZLongName()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->tz->getLongName($this->inDaylightTime());
- }
-
-
- // }}}
- // {{{ getTZShortName()
-
- /**
- * Returns the short name of the time zone
- *
- * Returns abbreviated form of time zone name, e.g. 'GMT'. N.B. if the
- * date falls in Summer time, the Summer time name will be returned
- * instead, e.g. 'BST'.
- *
- * N.B. this is not a unique identifier - for this purpose use the
- * time zone ID.
- *
- * @return string the short name of the time zone
- * @access public
- * @see Date::getTZID(), Date::getTZLongName(),
- * Date_TimeZone::getShortName()
- * @since Method available since Release 1.5.0
- */
- public function getTZShortName()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->tz->getShortName($this->inDaylightTime());
- }
-
-
- // }}}
- // {{{ getTZOffset()
-
- /**
- * Returns the DST-corrected offset from UTC for the given date
- *
- * Gets the offset to UTC for a given date/time, taking into
- * account daylight savings time, if the time zone observes it and if
- * it is in effect.
- *
- * N.B. that the offset is calculated historically
- * and in the future according to the current Summer time rules,
- * and so this function is proleptically correct, but not necessarily
- * historically correct. (Although if you want to be correct about
- * times in the distant past, this class is probably not for you
- * because the whole notion of time zones does not apply, and
- * historically there are so many time zone changes, Summer time
- * rule changes, name changes, calendar changes, that calculating
- * this sort of information is beyond the scope of this package
- * altogether.)
- *
- * @return int the corrected offset to UTC in milliseconds
- * @access public
- * @see Date_TimeZone::getOffset()
- * @since Method available since Release 1.5.0
- */
- public function getTZOffset()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->tz->getOffset($this->inDaylightTime());
- }
-
-
- // }}}
- // {{{ inDaylightTime()
-
- /**
- * Tests if this date/time is in DST
- *
- * Returns true if daylight savings time is in effect for
- * this date in this date's time zone.
- *
- * @param bool $pb_repeatedhourdefault value to return if repeated hour is
- * specified (defaults to false)
- *
- * @return boolean true if DST is in effect for this date
- * @access public
- * @see Date_TimeZone::hasDaylightTime(), Date_TimeZone::inDaylightTime()
- */
- public function inDaylightTime($pb_repeatedhourdefault = false)
- {
- if (!$this->tz->hasDaylightTime()) {
- return false;
- }
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- // The return value is 'cached' whenever the date/time is set:
- //
- return $this->hour != $this->on_standardhour ||
- $this->minute != $this->on_standardminute ||
- $this->second != $this->on_standardsecond ||
- $this->partsecond != $this->on_standardpartsecond ||
- $this->day != $this->on_standardday ||
- $this->month != $this->on_standardmonth ||
- $this->year != $this->on_standardyear;
- //
- // (these last 3 conditions are theoretical
- // possibilities but normally will never occur)
- }
-
-
- // }}}
- // {{{ convertTZ()
-
- /**
- * Converts this date to a new time zone
- *
- * Previously this might not have worked correctly if your system did
- * not allow {@link http://www.php.net/putenv putenv()} or if
- * {@link http://www.php.net/localtime localtime()} did not work in
- * your environment, but this implementation is no longer used.
- *
- * @param object $tz Date_TimeZone object to convert to
- *
- * @return void
- * @access public
- * @see Date::convertTZByID(), Date::toUTC(),
- * Date_TimeZone::Date_TimeZone(), Date_TimeZone
- */
- public function convertTZ($tz)
- {
- if ($this->getTZID() == $tz->getID()) {
- return;
- }
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- $hn_rawoffset = $tz->getRawOffset() - $this->tz->getRawOffset();
- $this->tz = new Date_TimeZone($tz->getID());
-
- list($hn_standardyear,
- $hn_standardmonth,
- $hn_standardday,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardsecond,
- $hn_standardpartsecond) =
- $this->_addOffset(
- $hn_rawoffset,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardsecond,
- $this->on_standardpartsecond
- );
-
- $this->setStandardTime(
- $hn_standardday,
- $hn_standardmonth,
- $hn_standardyear,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardsecond,
- $hn_standardpartsecond
- );
- }
-
-
- // }}}
- // {{{ toUTC()
-
- /**
- * Converts this date to UTC and sets this date's timezone to UTC
- *
- * @return void
- * @access public
- * @see Date::convertTZ(), Date::convertTZByID(), Date::toUTCbyOffset()
- */
- public function toUTC()
- {
- if ($this->getTZID() == "UTC") {
- return;
- }
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- $res = $this->convertTZ(new Date_TimeZone("UTC"));
- if (PEAR::isError($res)) {
- return $res;
- }
- }
-
-
- // }}}
- // {{{ convertTZByID()
-
- /**
- * Converts this date to a new time zone, given a valid time zone ID
- *
- * Previously this might not have worked correctly if your system did
- * not allow {@link http://www.php.net/putenv putenv()} or if
- * {@link http://www.php.net/localtime localtime()} did not work
- * in your environment, but this implementation is no longer used.
- *
- * @param string $ps_id a valid time zone id, e.g. 'Europe/London'
- *
- * @return void
- * @access public
- * @see Date::convertTZ(), Date::toUTC(), Date::setTZByID(),
- * Date_TimeZone::isValidID(), Date_TimeZone::Date_TimeZone(),
- * Date_TimeZone
- */
- public function convertTZByID($ps_id)
- {
- if (!Date_TimeZone::isValidID($ps_id)) {
- return PEAR::raiseError(
- "Invalid time zone ID '$ps_id'",
- DATE_ERROR_INVALIDTIMEZONE
- );
- }
-
- $res = $this->convertTZ(new Date_TimeZone($ps_id));
-
- if (PEAR::isError($res)) {
- return $res;
- }
- }
-
-
- // }}}
- // {{{ toUTCbyOffset()
-
- /**
- * Converts the date/time to UTC by the offset specified
- *
- * This function is no longer called from within the Date class
- * itself because a time zone can be set using a pure offset
- * (e.g. UTC+1), i.e. not a geographical time zone. However
- * it is retained for backwards compaibility.
- *
- * @param string $ps_offset offset of the form '<b>[+/-][hh]:[mm]</b>',
- * '<b>[+/-][hh][mm]</b>', or '<b>Z</b>'
- *
- * @return bool
- * @access private
- * @see Date::toUTC(), Date::convertTZ(), Date::convertTZByID()
- */
- public function toUTCbyOffset($ps_offset)
- {
- if ($ps_offset == "Z" ||
- preg_match('/^[+\-](00:?00|0{1,2})$/', $ps_offset)) {
- $hs_tzid = "UTC";
- } elseif (preg_match(
- '/^[+\-]([0-9]{2,2}:?[0-5][0-9]|[0-9]{1,2})$/',
- $ps_offset
- )) {
- $hs_tzid = "UTC" . $ps_offset;
- } else {
- return PEAR::raiseError("Invalid offset '$ps_offset'");
- }
-
- // If the time is invalid, it does not matter here:
- //
- $this->setTZByID($hs_tzid);
-
- // Now the time will be valid because it is a time zone that
- // does not observe Summer time:
- //
- $this->toUTC();
- }
-
-
- // }}}
- // {{{ addYears()
-
- /**
- * Converts the date to the specified no of years from the given date
- *
- * To subtract years use a negative value for the '$pn_years'
- * parameter
- *
- * @param int $pn_years years to add
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function addYears($pn_years)
- {
- list($hs_year, $hs_month, $hs_day) =
- explode(" ", Date_Calc::addYears(
- $pn_years,
- $this->day,
- $this->month,
- $this->year,
- "%Y %m %d"
- ));
- $this->setLocalTime(
- $hs_day,
- $hs_month,
- $hs_year,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond
- );
- }
-
-
- // }}}
- // {{{ addMonths()
-
- /**
- * Converts the date to the specified no of months from the given date
- *
- * To subtract months use a negative value for the '$pn_months'
- * parameter
- *
- * @param int $pn_months months to add
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function addMonths($pn_months)
- {
- list($hs_year, $hs_month, $hs_day) =
- explode(" ", Date_Calc::addMonths(
- $pn_months,
- $this->day,
- $this->month,
- $this->year,
- "%Y %m %d"
- ));
- $this->setLocalTime(
- $hs_day,
- $hs_month,
- $hs_year,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond
- );
- }
-
-
- // }}}
- // {{{ addDays()
-
- /**
- * Converts the date to the specified no of days from the given date
- *
- * To subtract days use a negative value for the '$pn_days' parameter
- *
- * @param int $pn_days days to add
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function addDays($pn_days)
- {
- list($hs_year, $hs_month, $hs_day) =
- explode(" ", Date_Calc::addDays(
- $pn_days,
- $this->day,
- $this->month,
- $this->year,
- "%Y %m %d"
- ));
- $this->setLocalTime(
- $hs_day,
- $hs_month,
- $hs_year,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond
- );
- }
-
-
- // }}}
- // {{{ addHours()
-
- /**
- * Converts the date to the specified no of hours from the given date
- *
- * To subtract hours use a negative value for the '$pn_hours' parameter
- *
- * @param int $pn_hours hours to add
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function addHours($pn_hours)
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- list($hn_standardyear,
- $hn_standardmonth,
- $hn_standardday,
- $hn_standardhour) =
- Date_Calc::addHours(
- $pn_hours,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- $this->on_standardhour
- );
-
- $this->setStandardTime(
- $hn_standardday,
- $hn_standardmonth,
- $hn_standardyear,
- $hn_standardhour,
- $this->on_standardminute,
- $this->on_standardsecond,
- $this->on_standardpartsecond
- );
- }
-
-
- // }}}
- // {{{ addMinutes()
-
- /**
- * Converts the date to the specified no of minutes from the given date
- *
- * To subtract minutes use a negative value for the '$pn_minutes' parameter
- *
- * @param int $pn_minutes minutes to add
- *
- * @return void
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function addMinutes($pn_minutes)
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- list($hn_standardyear,
- $hn_standardmonth,
- $hn_standardday,
- $hn_standardhour,
- $hn_standardminute) =
- Date_Calc::addMinutes(
- $pn_minutes,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- $this->on_standardhour,
- $this->on_standardminute
- );
-
- $this->setStandardTime(
- $hn_standardday,
- $hn_standardmonth,
- $hn_standardyear,
- $hn_standardhour,
- $hn_standardminute,
- $this->on_standardsecond,
- $this->on_standardpartsecond
- );
- }
-
-
- // }}}
- // {{{ addSeconds()
-
- /**
- * Adds a given number of seconds to the date
- *
- * @param mixed $sec the no of seconds to add as integer or float
- * @param bool $pb_countleap whether to count leap seconds (defaults to
- * value of count-leap-second object property)
- *
- * @return void
- * @access public
- */
- public function addSeconds($sec, $pb_countleap = null)
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
- if (!is_int($sec) && !is_float($sec)) {
- settype($sec, 'int');
- }
- if (!is_null($pb_countleap)) {
- $pb_countleap = $this->ob_countleapseconds;
- }
-
- if ($pb_countleap) {
- // Convert to UTC:
- //
- list($hn_standardyear,
- $hn_standardmonth,
- $hn_standardday,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardsecond,
- $hn_standardpartsecond) =
- $this->_addOffset(
- $this->tz->getRawOffset() * -1,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardsecond,
- $this->on_standardpartsecond
- );
- list($hn_standardyear,
- $hn_standardmonth,
- $hn_standardday,
- $hn_standardhour,
- $hn_standardminute,
- $hn_secondraw) =
- Date_Calc::addSeconds(
- $sec,
- $hn_standardday,
- $hn_standardmonth,
- $hn_standardyear,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardpartsecond == 0.0 ?
- $hn_standardsecond :
- $hn_standardsecond +
- $hn_standardpartsecond,
- $pb_countleap
- );
-
- if (is_float($hn_secondraw)) {
- $hn_standardsecond = intval($hn_secondraw);
- $hn_standardpartsecond = $hn_secondraw - $hn_standardsecond;
- } else {
- $hn_standardsecond = $hn_secondraw;
- $hn_standardpartsecond = 0.0;
- }
-
- list($hn_standardyear,
- $hn_standardmonth,
- $hn_standardday,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardsecond,
- $hn_standardpartsecond) =
- $this->_addOffset(
- $this->tz->getRawOffset(),
- $hn_standardday,
- $hn_standardmonth,
- $hn_standardyear,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardsecond,
- $hn_standardpartsecond
- );
- } else {
- // Use local standard time:
- //
- list($hn_standardyear,
- $hn_standardmonth,
- $hn_standardday,
- $hn_standardhour,
- $hn_standardminute,
- $hn_secondraw) =
- Date_Calc::addSeconds(
- $sec,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardpartsecond == 0.0 ?
- $this->on_standardsecond :
- $this->on_standardsecond +
- $this->on_standardpartsecond,
- false
- );
-
- if (is_float($hn_secondraw)) {
- $hn_standardsecond = intval($hn_secondraw);
- $hn_standardpartsecond = $hn_secondraw - $hn_standardsecond;
- } else {
- $hn_standardsecond = $hn_secondraw;
- $hn_standardpartsecond = 0.0;
- }
- }
-
- $this->setStandardTime(
- $hn_standardday,
- $hn_standardmonth,
- $hn_standardyear,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardsecond,
- $hn_standardpartsecond
- );
- }
-
-
- // }}}
- // {{{ subtractSeconds()
-
- /**
- * Subtracts a given number of seconds from the date
- *
- * @param mixed $sec the no of seconds to subtract as integer or
- * float
- * @param bool $pb_countleap whether to count leap seconds (defaults to
- * value of count-leap-second object property)
- *
- * @return void
- * @access public
- */
- public function subtractSeconds($sec, $pb_countleap = null)
- {
- if (is_null($pb_countleap)) {
- $pb_countleap = $this->ob_countleapseconds;
- }
-
- $res = $this->addSeconds(-$sec, $pb_countleap);
-
- if (PEAR::isError($res)) {
- return $res;
- }
- }
-
-
- // }}}
- // {{{ addSpan()
-
- /**
- * Adds a time span to the date
- *
- * A time span is defined as a unsigned no of days, hours, minutes
- * and seconds, where the no of minutes and seconds must be less than
- * 60, and the no of hours must be less than 24.
- *
- * A span is added (and subtracted) according to the following logic:
- *
- * Hours, minutes and seconds are added such that if they fall over
- * a leap second, the leap second is ignored, and not counted.
- * For example, if a leap second occurred at 23.59.60, the
- * following calculations:
- *
- * - 23.59.59 + one second
- * - 23.59.00 + one minute
- * - 23.00.00 + one hour
- *
- * would all produce 00.00.00 the next day.
- *
- * A day is treated as equivalent to 24 hours, so if the clocks
- * went backwards at 01.00, and one day was added to the time
- * 00.30, the result would be 23.30 the same day.
- *
- * This is the implementation which is thought to yield the behaviour
- * that the user is most likely to expect, or in another way of
- * looking at it, it is the implementation that produces the least
- * unexpected behaviour. It basically works in hours, that is, a day
- * is treated as exactly equivalent to 24 hours, and minutes and
- * seconds are treated as equivalent to 1/60th and 1/3600th of an
- * hour. It should be obvious that working in days is impractical;
- * working in seconds is problematic when it comes to adding days
- * that fall over leap seconds, where it would appear to most users
- * that the function adds only 23 hours, 59 minutes and 59 seconds.
- * It is also problematic to work in any kind of mixture of days,
- * hours, minutes, and seconds, because then the addition of a span
- * would sometimes depend on which order you add the constituent
- * parts, which undermines the concept of a span altogether.
- *
- * If you want alternative functionality, you must use a mixture of
- * the following functions instead:
- *
- * - {@link Date::addYears()}
- * - {@link Date::addMonths()}
- * - {@link Date::addDays()}
- * - {@link Date::addHours()}
- * - {@link Date::addMinutes()}
- * - {@link Date::addSeconds()}
- *
- * @param object $span the time span to add
- *
- * @return void
- * @access public
- * @see Date_Span
- */
- public function addSpan($span)
- {
- if (!is_a($span, 'Date_Span')) {
- return PEAR::raiseError("Invalid argument - not 'Date_Span' object");
- } elseif ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- $hn_days = $span->day;
- $hn_standardhour = $this->on_standardhour + $span->hour;
- $hn_standardminute = $this->on_standardminute + $span->minute;
- $hn_standardsecond = $this->on_standardsecond + $span->second;
-
- if ($hn_standardsecond >= 60) {
- ++$hn_standardminute;
- $hn_standardsecond -= 60;
- }
-
- if ($hn_standardminute >= 60) {
- ++$hn_standardhour;
- $hn_standardminute -= 60;
- }
-
- if ($hn_standardhour >= 24) {
- ++$hn_days;
- $hn_standardhour -= 24;
- }
-
- list($hn_standardyear, $hn_standardmonth, $hn_standardday) =
- explode(
- " ",
- Date_Calc::addDays(
- $hn_days,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- "%Y %m %d"
- )
- );
-
- $this->setStandardTime(
- $hn_standardday,
- $hn_standardmonth,
- $hn_standardyear,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardsecond,
- $this->on_standardpartsecond
- );
- }
-
-
- // }}}
- // {{{ subtractSpan()
-
- /**
- * Subtracts a time span from the date
- *
- * N.B. it is impossible for this function to count leap seconds,
- * because the result would be dependent on which order the consituent
- * parts of the span are subtracted from the date. Therefore, leap
- * seconds are ignored by this function. If you want to count leap
- * seconds, use {@link Date::subtractSeconds()}.
- *
- * @param object $span the time span to subtract
- *
- * @return void
- * @access public
- * @see Date_Span
- */
- public function subtractSpan($span)
- {
- if (!is_a($span, 'Date_Span')) {
- return PEAR::raiseError("Invalid argument - not 'Date_Span' object");
- } elseif ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- $hn_days = -$span->day;
- $hn_standardhour = $this->on_standardhour - $span->hour;
- $hn_standardminute = $this->on_standardminute - $span->minute;
- $hn_standardsecond = $this->on_standardsecond - $span->second;
-
- if ($hn_standardsecond < 0) {
- --$hn_standardminute;
- $hn_standardsecond += 60;
- }
-
- if ($hn_standardminute < 0) {
- --$hn_standardhour;
- $hn_standardminute += 60;
- }
-
- if ($hn_standardhour < 0) {
- --$hn_days;
- $hn_standardhour += 24;
- }
-
- list($hn_standardyear, $hn_standardmonth, $hn_standardday) =
- explode(
- " ",
- Date_Calc::addDays(
- $hn_days,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- "%Y %m %d"
- )
- );
-
- $this->setStandardTime(
- $hn_standardday,
- $hn_standardmonth,
- $hn_standardyear,
- $hn_standardhour,
- $hn_standardminute,
- $hn_standardsecond,
- $this->on_standardpartsecond
- );
- }
-
-
- // }}}
- // {{{ dateDiff()
-
- /**
- * Subtract supplied date and return answer in days
- *
- * If the second parameter '$pb_ignoretime' is specified as false, the time
- * parts of the two dates will be ignored, and the integral no of days
- * between the day/month/year parts of the two dates will be returned. If
- * either of the two dates have an invalid time, the integral no of days
- * will also be returned, else the returned value will be the no of days as
- * a float, with each hour being treated as 1/24th of a day and so on.
- *
- * For example,
- *
- * - 21/11/2007 13.00 minus 21/11/2007 01.00
- *
- * returns 0.5
- *
- * Note that if the passed date is in the past, a positive value will be
- * returned, and if it is in the future, a negative value will be returned.
- *
- * @param object $po_date date to subtract
- * @param bool $pb_ignoretime whether to ignore the time values of the two
- * dates in subtraction (defaults to false)
- *
- * @return mixed days between two dates as int or float
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function dateDiff($po_date, $pb_ignoretime = false)
- {
- if ($pb_ignoretime || $this->ob_invalidtime) {
- return Date_Calc::dateToDays(
- $this->day,
- $this->month,
- $this->year
- ) -
- Date_Calc::dateToDays(
- $po_date->getDay(),
- $po_date->getMonth(),
- $po_date->getYear()
- );
- }
-
- $hn_secondscompare = $po_date->getStandardSecondsPastMidnight();
- if (PEAR::isError($hn_secondscompare)) {
- if ($hn_secondscompare->getCode() != DATE_ERROR_INVALIDTIME) {
- return $hn_secondscompare;
- }
-
- return Date_Calc::dateToDays(
- $this->day,
- $this->month,
- $this->year
- ) -
- Date_Calc::dateToDays(
- $po_date->getDay(),
- $po_date->getMonth(),
- $po_date->getYear()
- );
- }
-
- $hn_seconds = $this->getStandardSecondsPastMidnight();
-
- // If time parts are equal, return int, else return float:
- //
- return Date_Calc::dateToDays(
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear
- ) -
- Date_Calc::dateToDays(
- $po_date->getStandardDay(),
- $po_date->getStandardMonth(),
- $po_date->getStandardYear()
- ) +
- ($hn_seconds == $hn_secondscompare ? 0 :
- ($hn_seconds - $hn_secondscompare) / 86400);
- }
-
-
- // }}}
- // {{{ inEquivalentTimeZones()
-
- /**
- * Tests whether two dates are in equivalent time zones
- *
- * Equivalence in this context consists in the time zones of the two dates
- * having:
- *
- * - an equal offset from UTC in both standard and Summer time (if
- * the time zones observe Summer time)
- * - the same Summer time start and end rules, that is, the two time zones
- * must switch from standard time to Summer time, and
- * vice versa, on the same day and at the same time
- *
- * An example of two equivalent time zones is 'Europe/London' and
- * 'Europe/Lisbon', which in London is known as GMT/BST, and in Lisbon as
- * WET/WEST.
- *
- * @param object $po_date1 the first Date object to compare
- * @param object $po_date2 the second Date object to compare
- *
- * @return bool true if the time zones are equivalent
- * @access public
- * @static
- * @see Date_TimeZone::isEquivalent()
- * @since Method available since Release 1.5.0
- */
- public function inEquivalentTimeZones($po_date1, $po_date2)
- {
- return $po_date1->tz->isEquivalent($po_date2->getTZID());
- }
-
-
- // }}}
- // {{{ compare()
-
- /**
- * Compares two dates
- *
- * Suitable for use in sorting functions
- *
- * @param object $od1 the first Date object to compare
- * @param object $od2 the second Date object to compare
- *
- * @return int 0 if the dates are equal, -1 if '$od1' is
- * before '$od2', 1 if '$od1' is after '$od2'
- * @access public
- * @static
- */
- public function compare($od1, $od2)
- {
- $d1 = new Date($od1);
- $d2 = new Date($od2);
-
- // If the time zones are equivalent, do nothing:
- //
- if (!Date::inEquivalentTimeZones($d1, $d2)) {
- // Only a time zone with a valid time can be converted:
- //
- if ($d2->isValidTime()) {
- $d2->convertTZByID($d1->getTZID());
- } elseif ($d1->isValidTime()) {
- $d1->convertTZByID($d2->getTZID());
- } else {
- // No comparison can be made without guessing the time:
- //
- return PEAR::raiseError(
- "Both dates have invalid time",
- DATE_ERROR_INVALIDTIME
- );
- }
- }
-
- $days1 = Date_Calc::dateToDays(
- $d1->getDay(),
- $d1->getMonth(),
- $d1->getYear()
- );
- $days2 = Date_Calc::dateToDays(
- $d2->getDay(),
- $d2->getMonth(),
- $d2->getYear()
- );
- if ($days1 < $days2) {
- return -1;
- }
- if ($days1 > $days2) {
- return 1;
- }
-
- $hn_hour1 = $d1->getStandardHour();
- if (PEAR::isError($hn_hour1)) {
- return $hn_hour1;
- }
- $hn_hour2 = $d2->getStandardHour();
- if (PEAR::isError($hn_hour2)) {
- return $hn_hour2;
- }
-
- if ($hn_hour1 < $hn_hour2) {
- return -1;
- }
- if ($hn_hour1 > $hn_hour2) {
- return 1;
- }
- if ($d1->getStandardMinute() < $d2->getStandardMinute()) {
- return -1;
- }
- if ($d1->getStandardMinute() > $d2->getStandardMinute()) {
- return 1;
- }
- if ($d1->getStandardSecond() < $d2->getStandardSecond()) {
- return -1;
- }
- if ($d1->getStandardSecond() > $d2->getStandardSecond()) {
- return 1;
- }
- if ($d1->getStandardPartSecond() < $d2->getStandardPartSecond()) {
- return -1;
- }
- if ($d1->getStandardPartSecond() > $d2->getStandardPartSecond()) {
- return 1;
- }
- return 0;
- }
-
-
- // }}}
- // {{{ before()
-
- /**
- * Test if this date/time is before a certain date/time
- *
- * @param object $when the Date object to test against
- *
- * @return boolean true if this date is before $when
- * @access public
- */
- public function before($when)
- {
- $hn_compare = Date::compare($this, $when);
- if (PEAR::isError($hn_compare)) {
- return $hn_compare;
- }
-
- if ($hn_compare == -1) {
- return true;
- } else {
- return false;
- }
- }
-
-
- // }}}
- // {{{ after()
-
- /**
- * Test if this date/time is after a certain date/time
- *
- * @param object $when the Date object to test against
- *
- * @return boolean true if this date is after $when
- * @access public
- */
- public function after($when)
- {
- $hn_compare = Date::compare($this, $when);
- if (PEAR::isError($hn_compare)) {
- return $hn_compare;
- }
-
- if ($hn_compare == 1) {
- return true;
- } else {
- return false;
- }
- }
-
-
- // }}}
- // {{{ equals()
-
- /**
- * Test if this date/time is exactly equal to a certain date/time
- *
- * @param object $when the Date object to test against
- *
- * @return boolean true if this date is exactly equal to $when
- * @access public
- */
- public function equals($when)
- {
- $hn_compare = Date::compare($this, $when);
- if (PEAR::isError($hn_compare)) {
- return $hn_compare;
- }
-
- if ($hn_compare == 0) {
- return true;
- } else {
- return false;
- }
- }
-
-
- // }}}
- // {{{ isFuture()
-
- /**
- * Determine if this date is in the future
- *
- * @return boolean true if this date is in the future
- * @access public
- */
- public function isFuture()
- {
- $now = new Date();
- return $this->after($now);
- }
-
-
- // }}}
- // {{{ isPast()
-
- /**
- * Determine if this date is in the past
- *
- * @return boolean true if this date is in the past
- * @access public
- */
- public function isPast()
- {
- $now = new Date();
- return $this->before($now);
- }
-
-
- // }}}
- // {{{ isLeapYear()
-
- /**
- * Determine if the year in this date is a leap year
- *
- * @return boolean true if this year is a leap year
- * @access public
- */
- public function isLeapYear()
- {
- return Date_Calc::isLeapYear($this->year);
- }
-
-
- // }}}
- // {{{ getJulianDate()
-
- /**
- * Returns the no of days (1-366) since 31st December of the previous year
- *
- * N.B. this function does not return (and never has returned) the 'Julian
- * Date', as described, for example, at:
- *
- * - {@link http://en.wikipedia.org/wiki/Julian_day}
- *
- * If you want the day of the year (0-366), use {@link Date::getDayOfYear()}
- * instead. If you want the true Julian Day, call one of the following:
- *
- * - {@link Date::formatLikeStrftime()} using code '<b>%E</b>'
- * - {@link Date::formatLikeSQL()} using code '<b>J</b>'
- *
- * There currently is no function that calls the Julian Date (as opposed
- * to the 'Julian Day'), although the Julian Day is an approximation.
- *
- * @return int the Julian date
- * @access public
- * @see Date::getDayOfYear()
- * @deprecated Method deprecated in Release 1.5.0
- */
- public function getJulianDate()
- {
- return Date_Calc::julianDate($this->day, $this->month, $this->year);
- }
-
-
- // }}}
- // {{{ getDayOfYear()
-
- /**
- * Returns the no of days (1-366) since 31st December of the previous year
- *
- * @return int an integer between 1 and 366
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getDayOfYear()
- {
- return Date_Calc::dayOfYear($this->day, $this->month, $this->year);
- }
-
-
- // }}}
- // {{{ getDayOfWeek()
-
- /**
- * Gets the day of the week for this date (0 = Sunday)
- *
- * @return int the day of the week (0 = Sunday)
- * @access public
- */
- public function getDayOfWeek()
- {
- return Date_Calc::dayOfWeek($this->day, $this->month, $this->year);
- }
-
-
- // }}}
- // {{{ getWeekOfYear()
-
- /**
- * Gets the week of the year for this date
- *
- * @return int the week of the year
- * @access public
- */
- public function getWeekOfYear()
- {
- return Date_Calc::weekOfYear($this->day, $this->month, $this->year);
- }
-
-
- // }}}
- // {{{ getQuarterOfYear()
-
- /**
- * Gets the quarter of the year for this date
- *
- * @return int the quarter of the year (1-4)
- * @access public
- */
- public function getQuarterOfYear()
- {
- return Date_Calc::quarterOfYear($this->day, $this->month, $this->year);
- }
-
-
- // }}}
- // {{{ getDaysInMonth()
-
- /**
- * Gets number of days in the month for this date
- *
- * @return int number of days in this month
- * @access public
- */
- public function getDaysInMonth()
- {
- return Date_Calc::daysInMonth($this->month, $this->year);
- }
-
-
- // }}}
- // {{{ getWeeksInMonth()
-
- /**
- * Gets the number of weeks in the month for this date
- *
- * @return int number of weeks in this month
- * @access public
- */
- public function getWeeksInMonth()
- {
- return Date_Calc::weeksInMonth($this->month, $this->year);
- }
-
-
- // }}}
- // {{{ getDayName()
-
- /**
- * Gets the full name or abbreviated name of this weekday
- *
- * @param bool $abbr abbreviate the name
- * @param int $length length of abbreviation
- *
- * @return string name of this day
- * @access public
- */
- public function getDayName($abbr = false, $length = 3)
- {
- if ($abbr) {
- return Date_Calc::getWeekdayAbbrname(
- $this->day,
- $this->month,
- $this->year,
- $length
- );
- } else {
- return Date_Calc::getWeekdayFullname(
- $this->day,
- $this->month,
- $this->year
- );
- }
- }
-
-
- // }}}
- // {{{ getMonthName()
-
- /**
- * Gets the full name or abbreviated name of this month
- *
- * @param boolean $abbr abbreviate the name
- *
- * @return string name of this month
- * @access public
- */
- public function getMonthName($abbr = false)
- {
- if ($abbr) {
- return Date_Calc::getMonthAbbrname($this->month);
- } else {
- return Date_Calc::getMonthFullname($this->month);
- }
- }
-
-
- // }}}
- // {{{ getNextDay()
-
- /**
- * Get a Date object for the day after this one
- *
- * The time of the returned Date object is the same as this time.
- *
- * @return object Date object representing the next day
- * @access public
- */
- public function getNextDay()
- {
- $ret = new Date($this);
- $ret->addDays(1);
- return $ret;
- }
-
-
- // }}}
- // {{{ getPrevDay()
-
- /**
- * Get a Date object for the day before this one
- *
- * The time of the returned Date object is the same as this time.
- *
- * @return object Date object representing the previous day
- * @access public
- */
- public function getPrevDay()
- {
- $ret = new Date($this);
- $ret->addDays(-1);
- return $ret;
- }
-
-
- // }}}
- // {{{ getNextWeekday()
-
- /**
- * Get a Date object for the weekday after this one
- *
- * The time of the returned Date object is the same as this time.
- *
- * @return object Date object representing the next week-day
- * @access public
- */
- public function getNextWeekday()
- {
- $ret = new Date($this);
- list($hs_year, $hs_month, $hs_day) =
- explode(" ", Date_Calc::nextWeekday(
- $this->day,
- $this->month,
- $this->year,
- "%Y %m %d"
- ));
- $ret->setDayMonthYear($hs_day, $hs_month, $hs_year);
- return $ret;
- }
-
-
- // }}}
- // {{{ getPrevWeekday()
-
- /**
- * Get a Date object for the weekday before this one
- *
- * The time of the returned Date object is the same as this time.
- *
- * @return object Date object representing the previous week-day
- * @access public
- */
- public function getPrevWeekday()
- {
- $ret = new Date($this);
- list($hs_year, $hs_month, $hs_day) =
- explode(" ", Date_Calc::prevWeekday(
- $this->day,
- $this->month,
- $this->year,
- "%Y %m %d"
- ));
- $ret->setDayMonthYear($hs_day, $hs_month, $hs_year);
- return $ret;
- }
-
-
- // }}}
- // {{{ getYear()
-
- /**
- * Returns the year field of the date object
- *
- * @return int the year
- * @access public
- */
- public function getYear()
- {
- return $this->year;
- }
-
-
- // }}}
- // {{{ getMonth()
-
- /**
- * Returns the month field of the date object
- *
- * @return int the minute
- * @access public
- */
- public function getMonth()
- {
- return $this->month;
- }
-
-
- // }}}
- // {{{ getDay()
-
- /**
- * Returns the day field of the date object
- *
- * @return int the day
- * @access public
- */
- public function getDay()
- {
- return $this->day;
- }
-
-
- // }}}
- // {{{ _getErrorInvalidTime()
-
- /**
- * Returns invalid time PEAR Error
- *
- * @return object
- * @access private
- * @since Method available since Release 1.5.0
- */
- public function _getErrorInvalidTime()
- {
- return PEAR::raiseError(
- "Invalid time '" .
- sprintf(
- "%02d.%02d.%02d",
- $this->hour,
- $this->minute,
- $this->second
- ) .
- "' specified for date '" .
- Date_Calc::dateFormat(
- $this->day,
- $this->month,
- $this->year,
- "%Y-%m-%d"
- ) .
- "' and in this timezone",
- DATE_ERROR_INVALIDTIME
- );
- }
-
-
- // }}}
- // {{{ _secondsInDayIsValid()
-
- /**
- * If leap seconds are observed, checks if the seconds in the day is valid
- *
- * Note that only the local standard time is accessed.
- *
- * @return bool
- * @access private
- * @since Method available since Release 1.5.0
- */
- public function _secondsInDayIsValid()
- {
- if ($this->ob_countleapseconds) {
- // Convert to UTC:
- //
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute,
- $hn_second,
- $hn_partsecond) =
- $this->_addOffset(
- $this->tz->getRawOffset() * -1,
- $this->on_standardday,
- $this->on_standardmonth,
- $this->on_standardyear,
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardsecond,
- $this->on_standardpartsecond
- );
- return Date_Calc::secondsPastMidnight(
- $hn_hour,
- $hn_minute,
- $hn_second +
- $hn_partsecond
- ) <
- Date_Calc::getSecondsInDay($hn_day, $hn_month, $hn_year);
- } else {
- return $this->getStandardSecondsPastMidnight() < 86400;
- }
- }
-
-
- // }}}
- // {{{ isValidTime()
-
- /**
- * Returns whether the stored date/time is valid, i.e as a local time
- * for the current time-zone.
- *
- * An invalid time is one that lies in the 'skipped hour' at the point
- * that the clocks go forward (if the time-zone uses Summer time).
- *
- * Note that the stored date (i.e. the day/month/year), is set more
- * strictly: it is not possible to set an invalid day/month/year
- * using {@link Date::setDate()} and it is only possible to do so with
- * {@link setYear()} etc. for backwards-compatibility (and anyway, this
- * can be switched off by default by setting
- * {@link DATE_VALIDATE_DATE_BY_DEFAULT} to 'true').
- *
- * The object is able to store an invalid time because a user might
- * unwittingly and correctly store a valid time, and then add one day so
- * as to put the object in the 'skipped' hour (when the clocks go forward).
- * This could be corrected by a conversion to Summer time (by adding one
- * hour); however, if the user then added another day, and had no need for
- * or interest in the time anyway, the behaviour may be rather unexpected.
- * And anyway in this situation, the time originally specified would now,
- * two days on, be valid again.
- *
- * So this class allows an invalid time like this so long as the user does
- * not in any way make use of or request the time while it is in this
- * semi-invalid state, in order to allow for for the fact that he might be
- * only interested in the date, and not the time, and in order not to behave
- * in an unexpected way, especially without throwing an exception to tell
- * the user about it.
- *
- * @return bool
- * @access public
- * @see Date::isValidDate(), Date::isNull(),
- * DATE_VALIDATE_DATE_BY_DEFAULT, DATE_CORRECTINVALIDTIME_DEFAULT
- * @since Method available since Release 1.5.0
- */
- public function isValidTime()
- {
- return !$this->ob_invalidtime;
- }
-
-
- // }}}
- // {{{ getHour()
-
- /**
- * Returns the hour field of the date object
- *
- * @return int the hour
- * @access public
- */
- public function getHour()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->hour;
- }
-
-
- // }}}
- // {{{ getMinute()
-
- /**
- * Returns the minute field of the date object
- *
- * @return int the minute
- * @access public
- */
- public function getMinute()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->minute;
- }
-
-
- // }}}
- // {{{ getSecond()
-
- /**
- * Returns the second field of the date object
- *
- * @return int the second
- * @access public
- */
- public function getSecond()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->second;
- }
-
-
- // }}}
- // {{{ getSecondsPastMidnight()
-
- /**
- * Returns the no of seconds since midnight (0-86400) as float
- *
- * @return float float which is at least 0 and less than 86400
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getSecondsPastMidnight()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return Date_Calc::secondsPastMidnight(
- $this->hour,
- $this->minute,
- $this->second
- ) +
- $this->partsecond;
- }
-
-
- // }}}
- // {{{ getPartSecond()
-
- /**
- * Returns the part-second field of the date object
- *
- * @return float the part-second
- * @access protected
- * @since Method available since Release 1.5.0
- */
- public function getPartSecond()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->partsecond;
- }
-
-
- // }}}
- // {{{ getStandardYear()
-
- /**
- * Returns the year field of the local standard time
- *
- * @return int the year
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getStandardYear()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->on_standardyear;
- }
-
-
- // }}}
- // {{{ getStandardMonth()
-
- /**
- * Returns the month field of the local standard time
- *
- * @return int the minute
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getStandardMonth()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->on_standardmonth;
- }
-
-
- // }}}
- // {{{ getStandardDay()
-
- /**
- * Returns the day field of the local standard time
- *
- * @return int the day
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getStandardDay()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->on_standardday;
- }
-
-
- // }}}
- // {{{ getStandardHour()
-
- /**
- * Returns the hour field of the local standard time
- *
- * @return int the hour
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getStandardHour()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->on_standardhour;
- }
-
-
- // }}}
- // {{{ getStandardMinute()
-
- /**
- * Returns the minute field of the local standard time
- *
- * @return int the minute
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getStandardMinute()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->on_standardminute;
- }
-
-
- // }}}
- // {{{ getStandardSecond()
-
- /**
- * Returns the second field of the local standard time
- *
- * @return int the second
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getStandardSecond()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->on_standardsecond;
- }
-
-
- // }}}
- // {{{ getStandardSecondsPastMidnight()
-
- /**
- * Returns the no of seconds since midnight (0-86400) of the
- * local standard time as float
- *
- * @return float float which is at least 0 and less than 86400
- * @access public
- * @since Method available since Release 1.5.0
- */
- public function getStandardSecondsPastMidnight()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return Date_Calc::secondsPastMidnight(
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardsecond
- ) +
- $this->on_standardpartsecond;
- }
-
-
- // }}}
- // {{{ getStandardPartSecond()
-
- /**
- * Returns the part-second field of the local standard time
- *
- * @return float the part-second
- * @access protected
- * @since Method available since Release 1.5.0
- */
- public function getStandardPartSecond()
- {
- if ($this->ob_invalidtime) {
- return $this->_getErrorInvalidTime();
- }
-
- return $this->on_standardpartsecond;
- }
-
-
- // }}}
- // {{{ _addOffset()
-
- /**
- * Add a time zone offset to the passed date/time
- *
- * @param int $pn_offset the offset to add in milliseconds
- * @param int $pn_day the day
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- * @param int $pn_second the second
- * @param float $pn_partsecond the part-second
- *
- * @return array array of year, month, day, hour, minute, second,
- * and part-second
- * @access private
- * @static
- * @since Method available since Release 1.5.0
- */
- public function _addOffset(
- $pn_offset,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second,
- $pn_partsecond
- )
- {
- if ($pn_offset == 0) {
- return array((int)$pn_year,
- (int)$pn_month,
- (int)$pn_day,
- (int)$pn_hour,
- (int)$pn_minute,
- (int)$pn_second,
- (float)$pn_partsecond);
- }
-
- if ($pn_offset % 3600000 == 0) {
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour) =
- Date_Calc::addHours(
- $pn_offset / 3600000,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour
- );
-
- $hn_minute = (int)$pn_minute;
- $hn_second = (int)$pn_second;
- $hn_partsecond = (float)$pn_partsecond;
- } elseif ($pn_offset % 60000 == 0) {
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute) =
- Date_Calc::addMinutes(
- $pn_offset / 60000,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute
- );
-
- $hn_second = (int)$pn_second;
- $hn_partsecond = (float)$pn_partsecond;
- } else {
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute,
- $hn_secondraw) =
- Date_Calc::addSeconds(
- $pn_offset / 1000,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_partsecond == 0.0 ?
- $pn_second :
- $pn_second + $pn_partsecond,
- false
- ); // N.B. do not count
- // leap seconds
-
- if (is_float($hn_secondraw)) {
- $hn_second = intval($hn_secondraw);
- $hn_partsecond = $hn_secondraw - $hn_second;
- } else {
- $hn_second = $hn_secondraw;
- $hn_partsecond = 0.0;
- }
- }
-
- return array($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute,
- $hn_second,
- $hn_partsecond);
- }
-
-
- // }}}
- // {{{ setLocalTime()
-
- /**
- * Sets local time (Summer-time-adjusted) and then calculates local
- * standard time
- *
- * @param int $pn_day the day
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- * @param int $pn_second the second
- * @param float $pn_partsecond the part-second
- * @param bool $pb_repeatedhourdefault whether to assume Summer time if a
- * repeated hour is specified (defaults
- * to false)
- * @param bool $pb_correctinvalidtime whether to correct, by adding the
- * local Summer time offset, the
- * specified time if it falls in the
- * skipped hour (defaults to
- * {@link DATE_CORRECTINVALIDTIME_DEFAULT})
- *
- * @return void
- * @access protected
- * @see Date::setStandardTime()
- * @since Method available since Release 1.5.0
- */
- public function setLocalTime(
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second,
- $pn_partsecond,
- $pb_repeatedhourdefault = false,
- $pb_correctinvalidtime = DATE_CORRECTINVALIDTIME_DEFAULT
- )
- {
- settype($pn_day, "int");
- settype($pn_month, "int");
- settype($pn_year, "int");
- settype($pn_hour, "int");
- settype($pn_minute, "int");
- settype($pn_second, "int");
- settype($pn_partsecond, "float");
-
- $hb_insummertime =
- $this->tz->inDaylightTime(
- array($pn_day,
- $pn_month, $pn_year, Date_Calc::secondsPastMidnight(
- $pn_hour,
- $pn_minute,
- $pn_second
- ) + $pn_partsecond),
- $pb_repeatedhourdefault
- );
- if (PEAR::isError($hb_insummertime)) {
- if ($hb_insummertime->getCode() != DATE_ERROR_INVALIDTIME) {
- return $hb_insummertime;
- } elseif ($pb_correctinvalidtime) {
- // Store passed time as local standard time:
- //
- $this->on_standardday = $pn_day;
- $this->on_standardmonth = $pn_month;
- $this->on_standardyear = $pn_year;
- $this->on_standardhour = $pn_hour;
- $this->on_standardminute = $pn_minute;
- $this->on_standardsecond = $pn_second;
- $this->on_standardpartsecond = $pn_partsecond;
-
- // Add Summer time offset to passed time:
- //
- list($this->year,
- $this->month,
- $this->day,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond) =
- $this->_addOffset(
- $this->tz->getDSTSavings(),
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second,
- $pn_partsecond
- );
-
- $this->ob_invalidtime = !$this->_secondsInDayIsValid();
- } else {
- // Hedge bets - if the user adds/subtracts a day, then the time
- // will be uncorrupted, and if the user does
- // addition/subtraction with the time, or requests the time,
- // then return an error at that point:
- //
- $this->day = $pn_day;
- $this->month = $pn_month;
- $this->year = $pn_year;
- $this->hour = $pn_hour;
- $this->minute = $pn_minute;
- $this->second = $pn_second;
- $this->partsecond = $pn_partsecond;
-
- $this->ob_invalidtime = true;
- }
-
- return;
- } else {
- // Passed time is valid as local time:
- //
- $this->day = $pn_day;
- $this->month = $pn_month;
- $this->year = $pn_year;
- $this->hour = $pn_hour;
- $this->minute = $pn_minute;
- $this->second = $pn_second;
- $this->partsecond = $pn_partsecond;
- }
-
- $this->ob_invalidtime = !$this->_secondsInDayIsValid();
-
- if ($hb_insummertime) {
- // Calculate local standard time:
- //
- list($this->on_standardyear,
- $this->on_standardmonth,
- $this->on_standardday,
- $this->on_standardhour,
- $this->on_standardminute,
- $this->on_standardsecond,
- $this->on_standardpartsecond) =
- $this->_addOffset(
- $this->tz->getDSTSavings() * -1,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second,
- $pn_partsecond
- );
- } else {
- // Time is already local standard time:
- //
- $this->on_standardday = $pn_day;
- $this->on_standardmonth = $pn_month;
- $this->on_standardyear = $pn_year;
- $this->on_standardhour = $pn_hour;
- $this->on_standardminute = $pn_minute;
- $this->on_standardsecond = $pn_second;
- $this->on_standardpartsecond = $pn_partsecond;
- }
- }
-
-
- // }}}
- // {{{ setStandardTime()
-
- /**
- * Sets local standard time and then calculates local time (i.e.
- * Summer-time-adjusted)
- *
- * @param int $pn_day the day
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- * @param int $pn_second the second
- * @param float $pn_partsecond the part-second
- *
- * @return void
- * @access protected
- * @see Date::setLocalTime()
- * @since Method available since Release 1.5.0
- */
- public function setStandardTime(
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second,
- $pn_partsecond
- )
- {
- settype($pn_day, "int");
- settype($pn_month, "int");
- settype($pn_year, "int");
- settype($pn_hour, "int");
- settype($pn_minute, "int");
- settype($pn_second, "int");
- settype($pn_partsecond, "float");
-
- $this->on_standardday = $pn_day;
- $this->on_standardmonth = $pn_month;
- $this->on_standardyear = $pn_year;
- $this->on_standardhour = $pn_hour;
- $this->on_standardminute = $pn_minute;
- $this->on_standardsecond = $pn_second;
- $this->on_standardpartsecond = $pn_partsecond;
-
- $this->ob_invalidtime = !$this->_secondsInDayIsValid();
-
- if ($this->tz->inDaylightTimeStandard(array($pn_day, $pn_month,
- $pn_year, Date_Calc::secondsPastMidnight(
- $pn_hour,
- $pn_minute,
- $pn_second
- ) + $pn_partsecond))) {
-
- // Calculate local time:
- //
- list($this->year,
- $this->month,
- $this->day,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond) =
- $this->_addOffset(
- $this->tz->getDSTSavings(),
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second,
- $pn_partsecond
- );
- } else {
- // Time is already local time:
- //
- $this->day = $pn_day;
- $this->month = $pn_month;
- $this->year = $pn_year;
- $this->hour = $pn_hour;
- $this->minute = $pn_minute;
- $this->second = $pn_second;
- $this->partsecond = $pn_partsecond;
- }
- }
-
-
- // }}}
- // {{{ setYear()
-
- /**
- * Sets the year field of the date object
- *
- * If specified year forms an invalid date, then PEAR error will be
- * returned, unless the validation is over-ridden using the second
- * parameter.
- *
- * @param int $y the year
- * @param bool $pb_validate whether to check that the new date is valid
- * (defaults to {@link DATE_VALIDATE_DATE_BY_DEFAULT})
- *
- * @return void
- * @access public
- * @see Date::setDayMonthYear(), Date::setDateTime()
- */
- public function setYear($y, $pb_validate = DATE_VALIDATE_DATE_BY_DEFAULT)
- {
- if ($pb_validate && !Date_Calc::isValidDate($this->day, $this->month, $y)) {
- return PEAR::raiseError(
- "'" .
- Date_Calc::dateFormat(
- $this->day,
- $this->month,
- $y,
- "%Y-%m-%d"
- ) .
- "' is invalid calendar date",
- DATE_ERROR_INVALIDDATE
- );
- } else {
- $this->setLocalTime(
- $this->day,
- $this->month,
- $y,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond
- );
- }
- }
-
-
- // }}}
- // {{{ setMonth()
-
- /**
- * Sets the month field of the date object
- *
- * If specified year forms an invalid date, then PEAR error will be
- * returned, unless the validation is over-ridden using the second
- * parameter.
- *
- * @param int $m the month
- * @param bool $pb_validate whether to check that the new date is valid
- * (defaults to {@link DATE_VALIDATE_DATE_BY_DEFAULT})
- *
- * @return void
- * @access public
- * @see Date::setDayMonthYear(), Date::setDateTime()
- */
- public function setMonth($m, $pb_validate = DATE_VALIDATE_DATE_BY_DEFAULT)
- {
- if ($pb_validate && !Date_Calc::isValidDate($this->day, $m, $this->year)) {
- return PEAR::raiseError(
- "'" .
- Date_Calc::dateFormat(
- $this->day,
- $m,
- $this->year,
- "%Y-%m-%d"
- ) .
- "' is invalid calendar date",
- DATE_ERROR_INVALIDDATE
- );
- } else {
- $this->setLocalTime(
- $this->day,
- $m,
- $this->year,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond
- );
- }
- }
-
-
- // }}}
- // {{{ setDay()
-
- /**
- * Sets the day field of the date object
- *
- * If specified year forms an invalid date, then PEAR error will be
- * returned, unless the validation is over-ridden using the second
- * parameter.
- *
- * @param int $d the day
- * @param bool $pb_validate whether to check that the new date is valid
- * (defaults to {@link DATE_VALIDATE_DATE_BY_DEFAULT})
- *
- * @return void
- * @access public
- * @see Date::setDayMonthYear(), Date::setDateTime()
- */
- public function setDay($d, $pb_validate = DATE_VALIDATE_DATE_BY_DEFAULT)
- {
- if ($pb_validate && !Date_Calc::isValidDate($d, $this->month, $this->year)) {
- return PEAR::raiseError(
- "'" .
- Date_Calc::dateFormat(
- $d,
- $this->month,
- $this->year,
- "%Y-%m-%d"
- ) .
- "' is invalid calendar date",
- DATE_ERROR_INVALIDDATE
- );
- } else {
- $this->setLocalTime(
- $d,
- $this->month,
- $this->year,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond
- );
- }
- }
-
-
- // }}}
- // {{{ setDayMonthYear()
-
- /**
- * Sets the day, month and year fields of the date object
- *
- * If specified year forms an invalid date, then PEAR error will be
- * returned. Note that setting each of these fields separately
- * may unintentionally return a PEAR error if a transitory date is
- * invalid between setting these fields.
- *
- * @param int $d the day
- * @param int $m the month
- * @param int $y the year
- *
- * @return void
- * @access public
- * @see Date::setDateTime()
- * @since Method available since Release 1.5.0
- */
- public function setDayMonthYear($d, $m, $y)
- {
- if (!Date_Calc::isValidDate($d, $m, $y)) {
- return PEAR::raiseError(
- "'" .
- Date_Calc::dateFormat(
- $d,
- $m,
- $y,
- "%Y-%m-%d"
- ) .
- "' is invalid calendar date",
- DATE_ERROR_INVALIDDATE
- );
- } else {
- $this->setLocalTime(
- $d,
- $m,
- $y,
- $this->hour,
- $this->minute,
- $this->second,
- $this->partsecond
- );
- }
- }
-
-
- // }}}
- // {{{ setHour()
-
- /**
- * Sets the hour field of the date object
- *
- * Expects an hour in 24-hour format.
- *
- * @param int $h the hour
- * @param bool $pb_repeatedhourdefault whether to assume Summer time if a
- * repeated hour is specified (defaults
- * to false)
- *
- * @return void
- * @access public
- * @see Date::setHourMinuteSecond(), Date::setDateTime()
- */
- public function setHour($h, $pb_repeatedhourdefault = false)
- {
- if ($h > 23 || $h < 0) {
- return PEAR::raiseError("Invalid hour value '$h'");
- } else {
- $ret = $this->setHourMinuteSecond(
- $h,
- $this->minute,
- $this->partsecond == 0.0 ?
- $this->second :
- $this->second + $this->partsecond,
- $pb_repeatedhourdefault
- );
-
- if (PEAR::isError($ret)) {
- return $ret;
- }
- }
- }
-
-
- // }}}
- // {{{ setMinute()
-
- /**
- * Sets the minute field of the date object
- *
- * @param int $m the minute
- * @param bool $pb_repeatedhourdefault whether to assume Summer time if a
- * repeated hour is specified (defaults
- * to false)
- *
- * @return void
- * @access public
- * @see Date::setHourMinuteSecond(), Date::setDateTime()
- */
- public function setMinute($m, $pb_repeatedhourdefault = false)
- {
- if ($m > 59 || $m < 0) {
- return PEAR::raiseError("Invalid minute value '$m'");
- } else {
- $ret = $this->setHourMinuteSecond(
- $this->hour,
- $m,
- $this->partsecond == 0.0 ?
- $this->second :
- $this->second + $this->partsecond,
- $pb_repeatedhourdefault
- );
-
- if (PEAR::isError($ret)) {
- return $ret;
- }
- }
- }
-
-
- // }}}
- // {{{ setSecond()
-
- /**
- * Sets the second field of the date object
- *
- * @param mixed $s the second as integer or float
- * @param bool $pb_repeatedhourdefault whether to assume Summer time if a
- * repeated hour is specified
- * (defaults to false)
- *
- * @return void
- * @access public
- * @see Date::setHourMinuteSecond(), Date::setDateTime()
- */
- public function setSecond($s, $pb_repeatedhourdefault = false)
- {
- if ($s > 60 || // Leap seconds possible
- $s < 0) {
- return PEAR::raiseError("Invalid second value '$s'");
- } else {
- $ret = $this->setHourMinuteSecond(
- $this->hour,
- $this->minute,
- $s,
- $pb_repeatedhourdefault
- );
-
- if (PEAR::isError($ret)) {
- return $ret;
- }
- }
- }
-
-
- // }}}
- // {{{ setPartSecond()
-
- /**
- * Sets the part-second field of the date object
- *
- * @param float $pn_ps the part-second
- * @param bool $pb_repeatedhourdefault whether to assume Summer time if a
- * repeated hour is specified (defaults
- * to false)
- *
- * @return void
- * @access protected
- * @see Date::setHourMinuteSecond(), Date::setDateTime()
- * @since Method available since Release 1.5.0
- */
- public function setPartSecond($pn_ps, $pb_repeatedhourdefault = false)
- {
- if ($pn_ps >= 1 || $pn_ps < 0) {
- return PEAR::raiseError("Invalid part-second value '$pn_ps'");
- } else {
- $ret = $this->setHourMinuteSecond(
- $this->hour,
- $this->minute,
- $this->second + $pn_ps,
- $pb_repeatedhourdefault
- );
-
- if (PEAR::isError($ret)) {
- return $ret;
- }
- }
- }
-
-
- // }}}
- // {{{ setHourMinuteSecond()
-
- /**
- * Sets the hour, minute, second and part-second fields of the date object
- *
- * N.B. if the repeated hour, due to the clocks going back, is specified,
- * the default is to assume local standard time.
- *
- * @param int $h the hour
- * @param int $m the minute
- * @param mixed $s the second as integer or float
- * @param bool $pb_repeatedhourdefault whether to assume Summer time if a
- * repeated hour is specified
- * (defaults to false)
- *
- * @return void
- * @access public
- * @see Date::setDateTime()
- * @since Method available since Release 1.5.0
- */
- public function setHourMinuteSecond($h, $m, $s, $pb_repeatedhourdefault = false)
- {
- // Split second into integer and part-second:
- //
- if (is_float($s)) {
- $hn_second = intval($s);
- $hn_partsecond = $s - $hn_second;
- } else {
- $hn_second = (int)$s;
- $hn_partsecond = 0.0;
- }
-
- $this->setLocalTime(
- $this->day,
- $this->month,
- $this->year,
- $h,
- $m,
- $hn_second,
- $hn_partsecond,
- $pb_repeatedhourdefault
- );
- }
-
-
- // }}}
- // {{{ setDateTime()
-
- /**
- * Sets all the fields of the date object (day, month, year, hour, minute
- * and second)
- *
- * If specified year forms an invalid date, then PEAR error will be
- * returned. Note that setting each of these fields separately
- * may unintentionally return a PEAR error if a transitory date is
- * invalid between setting these fields.
- *
- * N.B. if the repeated hour, due to the clocks going back, is specified,
- * the default is to assume local standard time.
- *
- * @param int $pn_day the day
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- * @param mixed $pm_second the second as integer or float
- * @param bool $pb_repeatedhourdefault whether to assume Summer time if a
- * repeated hour is specified
- * (defaults to false)
- *
- * @return void
- * @access public
- * @see Date::setDayMonthYear(), Date::setHourMinuteSecond()
- * @since Method available since Release 1.5.0
- */
- public function setDateTime(
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pm_second,
- $pb_repeatedhourdefault = false
- )
- {
- if (!Date_Calc::isValidDate($d, $m, $y)) {
- return PEAR::raiseError(
- "'" .
- Date_Calc::dateFormat(
- $d,
- $m,
- $y,
- "%Y-%m-%d"
- ) .
- "' is invalid calendar date",
- DATE_ERROR_INVALIDDATE
- );
- } else {
- // Split second into integer and part-second:
- //
- if (is_float($pm_second)) {
- $hn_second = intval($pm_second);
- $hn_partsecond = $pm_second - $hn_second;
- } else {
- $hn_second = (int)$pm_second;
- $hn_partsecond = 0.0;
- }
-
- $this->setLocalTime(
- $d,
- $m,
- $y,
- $h,
- $m,
- $hn_second,
- $hn_partsecond,
- $pb_repeatedhourdefault
- );
- }
- }
-
-
- // }}}
-}
-
-// }}}
-
-/*
- * Local variables:
- * mode: php
- * tab-width: 4
- * c-basic-offset: 4
- * c-hanging-comment-ender-p: nil
- * End:
- */
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
-
-// {{{ Header
-
-/**
- * Calculates, manipulates and retrieves dates
- *
- * It does not rely on 32-bit system time stamps, so it works dates
- * before 1970 and after 2038.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 1999-2007 Monte Ohrt, Pierre-Alain Joye, Daniel Convissor,
- * C.A. Woodcock
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted under the terms of the BSD License.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @category Date and Time
- * @package Date
- * @author Monte Ohrt <monte@ispi.net>
- * @author Pierre-Alain Joye <pajoye@php.net>
- * @author Daniel Convissor <danielc@php.net>
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright 1999-2007 Monte Ohrt, Pierre-Alain Joye, Daniel Convissor, C.A. Woodcock
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Date
- * @since File available since Release 1.2
- */
-
-
-// }}}
-
-/**
- * PEAR
- */
-require_once 'PEAR.php';
-
-
-// {{{ General constants:
-
-if (!defined('DATE_CALC_BEGIN_WEEKDAY')) {
- /**
- * Defines what day starts the week
- *
- * Monday (1) is the international standard.
- * Redefine this to 0 if you want weeks to begin on Sunday.
- */
- define('DATE_CALC_BEGIN_WEEKDAY', 1);
-}
-
-if (!defined('DATE_CALC_FORMAT')) {
- /**
- * The default value for each method's $format parameter
- *
- * The default is '%Y%m%d'. To override this default, define
- * this constant before including Calc.php.
- *
- * @since Constant available since Release 1.4.4
- */
- define('DATE_CALC_FORMAT', '%Y%m%d');
-}
-
-
-// {{{ Date precision constants (used in 'round()' and 'trunc()'):
-
-define('DATE_PRECISION_YEAR', -2);
-define('DATE_PRECISION_MONTH', -1);
-define('DATE_PRECISION_DAY', 0);
-define('DATE_PRECISION_HOUR', 1);
-define('DATE_PRECISION_10MINUTES', 2);
-define('DATE_PRECISION_MINUTE', 3);
-define('DATE_PRECISION_10SECONDS', 4);
-define('DATE_PRECISION_SECOND', 5);
-
-
-// }}}
-// {{{ Class: Date_Calc
-
-/**
- * Calculates, manipulates and retrieves dates
- *
- * It does not rely on 32-bit system time stamps, so it works dates
- * before 1970 and after 2038.
- *
- * @category Date and Time
- * @package Date
- * @author Monte Ohrt <monte@ispi.net>
- * @author Daniel Convissor <danielc@php.net>
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright 1999-2007 Monte Ohrt, Pierre-Alain Joye, Daniel Convissor, C.A. Woodcock
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version Release: 1.5.0a1
- * @link http://pear.php.net/package/Date
- * @since Class available since Release 1.2
- */
-class Date_Calc
-{
-
- // {{{ dateFormat()
-
- /**
- * Formats the date in the given format, much like
- * {@link http://www.php.net/strftime strftime()}
- *
- * This function is used to alleviate the problem with 32-bit numbers for
- * dates pre 1970 or post 2038, as strftime() has on most systems.
- * Most of the formatting options are compatible.
- *
- * Formatting options:
- *
- * - <b>%a</b> - abbreviated weekday name (Sun, Mon, Tue)
- * - <b>%A</b> - full weekday name (Sunday, Monday, Tuesday)
- * - <b>%b</b> - abbreviated month name (Jan, Feb, Mar)
- * - <b>%B</b> - full month name (January, February, March)
- * - <b>%d</b> - day of month (range 00 to 31)
- * - <b>%e</b> - day of month, single digit (range 0 to 31)
- * - <b>%E</b> - number of days since unspecified epoch (integer).
- * ('<b>%E</b>' is useful for passing a date in a URL as an
- * integer value. Then simply use {@link Date_Calc::daysToDate()}
- * to convert back to a date.)
- * - <b>%j</b> - day of year (range 001 to 366)
- * - <b>%m</b> - month as decimal number (range 1 to 12)
- * - <b>%n</b> - newline character (\n)
- * - <b>%t</b> - tab character (\t)
- * - <b>%w</b> - weekday as decimal (0 = Sunday)
- * - <b>%U</b> - week number of current year, first sunday as first week
- * - <b>%y</b> - year as decimal (range 00 to 99)
- * - <b>%Y</b> - year as decimal including century (range 0000 to 9999)
- * - <b>%%</b> - literal '%'
- *
- * @param int $day the day of the month
- * @param int $month the month
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- * @param string $format the format string
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function dateFormat($day, $month, $year, $format)
- {
- if (!Date_Calc::isValidDate($day, $month, $year)) {
- $year = Date_Calc::dateNow('%Y');
- $month = Date_Calc::dateNow('%m');
- $day = Date_Calc::dateNow('%d');
- }
-
- $output = '';
-
- for ($strpos = 0; $strpos < strlen($format); $strpos++) {
- $char = substr($format, $strpos, 1);
- if ($char == '%') {
- $nextchar = substr($format, $strpos + 1, 1);
- switch ($nextchar) {
- case 'a':
- $output .= Date_Calc::getWeekdayAbbrname($day, $month, $year);
- break;
- case 'A':
- $output .= Date_Calc::getWeekdayFullname($day, $month, $year);
- break;
- case 'b':
- $output .= Date_Calc::getMonthAbbrname($month);
- break;
- case 'B':
- $output .= Date_Calc::getMonthFullname($month);
- break;
- case 'd':
- $output .= sprintf('%02d', $day);
- break;
- case 'e':
- $output .= $day;
- break;
- case 'E':
- $output .= Date_Calc::dateToDays($day, $month, $year);
- break;
- case 'j':
- $output .= Date_Calc::dayOfYear($day, $month, $year);
- break;
- case 'm':
- $output .= sprintf('%02d', $month);
- break;
- case 'n':
- $output .= "\n";
- break;
- case 't':
- $output .= "\t";
- break;
- case 'w':
- $output .= Date_Calc::dayOfWeek($day, $month, $year);
- break;
- case 'U':
- $output .= Date_Calc::weekOfYear($day, $month, $year);
- break;
- case 'y':
- $output .= sprintf(
- '%0' .
- ($year < 0 ? '3' : '2') .
- 'd',
- $year % 100
- );
- break;
- case "Y":
- $output .= sprintf(
- '%0' .
- ($year < 0 ? '5' : '4') .
- 'd',
- $year
- );
- break;
- case '%':
- $output .= '%';
- break;
- default:
- $output .= $char . $nextchar;
- }
- $strpos++;
- } else {
- $output .= $char;
- }
- }
- return $output;
- }
-
-
- // }}}
- // {{{ dateNow()
-
- /**
- * Returns the current local date
- *
- * NOTE: This function retrieves the local date using
- * {@link http://www.php.net/strftime strftime()}, which may or may
- * not be 32-bit safe on your system.
- *
- * @param string $format the string indicating how to format the output
- *
- * @return string the current date in the specified format
- * @access public
- * @static
- */
- public function dateNow($format = DATE_CALC_FORMAT)
- {
- return strftime($format, time());
- }
-
-
- // }}}
- // {{{ getYear()
-
- /**
- * Returns the current local year in format CCYY
- *
- * @return string the current year in four digit format
- * @access public
- * @static
- */
- public function getYear()
- {
- return Date_Calc::dateNow('%Y');
- }
-
-
- // }}}
- // {{{ getMonth()
-
- /**
- * Returns the current local month in format MM
- *
- * @return string the current month in two digit format
- * @access public
- * @static
- */
- public function getMonth()
- {
- return Date_Calc::dateNow('%m');
- }
-
-
- // }}}
- // {{{ getDay()
-
- /**
- * Returns the current local day in format DD
- *
- * @return string the current day of the month in two digit format
- * @access public
- * @static
- */
- public function getDay()
- {
- return Date_Calc::dateNow('%d');
- }
-
-
- // }}}
- // {{{ defaultCentury()
-
- /**
- * Turns a two digit year into a four digit year
- *
- * Return value depends on current year; the century chosen
- * will be the one which forms the year that is closest
- * to the current year. If the two possibilities are
- * equidistant to the current year (i.e. 50 years in the past
- * and 50 years in the future), then the past year is chosen.
- *
- * For example, if the current year is 2007:
- * - <b>"03"</b> - returns 2003
- * - <b>"09"</b> - returns 2009
- * - <b>"56"</b> - returns 2056 (closer to 2007 than 1956)
- * - <b>"57"</b> - returns 1957 (1957 and 2007 are equidistant,
- * so previous century chosen)
- * - <b>"58"</b> - returns 1958
- *
- * @param int $year the 2 digit year
- *
- * @return int the 4 digit year
- * @access public
- * @static
- */
- public function defaultCentury($year)
- {
- $hn_century = intval(($hn_currentyear = date("Y")) / 100);
- $hn_currentyear = $hn_currentyear % 100;
-
- if ($year < 0 || $year >= 100) {
- $year = $year % 100;
- }
-
- if ($year - $hn_currentyear < -50) {
- return ($hn_century + 1) * 100 + $year;
- } elseif ($year - $hn_currentyear < 50) {
- return $hn_century * 100 + $year;
- } else {
- return ($hn_century - 1) * 100 + $year;
- }
- }
-
-
- // }}}
- // {{{ getSecondsInYear()
-
- /**
- * Returns the total number of seconds in the given year
- *
- * This takes into account leap seconds.
- *
- * @param int $pn_year the year in four digit format
- *
- * @return int
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function getSecondsInYear($pn_year)
- {
- $pn_year = intval($pn_year);
-
- static $ha_leapseconds;
- if (!isset($ha_leapseconds)) {
- $ha_leapseconds = array(1972 => 2,
- 1973 => 1,
- 1974 => 1,
- 1975 => 1,
- 1976 => 1,
- 1977 => 1,
- 1978 => 1,
- 1979 => 1,
- 1981 => 1,
- 1982 => 1,
- 1983 => 1,
- 1985 => 1,
- 1987 => 1,
- 1989 => 1,
- 1990 => 1,
- 1992 => 1,
- 1993 => 1,
- 1994 => 1,
- 1995 => 1,
- 1997 => 1,
- 1998 => 1,
- 2005 => 1);
- }
-
- $ret = Date_Calc::daysInYear($pn_year) * 86400;
-
- if (isset($ha_leapseconds[$pn_year])) {
- return $ret + $ha_leapseconds[$pn_year];
- } else {
- return $ret;
- }
- }
-
-
- // }}}
- // {{{ getSecondsInMonth()
-
- /**
- * Returns the total number of seconds in the given month
- *
- * This takes into account leap seconds.
- *
- * @param int $pn_month the month
- * @param int $pn_year the year in four digit format
- *
- * @return int
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function getSecondsInMonth($pn_month, $pn_year)
- {
- $pn_month = intval($pn_month);
- $pn_year = intval($pn_year);
-
- static $ha_leapseconds;
- if (!isset($ha_leapseconds)) {
- $ha_leapseconds = array(1972 => array(6 => 1,
- 12 => 1),
- 1973 => array(12 => 1),
- 1974 => array(12 => 1),
- 1975 => array(12 => 1),
- 1976 => array(12 => 1),
- 1977 => array(12 => 1),
- 1978 => array(12 => 1),
- 1979 => array(12 => 1),
- 1981 => array(6 => 1),
- 1982 => array(6 => 1),
- 1983 => array(6 => 1),
- 1985 => array(6 => 1),
- 1987 => array(12 => 1),
- 1989 => array(12 => 1),
- 1990 => array(12 => 1),
- 1992 => array(6 => 1),
- 1993 => array(6 => 1),
- 1994 => array(6 => 1),
- 1995 => array(12 => 1),
- 1997 => array(6 => 1),
- 1998 => array(12 => 1),
- 2005 => array(12 => 1));
- }
-
- $ret = Date_Calc::daysInMonth($pn_month, $pn_year) * 86400;
-
- if (isset($ha_leapseconds[$pn_year][$pn_month])) {
- return $ret + $ha_leapseconds[$pn_year][$pn_month];
- } else {
- return $ret;
- }
- }
-
-
- // }}}
- // {{{ getSecondsInDay()
-
- /**
- * Returns the total number of seconds in the day of the given date
- *
- * This takes into account leap seconds.
- *
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year in four digit format
- *
- * @return int
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function getSecondsInDay($pn_day, $pn_month, $pn_year)
- {
- // Note to developers:
- //
- // The leap seconds listed here are a matter of historical fact,
- // that is, it is known on which exact day they occurred.
- // However, the implementation of the class as a whole depends
- // on the fact that they always occur at the end of the month
- // (although it is assumed that they could occur in any month,
- // even though practically they only occur in June or December).
- //
- // Do not define a leap second on a day of the month other than
- // the last day without altering the implementation of the
- // functions that depend on this one.
- //
- // It is possible, though, to define an un-leap second (i.e. a skipped
- // second (I do not know what they are called), or a number of
- // consecutive leap seconds).
-
- $pn_day = intval($pn_day);
- $pn_month = intval($pn_month);
- $pn_year = intval($pn_year);
-
- static $ha_leapseconds;
- if (!isset($ha_leapseconds)) {
- $ha_leapseconds = array(1972 => array(6 => array(30 => 1),
- 12 => array(31 => 1)),
- 1973 => array(12 => array(31 => 1)),
- 1974 => array(12 => array(31 => 1)),
- 1975 => array(12 => array(31 => 1)),
- 1976 => array(12 => array(31 => 1)),
- 1977 => array(12 => array(31 => 1)),
- 1978 => array(12 => array(31 => 1)),
- 1979 => array(12 => array(31 => 1)),
- 1981 => array(6 => array(30 => 1)),
- 1982 => array(6 => array(30 => 1)),
- 1983 => array(6 => array(30 => 1)),
- 1985 => array(6 => array(30 => 1)),
- 1987 => array(12 => array(31 => 1)),
- 1989 => array(12 => array(31 => 1)),
- 1990 => array(12 => array(31 => 1)),
- 1992 => array(6 => array(30 => 1)),
- 1993 => array(6 => array(30 => 1)),
- 1994 => array(6 => array(30 => 1)),
- 1995 => array(12 => array(31 => 1)),
- 1997 => array(6 => array(30 => 1)),
- 1998 => array(12 => array(31 => 1)),
- 2005 => array(12 => array(31 => 1)));
- }
-
- if (isset($ha_leapseconds[$pn_year][$pn_month][$pn_day])) {
- return 86400 + $ha_leapseconds[$pn_year][$pn_month][$pn_day];
- } else {
- return 86400;
- }
- }
-
-
- // }}}
- // {{{ getSecondsInHour()
-
- /**
- * Returns the total number of seconds in the hour of the given date
- *
- * This takes into account leap seconds.
- *
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year in four digit format
- * @param int $pn_hour the hour
- *
- * @return int
- * @access public
- * @static
- */
- public function getSecondsInHour($pn_day, $pn_month, $pn_year, $pn_hour)
- {
- if ($pn_hour < 23) {
- return 3600;
- } else {
- return Date_Calc::getSecondsInDay($pn_day, $pn_month, $pn_year) -
- 82800;
- }
- }
-
-
- // }}}
- // {{{ getSecondsInMinute()
-
- /**
- * Returns the total number of seconds in the minute of the given hour
- *
- * This takes into account leap seconds.
- *
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year in four digit format
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- *
- * @return int
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function getSecondsInMinute(
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute
- )
- {
- if ($pn_hour < 23 || $pn_minute < 59) {
- return 60;
- } else {
- return Date_Calc::getSecondsInDay($pn_day, $pn_month, $pn_year) -
- 86340;
- }
- }
-
-
- // }}}
- // {{{ secondsPastMidnight()
-
- /**
- * Returns the no of seconds since midnight (0-86399)
- *
- * @param int $pn_hour the hour of the day
- * @param int $pn_minute the minute
- * @param mixed $pn_second the second as integer or float
- *
- * @return mixed integer or float from 0-86399
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function secondsPastMidnight($pn_hour, $pn_minute, $pn_second)
- {
- return 3600 * $pn_hour + 60 * $pn_minute + $pn_second;
- }
-
-
- // }}}
- // {{{ secondsPastMidnightToTime()
-
- /**
- * Returns the time as an array (i.e. hour, minute, second)
- *
- * @param mixed $pn_seconds the no of seconds since midnight (0-86399)
- *
- * @return mixed array of hour, minute (both as integers), second (as
- * integer or float, depending on parameter)
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function secondsPastMidnightToTime($pn_seconds)
- {
- if ($pn_seconds >= 86400) {
- return array(23, 59, $pn_seconds - 86340);
- }
-
- $hn_hour = intval($pn_seconds / 3600);
- $hn_minute = intval(($pn_seconds - $hn_hour * 3600) / 60);
- $hn_second = is_float($pn_seconds) ?
- fmod($pn_seconds, 60) :
- $pn_seconds % 60;
-
- return array($hn_hour, $hn_minute, $hn_second);
- }
-
-
- // }}}
- // {{{ secondsPastTheHour()
-
- /**
- * Returns the no of seconds since the last hour o'clock (0-3599)
- *
- * @param int $pn_minute the minute
- * @param mixed $pn_second the second as integer or float
- *
- * @return mixed integer or float from 0-3599
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function secondsPastTheHour($pn_minute, $pn_second)
- {
- return 60 * $pn_minute + $pn_second;
- }
-
-
- // }}}
- // {{{ addHours()
-
- /**
- * Returns the date the specified no of hours from the given date
- *
- * To subtract hours use a negative value for the '$pn_hours' parameter
- *
- * @param int $pn_hours hours to add
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- *
- * @return array array of year, month, day, hour
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function addHours($pn_hours, $pn_day, $pn_month, $pn_year, $pn_hour)
- {
- if ($pn_hours == 0) {
- return array((int)$pn_year,
- (int)$pn_month,
- (int)$pn_day,
- (int)$pn_hour);
- }
-
- $hn_days = intval($pn_hours / 24);
- $hn_hour = $pn_hour + $pn_hours % 24;
-
- if ($hn_hour >= 24) {
- ++$hn_days;
- $hn_hour -= 24;
- } elseif ($hn_hour < 0) {
- --$hn_days;
- $hn_hour += 24;
- }
-
- if ($hn_days == 0) {
- $hn_year = $pn_year;
- $hn_month = $pn_month;
- $hn_day = $pn_day;
- } else {
- list($hn_year, $hn_month, $hn_day) =
- explode(
- " ",
- Date_Calc::addDays(
- $hn_days,
- $pn_day,
- $pn_month,
- $pn_year,
- "%Y %m %d"
- )
- );
- }
-
- return array((int)$hn_year, (int)$hn_month, (int)$hn_day, $hn_hour);
- }
-
-
- // }}}
- // {{{ addMinutes()
-
- /**
- * Returns the date the specified no of minutes from the given date
- *
- * To subtract minutes use a negative value for the '$pn_minutes' parameter
- *
- * @param int $pn_minutes minutes to add
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- *
- * @return array array of year, month, day, hour, minute
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function addMinutes(
- $pn_minutes,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute
- )
- {
- if ($pn_minutes == 0) {
- return array((int)$pn_year,
- (int)$pn_month,
- (int)$pn_day,
- (int)$pn_hour,
- (int)$pn_minute);
- }
-
- $hn_hours = intval($pn_minutes / 60);
- $hn_minute = $pn_minute + $pn_minutes % 60;
-
- if ($hn_minute >= 60) {
- ++$hn_hours;
- $hn_minute -= 60;
- } elseif ($hn_minute < 0) {
- --$hn_hours;
- $hn_minute += 60;
- }
-
- if ($hn_hours == 0) {
- $hn_year = $pn_year;
- $hn_month = $pn_month;
- $hn_day = $pn_day;
- $hn_hour = $pn_hour;
- } else {
- list($hn_year, $hn_month, $hn_day, $hn_hour) =
- Date_Calc::addHours(
- $hn_hours,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour
- );
- }
-
- return array($hn_year, $hn_month, $hn_day, $hn_hour, $hn_minute);
- }
-
-
- // }}}
- // {{{ addSeconds()
-
- /**
- * Returns the date the specified no of seconds from the given date
- *
- * If leap seconds are specified to be counted, the passed time must be UTC.
- * To subtract seconds use a negative value for the '$pn_seconds' parameter.
- *
- * N.B. the return type of the second part of the date is float if
- * either '$pn_seconds' or '$pn_second' is a float; otherwise, it
- * is integer.
- *
- * @param mixed $pn_seconds seconds to add as integer or float
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- * @param mixed $pn_second the second as integer or float
- * @param bool $pb_countleap whether to count leap seconds (defaults to
- * DATE_COUNT_LEAP_SECONDS)
- *
- * @return array array of year, month, day, hour, minute, second
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function addSeconds(
- $pn_seconds,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second,
- $pb_countleap = DATE_COUNT_LEAP_SECONDS
- )
- {
- if ($pn_seconds == 0) {
- return array((int)$pn_year,
- (int)$pn_month,
- (int)$pn_day,
- (int)$pn_hour,
- (int)$pn_minute,
- $pn_second);
- }
-
- if ($pb_countleap) {
- $hn_seconds = $pn_seconds;
-
- $hn_day = (int)$pn_day;
- $hn_month = (int)$pn_month;
- $hn_year = (int)$pn_year;
- $hn_hour = (int)$pn_hour;
- $hn_minute = (int)$pn_minute;
- $hn_second = $pn_second;
-
- $hn_days = Date_Calc::dateToDays(
- $pn_day,
- $pn_month,
- $pn_year
- );
- $hn_secondsofmonth = 86400 * ($hn_days -
- Date_Calc::firstDayOfMonth(
- $pn_month,
- $pn_year
- )) +
- Date_Calc::secondsPastMidnight(
- $pn_hour,
- $pn_minute,
- $pn_second
- );
-
- if ($hn_seconds > 0) {
- // Advance to end of month:
- //
- if ($hn_secondsofmonth != 0 &&
- $hn_secondsofmonth + $hn_seconds >=
- ($hn_secondsinmonth =
- Date_Calc::getSecondsInMonth($hn_month, $hn_year))) {
- $hn_seconds -= $hn_secondsinmonth - $hn_secondsofmonth;
- $hn_secondsofmonth = 0;
- list($hn_year, $hn_month) =
- Date_Calc::nextMonth($hn_month, $hn_year);
- $hn_day = Date_Calc::getFirstDayOfMonth(
- $hn_month,
- $hn_year
- );
- $hn_hour = $hn_minute = $hn_second = 0;
- }
-
- // Advance to end of year:
- //
- if ($hn_secondsofmonth == 0 &&
- $hn_month != Date_Calc::getFirstMonthOfYear($hn_year)) {
- while ($hn_year == $pn_year &&
- $hn_seconds >= ($hn_secondsinmonth =
- Date_Calc::getSecondsInMonth(
- $hn_month,
- $hn_year
- ))) {
- $hn_seconds -= $hn_secondsinmonth;
- list($hn_year, $hn_month) =
- Date_Calc::nextMonth($hn_month, $hn_year);
- $hn_day = Date_Calc::getFirstDayOfMonth(
- $hn_month,
- $hn_year
- );
- }
- }
-
- if ($hn_secondsofmonth == 0) {
- // Add years:
- //
- if ($hn_month == Date_Calc::getFirstMonthOfYear($hn_year)) {
- while ($hn_seconds >= ($hn_secondsinyear =
- Date_Calc::getSecondsInYear($hn_year))) {
- $hn_seconds -= $hn_secondsinyear;
- $hn_month = Date_Calc::getFirstMonthOfYear(++$hn_year);
- $hn_day = Date_Calc::getFirstDayOfMonth(
- $hn_month,
- $hn_year
- );
- }
- }
-
- // Add months:
- //
- while ($hn_seconds >= ($hn_secondsinmonth =
- Date_Calc::getSecondsInMonth($hn_month, $hn_year))) {
- $hn_seconds -= $hn_secondsinmonth;
- list($hn_year, $hn_month) =
- Date_Calc::nextMonth($hn_month, $hn_year);
- $hn_day = Date_Calc::getFirstDayOfMonth($hn_month, $hn_year);
- }
- }
- } else {
- //
- // (if $hn_seconds < 0)
-
- // Go back to start of month:
- //
- if ($hn_secondsofmonth != 0 &&
- -$hn_seconds >= $hn_secondsofmonth) {
- $hn_seconds += $hn_secondsofmonth;
- $hn_secondsofmonth = 0;
- $hn_day = Date_Calc::getFirstDayOfMonth(
- $hn_month,
- $hn_year
- );
- $hn_hour = $hn_minute = $hn_second = 0;
- }
-
- // Go back to start of year:
- //
- if ($hn_secondsofmonth == 0) {
- while ($hn_month !=
- Date_Calc::getFirstMonthOfYear($hn_year)) {
- list($hn_year, $hn_prevmonth) =
- Date_Calc::prevMonth($hn_month, $hn_year);
-
- if (-$hn_seconds >= ($hn_secondsinmonth =
- Date_Calc::getSecondsInMonth(
- $hn_prevmonth,
- $hn_year
- ))) {
- $hn_seconds += $hn_secondsinmonth;
- $hn_month = $hn_prevmonth;
- $hn_day = Date_Calc::getFirstDayOfMonth(
- $hn_month,
- $hn_year
- );
- } else {
- break;
- }
- }
- }
-
- if ($hn_secondsofmonth == 0) {
- // Subtract years:
- //
- if ($hn_month == Date_Calc::getFirstMonthOfYear($hn_year)) {
- while (-$hn_seconds >= ($hn_secondsinyear =
- Date_Calc::getSecondsInYear($hn_year - 1))) {
- $hn_seconds += $hn_secondsinyear;
- $hn_month = Date_Calc::getFirstMonthOfYear(--$hn_year);
- $hn_day = Date_Calc::getFirstDayOfMonth(
- $hn_month,
- $hn_year
- );
- }
- }
-
- // Subtract months:
- //
- list($hn_pmyear, $hn_prevmonth) =
- Date_Calc::prevMonth($hn_month, $hn_year);
- while (-$hn_seconds >= ($hn_secondsinmonth =
- Date_Calc::getSecondsInMonth(
- $hn_prevmonth,
- $hn_pmyear
- ))) {
- $hn_seconds += $hn_secondsinmonth;
- $hn_year = $hn_pmyear;
- $hn_month = $hn_prevmonth;
- $hn_day = Date_Calc::getFirstDayOfMonth(
- $hn_month,
- $hn_year
- );
- list($hn_pmyear, $hn_prevmonth) =
- Date_Calc::prevMonth($hn_month, $hn_year);
- }
- }
- }
-
- if ($hn_seconds < 0 && $hn_secondsofmonth == 0) {
- list($hn_year, $hn_month) =
- Date_Calc::prevMonth($hn_month, $hn_year);
- $hn_day = Date_Calc::getFirstDayOfMonth($hn_month, $hn_year);
- $hn_seconds += Date_Calc::getSecondsInMonth($hn_month, $hn_year);
- }
-
- $hn_seconds += Date_Calc::secondsPastMidnight(
- $hn_hour,
- $hn_minute,
- $hn_second
- );
- if ($hn_seconds < 0) {
- $hn_daysadd = intval($hn_seconds / 86400) - 1;
- } elseif ($hn_seconds < 86400) {
- $hn_daysadd = 0;
- } else {
- $hn_daysadd = intval($hn_seconds / 86400) - 1;
- }
-
- if ($hn_daysadd != 0) {
- list($hn_year, $hn_month, $hn_day) =
- explode(
- " ",
- Date_Calc::addDays(
- $hn_daysadd,
- $hn_day,
- $hn_month,
- $hn_year,
- "%Y %m %d"
- )
- );
- $hn_seconds -= $hn_daysadd * 86400;
- }
-
- $hn_secondsinday = Date_Calc::getSecondsInDay(
- $hn_day,
- $hn_month,
- $hn_year
- );
- if ($hn_seconds >= $hn_secondsinday) {
- list($hn_year, $hn_month, $hn_day) =
- explode(
- " ",
- Date_Calc::addDays(
- 1,
- $hn_day,
- $hn_month,
- $hn_year,
- "%Y %m %d"
- )
- );
- $hn_seconds -= $hn_secondsinday;
- }
-
- list($hn_hour, $hn_minute, $hn_second) =
- Date_Calc::secondsPastMidnightToTime($hn_seconds);
-
- return array((int)$hn_year,
- (int)$hn_month,
- (int)$hn_day,
- $hn_hour,
- $hn_minute,
- $hn_second);
- } else {
- // Assume every day has 86400 seconds exactly (ignore leap seconds):
- //
- $hn_minutes = intval($pn_seconds / 60);
-
- if (is_float($pn_seconds)) {
- $hn_second = $pn_second + fmod($pn_seconds, 60);
- } else {
- $hn_second = $pn_second + $pn_seconds % 60;
- }
-
- if ($hn_second >= 60) {
- ++$hn_minutes;
- $hn_second -= 60;
- } elseif ($hn_second < 0) {
- --$hn_minutes;
- $hn_second += 60;
- }
-
- if ($hn_minutes == 0) {
- $hn_year = $pn_year;
- $hn_month = $pn_month;
- $hn_day = $pn_day;
- $hn_hour = $pn_hour;
- $hn_minute = $pn_minute;
- } else {
- list($hn_year, $hn_month, $hn_day, $hn_hour, $hn_minute) =
- Date_Calc::addMinutes(
- $hn_minutes,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute
- );
- }
-
- return array($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute,
- $hn_second);
- }
- }
-
-
- // }}}
- // {{{ dateToDays()
-
- /**
- * Converts a date in the proleptic Gregorian calendar to the no of days
- * since 24th November, 4714 B.C.
- *
- * Returns the no of days since Monday, 24th November, 4714 B.C. in the
- * proleptic Gregorian calendar (which is 24th November, -4713 using
- * 'Astronomical' year numbering, and 1st January, 4713 B.C. in the
- * proleptic Julian calendar). This is also the first day of the 'Julian
- * Period' proposed by Joseph Scaliger in 1583, and the number of days
- * since this date is known as the 'Julian Day'. (It is not directly
- * to do with the Julian calendar, although this is where the name
- * is derived from.)
- *
- * The algorithm is valid for all years (positive and negative), and
- * also for years preceding 4714 B.C.
- *
- * @param int $day the day of the month
- * @param int $month the month
- * @param int $year the year (using 'Astronomical' year numbering)
- *
- * @return int the number of days since 24th November, 4714 B.C.
- * @access public
- * @static
- */
- public function dateToDays($day, $month, $year)
- {
- if ($month > 2) {
- // March = 0, April = 1, ..., December = 9,
- // January = 10, February = 11
- $month -= 3;
- } else {
- $month += 9;
- --$year;
- }
-
- $hb_negativeyear = $year < 0;
- $century = intval($year / 100);
- $year = $year % 100;
-
- if ($hb_negativeyear) {
- // Subtract 1 because year 0 is a leap year;
- // And N.B. that we must treat the leap years as occurring
- // one year earlier than they do, because for the purposes
- // of calculation, the year starts on 1st March:
- //
- return intval((14609700 * $century + ($year == 0 ? 1 : 0)) / 400) +
- intval((1461 * $year + 1) / 4) +
- intval((153 * $month + 2) / 5) +
- $day + 1721118;
- } else {
- return intval(146097 * $century / 4) +
- intval(1461 * $year / 4) +
- intval((153 * $month + 2) / 5) +
- $day + 1721119;
- }
- }
-
-
- // }}}
- // {{{ daysToDate()
-
- /**
- * Converts no of days since 24th November, 4714 B.C. (in the proleptic
- * Gregorian calendar, which is year -4713 using 'Astronomical' year
- * numbering) to Gregorian calendar date
- *
- * Returned date belongs to the proleptic Gregorian calendar, using
- * 'Astronomical' year numbering.
- *
- * The algorithm is valid for all years (positive and negative), and
- * also for years preceding 4714 B.C. (i.e. for negative 'Julian Days'),
- * and so the only limitation is platform-dependent (for 32-bit systems
- * the maximum year would be something like about 1,465,190 A.D.).
- *
- * N.B. Monday, 24th November, 4714 B.C. is Julian Day '0'.
- *
- * @param int $days the number of days since 24th November, 4714 B.C.
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function daysToDate($days, $format = DATE_CALC_FORMAT)
- {
- $days = intval($days);
-
- $days -= 1721119;
- $century = floor((4 * $days - 1) / 146097);
- $days = floor(4 * $days - 1 - 146097 * $century);
- $day = floor($days / 4);
-
- $year = floor((4 * $day + 3) / 1461);
- $day = floor(4 * $day + 3 - 1461 * $year);
- $day = floor(($day + 4) / 4);
-
- $month = floor((5 * $day - 3) / 153);
- $day = floor(5 * $day - 3 - 153 * $month);
- $day = floor(($day + 5) / 5);
-
- $year = $century * 100 + $year;
- if ($month < 10) {
- $month += 3;
- } else {
- $month -= 9;
- ++$year;
- }
-
- return Date_Calc::dateFormat($day, $month, $year, $format);
- }
-
-
- // }}}
- // {{{ getMonths()
-
- /**
- * Returns array of the month numbers, in order, for the given year
- *
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return array array of integer month numbers, in order
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function getMonths($pn_year)
- {
- // N.B. Month numbers can be skipped but not duplicated:
- //
- return array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
- }
-
-
- // }}}
- // {{{ getMonthNames()
-
- /**
- * Returns an array of month names
- *
- * Used to take advantage of the setlocale function to return
- * language specific month names.
- *
- * TODO: cache values to some global array to avoid performance
- * hits when called more than once.
- *
- * @param int $pb_abbreviated whether to return the abbreviated form of the
- * months
- *
- * @return array associative array of integer month numbers, in
- * order, to month names
- * @access public
- * @static
- */
- public function getMonthNames($pb_abbreviated = false)
- {
- $ret = array();
- foreach (Date_Calc::getMonths(2001) as $i) {
- $ret[$i] = strftime(
- $pb_abbreviated ? '%b' : '%B',
- mktime(0, 0, 0, $i, 1, 2001)
- );
- }
- return $ret;
- }
-
-
- // }}}
- // {{{ prevMonth()
-
- /**
- * Returns month and year of previous month
- *
- * @param int $pn_month the month
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return array array of year, month as integers
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function prevMonth($pn_month, $pn_year)
- {
- $ha_months = Date_Calc::getMonths($pn_year);
- $hn_monthkey = array_search($pn_month, $ha_months);
- if (array_key_exists($hn_monthkey - 1, $ha_months)) {
- return array((int)$pn_year, $ha_months[$hn_monthkey - 1]);
- } else {
- $ha_months = Date_Calc::getMonths($pn_year - 1);
- return array($pn_year - 1, end($ha_months));
- }
- }
-
-
- // }}}
- // {{{ nextMonth()
-
- /**
- * Returns month and year of next month
- *
- * @param int $pn_month the month
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return array array of year, month as integers
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function nextMonth($pn_month, $pn_year)
- {
- $ha_months = Date_Calc::getMonths($pn_year);
- $hn_monthkey = array_search($pn_month, $ha_months);
- if (array_key_exists($hn_monthkey + 1, $ha_months)) {
- return array((int)$pn_year, $ha_months[$hn_monthkey + 1]);
- } else {
- $ha_months = Date_Calc::getMonths($pn_year + 1);
- return array($pn_year + 1, $ha_months[0]);
- }
- }
-
-
- // }}}
- // {{{ addMonthsToDays()
-
- /**
- * Returns 'Julian Day' of the date the specified no of months
- * from the given date
- *
- * To subtract months use a negative value for the '$pn_months'
- * parameter
- *
- * @param int $pn_months months to add
- * @param int $pn_days 'Julian Day', i.e. the no of days since 1st
- * January, 4713 B.C.
- *
- * @return int 'Julian Day', i.e. the no of days since 1st January,
- * 4713 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function addMonthsToDays($pn_months, $pn_days)
- {
- if ($pn_months == 0) {
- return (int)$pn_days;
- }
-
- list($hn_year, $hn_month, $hn_day) =
- explode(" ", Date_Calc::daysToDate($pn_days, "%Y %m %d"));
-
- $hn_retmonth = $hn_month + $pn_months % 12;
- $hn_retyear = $hn_year + intval($pn_months / 12);
- if ($hn_retmonth < 1) {
- $hn_retmonth += 12;
- --$hn_retyear;
- } elseif ($hn_retmonth > 12) {
- $hn_retmonth -= 12;
- ++$hn_retyear;
- }
-
- if (Date_Calc::isValidDate($hn_day, $hn_retmonth, $hn_retyear)) {
- return Date_Calc::dateToDays($hn_day, $hn_retmonth, $hn_retyear);
- }
-
- // Calculate days since first of month:
- //
- $hn_dayoffset = $pn_days -
- Date_Calc::firstDayOfMonth($hn_month, $hn_year);
-
- $hn_retmonthfirstday = Date_Calc::firstDayOfMonth(
- $hn_retmonth,
- $hn_retyear
- );
- $hn_retmonthlastday = Date_Calc::lastDayOfMonth(
- $hn_retmonth,
- $hn_retyear
- );
-
- if ($hn_dayoffset > $hn_retmonthlastday - $hn_retmonthfirstday) {
- return $hn_retmonthlastday;
- } else {
- return $hn_retmonthfirstday + $hn_dayoffset;
- }
- }
-
-
- // }}}
- // {{{ addMonths()
-
- /**
- * Returns the date the specified no of months from the given date
- *
- * To subtract months use a negative value for the '$pn_months'
- * parameter
- *
- * @param int $pn_months months to add
- * @param int $pn_day the day of the month, default is current local
- * day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is
- * current local year
- * @param string $ps_format string specifying how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function addMonths(
- $pn_months,
- $pn_day,
- $pn_month,
- $pn_year,
- $ps_format = DATE_CALC_FORMAT
- )
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- if ($pn_months == 0) {
- return Date_Calc::dateFormat(
- $pn_day,
- $pn_month,
- $pn_year,
- $ps_format
- );
- }
-
- $hn_days = Date_Calc::dateToDays($pn_day, $pn_month, $pn_year);
- return Date_Calc::daysToDate(
- Date_Calc::addMonthsToDays(
- $pn_months,
- $hn_days
- ),
- $ps_format
- );
- }
-
-
- // }}}
- // {{{ addYearsToDays()
-
- /**
- * Returns 'Julian Day' of the date the specified no of years
- * from the given date
- *
- * To subtract years use a negative value for the '$pn_years'
- * parameter
- *
- * @param int $pn_years years to add
- * @param int $pn_days 'Julian Day', i.e. the no of days since 1st January,
- * 4713 B.C.
- *
- * @return int 'Julian Day', i.e. the no of days since 1st January,
- * 4713 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function addYearsToDays($pn_years, $pn_days)
- {
- if ($pn_years == 0) {
- return (int)$pn_days;
- }
-
- list($hn_year, $hn_month, $hn_day) =
- explode(" ", Date_Calc::daysToDate($pn_days, "%Y %m %d"));
-
- $hn_retyear = $hn_year + $pn_years;
- if (Date_Calc::isValidDate($hn_day, $hn_month, $hn_retyear)) {
- return Date_Calc::dateToDays($hn_day, $hn_month, $hn_retyear);
- }
-
- $ha_months = Date_Calc::getMonths($hn_retyear);
- if (in_array($hn_month, $ha_months)) {
- $hn_retmonth = $hn_month;
-
- // Calculate days since first of month:
- //
- $hn_dayoffset = $pn_days - Date_Calc::firstDayOfMonth(
- $hn_month,
- $hn_year
- );
-
- $hn_retmonthfirstday = Date_Calc::firstDayOfMonth(
- $hn_retmonth,
- $hn_retyear
- );
- $hn_retmonthlastday = Date_Calc::lastDayOfMonth(
- $hn_retmonth,
- $hn_retyear
- );
-
- if ($hn_dayoffset > $hn_retmonthlastday - $hn_retmonthfirstday) {
- return $hn_retmonthlastday;
- } else {
- return $hn_retmonthfirstday + $hn_dayoffset;
- }
- } else {
- // Calculate days since first of year:
- //
- $hn_dayoffset = $pn_days - Date_Calc::firstDayOfYear($hn_year);
-
- $hn_retyearfirstday = Date_Calc::firstDayOfYear($hn_retyear);
- $hn_retyearlastday = Date_Calc::lastDayOfYear($hn_retyear);
-
- if ($hn_dayoffset > $hn_retyearlastday - $hn_retyearfirstday) {
- return $hn_retyearlastday;
- } else {
- return $hn_retyearfirstday + $hn_dayoffset;
- }
- }
- }
-
-
- // }}}
- // {{{ addYears()
-
- /**
- * Returns the date the specified no of years from the given date
- *
- * To subtract years use a negative value for the '$pn_years'
- * parameter
- *
- * @param int $pn_years years to add
- * @param int $pn_day the day of the month, default is current local
- * day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is
- * current local year
- * @param string $ps_format string specifying how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function addYears(
- $pn_years,
- $pn_day,
- $pn_month,
- $pn_year,
- $ps_format = DATE_CALC_FORMAT
- )
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- if ($pn_years == 0) {
- return Date_Calc::dateFormat(
- $pn_day,
- $pn_month,
- $pn_year,
- $ps_format
- );
- }
-
- $hn_days = Date_Calc::dateToDays($pn_day, $pn_month, $pn_year);
- return Date_Calc::daysToDate(
- Date_Calc::addYearsToDays(
- $pn_years,
- $hn_days
- ),
- $ps_format
- );
- }
-
-
- // }}}
- // {{{ addDays()
-
- /**
- * Returns the date the specified no of days from the given date
- *
- * To subtract days use a negative value for the '$pn_days' parameter
- *
- * @param int $pn_days days to add
- * @param int $pn_day the day of the month, default is current local
- * day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is
- * current local year
- * @param string $ps_format string specifying how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function addDays(
- $pn_days,
- $pn_day,
- $pn_month,
- $pn_year,
- $ps_format = DATE_CALC_FORMAT
- )
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- if ($pn_days == 0) {
- return Date_Calc::dateFormat(
- $pn_day,
- $pn_month,
- $pn_year,
- $ps_format
- );
- }
-
- return Date_Calc::daysToDate(
- Date_Calc::dateToDays(
- $pn_day,
- $pn_month,
- $pn_year
- ) +
- $pn_days,
- $ps_format
- );
- }
-
-
- // }}}
- // {{{ getFirstDayOfMonth()
-
- /**
- * Returns first day of the specified month of specified year as integer
- *
- * @param int $pn_month the month
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return int number of first day of month
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function getFirstDayOfMonth($pn_month, $pn_year)
- {
- return 1;
- }
-
-
- // }}}
- // {{{ getLastDayOfMonth()
-
- /**
- * Returns last day of the specified month of specified year as integer
- *
- * @param int $pn_month the month
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return int number of last day of month
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function getLastDayOfMonth($pn_month, $pn_year)
- {
- return Date_Calc::daysInMonth($pn_month, $pn_year);
- }
-
-
- // }}}
- // {{{ firstDayOfMonth()
-
- /**
- * Returns the Julian Day of the first day of the month of the specified
- * year (i.e. the no of days since 24th November, 4714 B.C.)
- *
- * @param int $pn_month the month
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return integer the number of days since 24th November, 4714 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function firstDayOfMonth($pn_month, $pn_year)
- {
- return Date_Calc::dateToDays(
- Date_Calc::getFirstDayOfMonth(
- $pn_month,
- $pn_year
- ),
- $pn_month,
- $pn_year
- );
- }
-
-
- // }}}
- // {{{ lastDayOfMonth()
-
- /**
- * Returns the Julian Day of the last day of the month of the specified
- * year (i.e. the no of days since 24th November, 4714 B.C.)
- *
- * @param int $pn_month the month
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return integer the number of days since 24th November, 4714 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function lastDayOfMonth($pn_month, $pn_year)
- {
- list($hn_nmyear, $hn_nextmonth) = Date_Calc::nextMonth(
- $pn_month,
- $pn_year
- );
- return Date_Calc::firstDayOfMonth($hn_nextmonth, $hn_nmyear) - 1;
- }
-
-
- // }}}
- // {{{ getFirstMonthOfYear()
-
- /**
- * Returns first month of specified year as integer
- *
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return int number of first month of year
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function getFirstMonthOfYear($pn_year)
- {
- $ha_months = Date_Calc::getMonths($pn_year);
- return $ha_months[0];
- }
-
-
- // }}}
- // {{{ firstDayOfYear()
-
- /**
- * Returns the Julian Day of the first day of the year (i.e. the no of
- * days since 24th November, 4714 B.C.)
- *
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return integer the number of days since 24th November, 4714 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function firstDayOfYear($pn_year)
- {
- return Date_Calc::firstDayOfMonth(
- Date_Calc::getFirstMonthOfYear($pn_year),
- $pn_year
- );
- }
-
-
- // }}}
- // {{{ lastDayOfYear()
-
- /**
- * Returns the Julian Day of the last day of the year (i.e. the no of
- * days since 24th November, 4714 B.C.)
- *
- * @param int $pn_year the year (using 'Astronomical' year numbering)
- *
- * @return integer the number of days since 24th November, 4714 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function lastDayOfYear($pn_year)
- {
- return Date_Calc::firstDayOfYear($pn_year + 1) - 1;
- }
-
-
- // }}}
- // {{{ dateToDaysJulian()
-
- /**
- * Converts a date in the proleptic Julian calendar to the no of days
- * since 1st January, 4713 B.C.
- *
- * Returns the no of days since Monday, 1st January, 4713 B.C. in the
- * proleptic Julian calendar (which is 1st January, -4712 using
- * 'Astronomical' year numbering, and 24th November, 4713 B.C. in the
- * proleptic Gregorian calendar). This is also the first day of the 'Julian
- * Period' proposed by Joseph Scaliger in 1583, and the number of days
- * since this date is known as the 'Julian Day'. (It is not directly
- * to do with the Julian calendar, although this is where the name
- * is derived from.)
- *
- * The algorithm is valid for all years (positive and negative), and
- * also for years preceding 4713 B.C.
- *
- * @param int $day the day of the month
- * @param int $month the month
- * @param int $year the year (using 'Astronomical' year numbering)
- *
- * @return int the number of days since 1st January, 4713 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function dateToDaysJulian($day, $month, $year)
- {
- if ($month > 2) {
- // March = 0, April = 1, ..., December = 9,
- // January = 10, February = 11
- $month -= 3;
- } else {
- $month += 9;
- --$year;
- }
-
- $hb_negativeyear = $year < 0;
-
- if ($hb_negativeyear) {
- // Subtract 1 because year 0 is a leap year;
- // And N.B. that we must treat the leap years as occurring
- // one year earlier than they do, because for the purposes
- // of calculation, the year starts on 1st March:
- //
- return intval((1461 * $year + 1) / 4) +
- intval((153 * $month + 2) / 5) +
- $day + 1721116;
- } else {
- return intval(1461 * $year / 4) +
- floor((153 * $month + 2) / 5) +
- $day + 1721117;
- }
- }
-
-
- // }}}
- // {{{ daysToDateJulian()
-
- /**
- * Converts no of days since 1st January, 4713 B.C. (in the proleptic
- * Julian calendar, which is year -4712 using 'Astronomical' year
- * numbering) to Julian calendar date
- *
- * Returned date belongs to the proleptic Julian calendar, using
- * 'Astronomical' year numbering.
- *
- * @param int $days the number of days since 1st January, 4713 B.C.
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function daysToDateJulian($days, $format = DATE_CALC_FORMAT)
- {
- $days = intval($days);
-
- $days -= 1721117;
- $days = floor(4 * $days - 1);
- $day = floor($days / 4);
-
- $year = floor((4 * $day + 3) / 1461);
- $day = floor(4 * $day + 3 - 1461 * $year);
- $day = floor(($day + 4) / 4);
-
- $month = floor((5 * $day - 3) / 153);
- $day = floor(5 * $day - 3 - 153 * $month);
- $day = floor(($day + 5) / 5);
-
- if ($month < 10) {
- $month += 3;
- } else {
- $month -= 9;
- ++$year;
- }
-
- return Date_Calc::dateFormat($day, $month, $year, $format);
- }
-
-
- // }}}
- // {{{ isoWeekDate()
-
- /**
- * Returns array defining the 'ISO Week Date' as defined in ISO 8601
- *
- * Expects a date in the proleptic Gregorian calendar using 'Astronomical'
- * year numbering, that is, with a year 0. Algorithm is valid for all
- * years (positive and negative).
- *
- * N.B. the ISO week day no for Sunday is defined as 7, whereas this
- * class and its related functions defines Sunday as 0.
- *
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year
- *
- * @return array array of ISO Year, ISO Week No, ISO Day No as
- * integers
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function isoWeekDate($pn_day = 0, $pn_month = 0, $pn_year = null)
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- $hn_jd = Date_Calc::dateToDays($pn_day, $pn_month, $pn_year);
- $hn_wd = Date_Calc::daysToDayOfWeek($hn_jd);
- if ($hn_wd == 0) {
- $hn_wd = 7;
- }
-
- $hn_jd1 = Date_Calc::firstDayOfYear($pn_year);
- $hn_day = $hn_jd - $hn_jd1 + 1;
-
- if ($hn_wd <= $hn_jd - Date_Calc::lastDayOfYear($pn_year) + 3) {
- // ISO week is the first week of the next ISO year:
- //
- $hn_year = $pn_year + 1;
- $hn_isoweek = 1;
- } else {
- switch ($hn_wd1 = Date_Calc::daysToDayOfWeek($hn_jd1)) {
- case 1:
- case 2:
- case 3:
- case 4:
- // Monday - Thursday:
- //
- $hn_year = $pn_year;
- $hn_isoweek = floor(($hn_day + $hn_wd1 - 2) / 7) + 1;
- break;
- case 0:
- $hn_wd1 = 7;
- // no break
- case 5:
- case 6:
- // Friday - Sunday:
- //
- if ($hn_day <= 8 - $hn_wd1) {
- // ISO week is the last week of the previous ISO year:
- //
- list($hn_year, $hn_lastmonth, $hn_lastday) =
- explode(
- " ",
- Date_Calc::daysToDate($hn_jd1 - 1, "%Y %m %d")
- );
- list($hn_year, $hn_isoweek, $hn_pisoday) =
- Date_Calc::isoWeekDate(
- $hn_lastday,
- $hn_lastmonth,
- $hn_year
- );
- } else {
- $hn_year = $pn_year;
- $hn_isoweek = floor(($hn_day + $hn_wd1 - 9) / 7) + 1;
- }
-
- break;
- }
- }
-
- return array((int)$hn_year, (int)$hn_isoweek, (int)$hn_wd);
- }
-
-
- // }}}
- // {{{ gregorianToISO()
-
- /**
- * Converts from Gregorian Year-Month-Day to ISO Year-WeekNumber-WeekDay
- *
- * Uses ISO 8601 definitions.
- *
- * @param int $day the day of the month
- * @param int $month the month
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return string the date in ISO Year-WeekNumber-WeekDay format
- * @access public
- * @static
- */
- public function gregorianToISO($day, $month, $year)
- {
- list($yearnumber, $weeknumber, $weekday) =
- Date_Calc::isoWeekDate($day, $month, $year);
- return sprintf("%04d", $yearnumber) .
- '-' .
- sprintf("%02d", $weeknumber) .
- '-' .
- $weekday;
- }
-
-
- // }}}
- // {{{ weekOfYear4th()
-
- /**
- * Returns week of the year counting week 1 as the week that contains 4th
- * January
- *
- * Week 1 is determined to be the week that includes the 4th January, and
- * therefore can be defined as the first week of the year that has at least
- * 4 days. The previous week is counted as week 52 or 53 of the previous
- * year. Note that this definition depends on which day is the first day of
- * the week, and that if this is not passed as the '$pn_firstdayofweek'
- * parameter, the default is assumed.
- *
- * Note also that the last day week of the year is likely to extend into
- * the following year, except in the case that the last day of the week
- * falls on 31st December.
- *
- * Also note that this is very similar to the ISO week returned by
- * {@link Date::isoWeekDate()}, the difference being that the ISO week
- * always has 7 days, and if the 4th of January is a Friday, for example,
- * ISO week 1 would start on Monday, 31st December in the previous year,
- * whereas the week defined by this function would start on 1st January,
- * but would be only 6 days long. Of course you can also set the day
- * of the week, whereas the ISO week starts on a Monday by definition.
- *
- * Returned week is an integer from 1 to 53.
- *
- * @param int $pn_day the day of the month, default is current
- * local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is
- * current local year
- * @param int $pn_firstdayofweek optional integer specifying the first day
- * of the week
- *
- * @return array array of year, week no as integers
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function weekOfYear4th(
- $pn_day = 0,
- $pn_month = 0,
- $pn_year = null,
- $pn_firstdayofweek = DATE_CALC_BEGIN_WEEKDAY
- )
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- $hn_wd1 = Date_Calc::daysToDayOfWeek(Date_Calc::firstDayOfYear($pn_year));
- $hn_day = Date_Calc::dayOfYear($pn_day, $pn_month, $pn_year);
- $hn_week = floor(($hn_day +
- (10 + $hn_wd1 - $pn_firstdayofweek) % 7 +
- 3) / 7);
-
- if ($hn_week > 0) {
- $hn_year = $pn_year;
- } else {
- // Week number is the last week of the previous year:
- //
- list($hn_year, $hn_lastmonth, $hn_lastday) =
- explode(
- " ",
- Date_Calc::daysToDate(
- Date_Calc::lastDayOfYear($pn_year - 1),
- "%Y %m %d"
- )
- );
- list($hn_year, $hn_week) =
- Date_Calc::weekOfYear4th(
- $hn_lastday,
- $hn_lastmonth,
- $hn_year,
- $pn_firstdayofweek
- );
- }
-
- return array((int)$hn_year, (int)$hn_week);
- }
-
-
- // }}}
- // {{{ weekOfYear7th()
-
- /**
- * Returns week of the year counting week 1 as the week that contains 7th
- * January
- *
- * Week 1 is determined to be the week that includes the 7th January, and
- * therefore can be defined as the first full week of the year. The
- * previous week is counted as week 52 or 53 of the previous year. Note
- * that this definition depends on which day is the first day of the week,
- * and that if this is not passed as the '$pn_firstdayofweek' parameter, the
- * default is assumed.
- *
- * Note also that the last day week of the year is likely to extend into
- * the following year, except in the case that the last day of the week
- * falls on 31st December.
- *
- * Returned week is an integer from 1 to 53.
- *
- * @param int $pn_day the day of the month, default is current
- * local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is
- * current local year
- * @param int $pn_firstdayofweek optional integer specifying the first day
- * of the week
- *
- * @return array array of year, week no as integers
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function weekOfYear7th(
- $pn_day = 0,
- $pn_month = 0,
- $pn_year = null,
- $pn_firstdayofweek = DATE_CALC_BEGIN_WEEKDAY
- )
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- $hn_wd1 = Date_Calc::daysToDayOfWeek(Date_Calc::firstDayOfYear($pn_year));
- $hn_day = Date_Calc::dayOfYear($pn_day, $pn_month, $pn_year);
- $hn_week = floor(($hn_day + (6 + $hn_wd1 - $pn_firstdayofweek) % 7) / 7);
-
- if ($hn_week > 0) {
- $hn_year = $pn_year;
- } else {
- // Week number is the last week of the previous ISO year:
- //
- list($hn_year, $hn_lastmonth, $hn_lastday) = explode(" ", Date_Calc::daysToDate(Date_Calc::lastDayOfYear($pn_year - 1), "%Y %m %d"));
- list($hn_year, $hn_week) = Date_Calc::weekOfYear7th($hn_lastday, $hn_lastmonth, $hn_year, $pn_firstdayofweek);
- }
-
- return array((int)$hn_year, (int)$hn_week);
- }
-
-
- // }}}
- // {{{ dateSeason()
-
- /**
- * Determines julian date of the given season
- *
- * @param string $season the season to get the date for: VERNALEQUINOX,
- * SUMMERSOLSTICE, AUTUMNALEQUINOX,
- * or WINTERSOLSTICE
- * @param string $year the year in four digit format. Must be between
- * -1000 B.C. and 3000 A.D.
- *
- * @return float the julian date the season starts on
- * @access public
- * @static
- */
- public function dateSeason($season, $year = 0)
- {
- if ($year == '') {
- $year = Date_Calc::dateNow('%Y');
- }
- if (($year >= -1000) && ($year <= 1000)) {
- $y = $year / 1000.0;
- switch ($season) {
- case 'VERNALEQUINOX':
- $juliandate = (((((((-0.00071 * $y) - 0.00111) * $y) + 0.06134) * $y) + 365242.1374) * $y) + 1721139.29189;
- break;
- case 'SUMMERSOLSTICE':
- $juliandate = (((((((0.00025 * $y) + 0.00907) * $y) - 0.05323) * $y) + 365241.72562) * $y) + 1721233.25401;
- break;
- case 'AUTUMNALEQUINOX':
- $juliandate = (((((((0.00074 * $y) - 0.00297) * $y) - 0.11677) * $y) + 365242.49558) * $y) + 1721325.70455;
- break;
- case 'WINTERSOLSTICE':
- default:
- $juliandate = (((((((-0.00006 * $y) - 0.00933) * $y) - 0.00769) * $y) + 365242.88257) * $y) + 1721414.39987;
- }
- } elseif (($year > 1000) && ($year <= 3000)) {
- $y = ($year - 2000) / 1000;
- switch ($season) {
- case 'VERNALEQUINOX':
- $juliandate = (((((((-0.00057 * $y) - 0.00411) * $y) + 0.05169) * $y) + 365242.37404) * $y) + 2451623.80984;
- break;
- case 'SUMMERSOLSTICE':
- $juliandate = (((((((-0.0003 * $y) + 0.00888) * $y) + 0.00325) * $y) + 365241.62603) * $y) + 2451716.56767;
- break;
- case 'AUTUMNALEQUINOX':
- $juliandate = (((((((0.00078 * $y) + 0.00337) * $y) - 0.11575) * $y) + 365242.01767) * $y) + 2451810.21715;
- break;
- case 'WINTERSOLSTICE':
- default:
- $juliandate = (((((((0.00032 * $y) - 0.00823) * $y) - 0.06223) * $y) + 365242.74049) * $y) + 2451900.05952;
- }
- }
- return $juliandate;
- }
-
-
- // }}}
- // {{{ dayOfYear()
-
- /**
- * Returns number of days since 31 December of year before given date
- *
- * @param int $pn_day the day of the month, default is current local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is current
- * local year
- *
- * @return int
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function dayOfYear($pn_day = 0, $pn_month = 0, $pn_year = null)
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- $hn_jd = Date_Calc::dateToDays($pn_day, $pn_month, $pn_year);
- $hn_jd1 = Date_Calc::firstDayOfYear($pn_year);
- return $hn_jd - $hn_jd1 + 1;
- }
-
-
- // }}}
- // {{{ julianDate()
-
- /**
- * Returns number of days since 31 December of year before given date
- *
- * @param int $pn_day the day of the month, default is current local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is current
- * local year
- *
- * @return int
- * @access public
- * @static
- * @deprecated Method deprecated in Release 1.5.0
- */
- public function julianDate($pn_day = 0, $pn_month = 0, $pn_year = null)
- {
- return Date_Calc::dayOfYear($pn_day, $pn_month, $pn_year);
- }
-
-
- // }}}
- // {{{ getWeekdayFullname()
-
- /**
- * Returns the full weekday name for the given date
- *
- * @param int $pn_day the day of the month, default is current local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is current
- * local year
- *
- * @return string the full name of the day of the week
- * @access public
- * @static
- */
- public function getWeekdayFullname($pn_day = 0, $pn_month = 0, $pn_year = null)
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- $weekday_names = Date_Calc::getWeekDays();
- $weekday = Date_Calc::dayOfWeek($pn_day, $pn_month, $pn_year);
- return $weekday_names[$weekday];
- }
-
-
- // }}}
- // {{{ getWeekdayAbbrname()
-
- /**
- * Returns the abbreviated weekday name for the given date
- *
- * @param int $pn_day the day of the month, default is current local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is current
- * local year
- * @param int $length the length of abbreviation
- *
- * @return string the abbreviated name of the day of the week
- * @access public
- * @static
- * @see Date_Calc::getWeekdayFullname()
- */
- public function getWeekdayAbbrname(
- $pn_day = 0,
- $pn_month = 0,
- $pn_year = null,
- $length = 3
- )
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- $weekday_names = Date_Calc::getWeekDays(true);
- $weekday = Date_Calc::dayOfWeek($pn_day, $pn_month, $pn_year);
- return $weekday_names[$weekday];
- }
-
-
- // }}}
- // {{{ getMonthFullname()
-
- /**
- * Returns the full month name for the given month
- *
- * @param int $month the month
- *
- * @return string the full name of the month
- * @access public
- * @static
- */
- public function getMonthFullname($month)
- {
- $month = (int)$month;
- if (empty($month)) {
- $month = (int)Date_Calc::dateNow('%m');
- }
-
- $month_names = Date_Calc::getMonthNames();
- return $month_names[$month];
- }
-
-
- // }}}
- // {{{ getMonthAbbrname()
-
- /**
- * Returns the abbreviated month name for the given month
- *
- * @param int $month the month
- * @param int $length the length of abbreviation
- *
- * @return string the abbreviated name of the month
- * @access public
- * @static
- * @see Date_Calc::getMonthFullname
- */
- public function getMonthAbbrname($month, $length = 3)
- {
- $month = (int)$month;
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- $month_names = Date_Calc::getMonthNames(true);
- return $month_names[$month];
- }
-
-
- // }}}
- // {{{ getMonthFromFullname()
-
- /**
- * Returns the numeric month from the month name or an abreviation
- *
- * Both August and Aug would return 8.
- *
- * @param string $month the name of the month to examine.
- * Case insensitive.
- *
- * @return int the month's number
- * @access public
- * @static
- */
- public function getMonthFromFullName($month)
- {
- $month = strtolower($month);
- $months = Date_Calc::getMonthNames();
- while (list($id, $name) = each($months)) {
- if (preg_match('/' . $month . '/', strtolower($name))) {
- return $id;
- }
- }
- return 0;
- }
-
-
- // }}}
- // {{{ getWeekDays()
-
- /**
- * Returns an array of week day names
- *
- * Used to take advantage of the setlocale function to return language
- * specific week days.
- *
- * @param int $pb_abbreviated whether to return the abbreviated form of the
- * days
- *
- * @return array an array of week-day names
- * @access public
- * @static
- */
- public function getWeekDays($pb_abbreviated = false)
- {
- for ($i = 0; $i < 7; $i++) {
- $weekdays[$i] = strftime(
- $pb_abbreviated ? '%a' : '%A',
- mktime(0, 0, 0, 1, $i, 2001)
- );
- }
- return $weekdays;
- }
-
-
- // }}}
- // {{{ daysToDayOfWeek()
-
- /**
- * Returns day of week for specified 'Julian Day'
- *
- * The algorithm is valid for all years (positive and negative), and
- * also for years preceding 4714 B.C. (i.e. for negative 'Julian Days'),
- * and so the only limitation is platform-dependent (for 32-bit systems
- * the maximum year would be something like about 1,465,190 A.D.).
- *
- * N.B. Monday, 24th November, 4714 B.C. is Julian Day '0'.
- *
- * @param int $pn_days the number of days since 24th November, 4714 B.C.
- *
- * @return int integer from 0 to 7 where 0 represents Sunday
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function daysToDayOfWeek($pn_days)
- {
- // On Julian day 0 the day is Monday (PHP day 1):
- //
- $ret = ($pn_days + 1) % 7;
- return $ret < 0 ? $ret + 7 : $ret;
- }
-
-
- // }}}
- // {{{ dayOfWeek()
-
- /**
- * Returns day of week for given date (0 = Sunday)
- *
- * The algorithm is valid for all years (positive and negative).
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- *
- * @return int the number of the day in the week
- * @access public
- * @static
- */
- public function dayOfWeek($day = null, $month = null, $year = null)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- // if ($month <= 2) {
- // $month += 12;
- // --$year;
- // }
-
- // $wd = ($day +
- // intval((13 * $month + 3) / 5) +
- // $year +
- // floor($year / 4) -
- // floor($year / 100) +
- // floor($year / 400) +
- // 1) % 7;
-
- // return (int) ($wd < 0 ? $wd + 7 : $wd);
-
- return Date_Calc::daysToDayOfWeek(Date_Calc::dateToDays(
- $day,
- $month,
- $year
- ));
- }
-
-
- // }}}
- // {{{ weekOfYearAbsolute()
-
- /**
- * Returns week of the year counting week 1 as 1st-7th January,
- * regardless of what day 1st January falls on
- *
- * Returned value is an integer from 1 to 53. Week 53 will start on
- * 31st December and have only one day, except in a leap year, in
- * which it will start a day earlier and contain two days.
- *
- * @param int $pn_day the day of the month, default is current local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is current
- * local year
- *
- * @return int integer from 1 to 53
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function weekOfYearAbsolute($pn_day = 0, $pn_month = 0, $pn_year = null)
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- $hn_day = Date_Calc::dayOfYear($pn_day, $pn_month, $pn_year);
- return intval(($hn_day + 6) / 7);
- }
-
-
- // }}}
- // {{{ weekOfYear1st()
-
- /**
- * Returns week of the year counting week 1 as the week that contains 1st
- * January
- *
- * Week 1 is determined to be the week that includes the 1st January, even
- * if this week extends into the previous year, in which case the week will
- * only contain between 1 and 6 days of the current year. Note that this
- * definition depends on which day is the first day of the week, and that if
- * this is not passed as the '$pn_firstdayofweek' parameter, the default is
- * assumed.
- *
- * Note also that the last day week of the year is also likely to contain
- * less than seven days, except in the case that the last day of the week
- * falls on 31st December.
- *
- * Returned value is an integer from 1 to 54. The year will only contain
- * 54 weeks in the case of a leap year in which 1st January is the last day
- * of the week, and 31st December is the first day of the week. In this
- * case, both weeks 1 and 54 will contain one day only.
- *
- * @param int $pn_day the day of the month, default is current
- * local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is
- * current local year
- * @param int $pn_firstdayofweek optional integer specifying the first day
- * of the week
- *
- * @return int integer from 1 to 54
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function weekOfYear1st(
- $pn_day = 0,
- $pn_month = 0,
- $pn_year = null,
- $pn_firstdayofweek = DATE_CALC_BEGIN_WEEKDAY
- )
- {
- if (is_null($pn_year)) {
- $pn_year = Date_Calc::dateNow('%Y');
- }
- if (empty($pn_month)) {
- $pn_month = Date_Calc::dateNow('%m');
- }
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
-
- $hn_wd1 = Date_Calc::daysToDayOfWeek(Date_Calc::firstDayOfYear($pn_year));
- $hn_day = Date_Calc::dayOfYear($pn_day, $pn_month, $pn_year);
- return floor(($hn_day + (7 + $hn_wd1 - $pn_firstdayofweek) % 7 + 6) / 7);
- }
-
-
- // }}}
- // {{{ weekOfYear()
-
- /**
- * Returns week of the year, where first Sunday is first day of first week
- *
- * N.B. this function is equivalent to calling:
- *
- * <code>Date_Calc::weekOfYear7th($day, $month, $year, 0);</code>
- *
- * Returned week is an integer from 1 to 53.
- *
- * @param int $pn_day the day of the month, default is current local day
- * @param int $pn_month the month, default is current local month
- * @param int $pn_year the year in four digit format, default is current
- * local year
- *
- * @return int integer from 1 to 53
- * @access public
- * @static
- * @see Date_Calc::weekOfYear7th
- * @deprecated Method deprecated in Release 1.5.0
- */
- public function weekOfYear($pn_day = 0, $pn_month = 0, $pn_year = null)
- {
- $ha_week = Date_Calc::weekOfYear7th($pn_day, $pn_month, $pn_year, 0);
- return $ha_week[1];
- }
-
-
- // }}}
- // {{{ weekOfMonthAbsolute()
-
- /**
- * Returns week of the month counting week 1 as 1st-7th of the month,
- * regardless of what day the 1st falls on
- *
- * Returned value is an integer from 1 to 5. Week 5 will start on
- * the 29th of the month and have between 1 and 3 days, except
- * in February in a non-leap year, when there will be 4 weeks only.
- *
- * @param int $pn_day the day of the month, default is current local day
- *
- * @return int integer from 1 to 5
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function weekOfMonthAbsolute($pn_day = 0)
- {
- if (empty($pn_day)) {
- $pn_day = Date_Calc::dateNow('%d');
- }
- return intval(($pn_day + 6) / 7);
- }
-
-
- // }}}
- // {{{ weekOfMonth()
-
- /**
- * Alias for 'weekOfMonthAbsolute()'
- *
- * @param int $pn_day the day of the month, default is current local day
- *
- * @return int integer from 1 to 5
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function weekOfMonth($pn_day = 0)
- {
- return Date_Calc::weekOfMonthAbsolute($pn_day);
- }
-
-
- // }}}
- // {{{ quarterOfYear()
-
- /**
- * Returns quarter of the year for given date
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- *
- * @return int the number of the quarter in the year
- * @access public
- * @static
- */
- public function quarterOfYear($day = 0, $month = 0, $year = null)
- {
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- return intval(($month - 1) / 3 + 1);
- }
-
-
- // }}}
- // {{{ daysInMonth()
-
- /**
- * Returns the number of days in the given month
- *
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- *
- * @return int the number of days the month has
- * @access public
- * @static
- */
- public function daysInMonth($month = 0, $year = null)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- return Date_Calc::lastDayOfMonth($month, $year) -
- Date_Calc::firstDayOfMonth($month, $year) +
- 1;
- }
-
-
- // }}}
- // {{{ daysInYear()
-
- /**
- * Returns the number of days in the given year
- *
- * @param int $year the year in four digit format, default is current local
- * year
- *
- * @return int the number of days the year has
- * @access public
- * @static
- */
- public function daysInYear($year = null)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
-
- return Date_Calc::firstDayOfYear($year + 1) -
- Date_Calc::firstDayOfYear($year);
- }
-
-
- // }}}
- // {{{ weeksInMonth()
-
- /**
- * Returns the number of rows on a calendar month
- *
- * Useful for determining the number of rows when displaying a typical
- * month calendar.
- *
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- *
- * @return int the number of weeks the month has
- * @access public
- * @static
- */
- public function weeksInMonth($month = 0, $year = null)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- $FDOM = Date_Calc::firstOfMonthWeekday($month, $year);
- if (DATE_CALC_BEGIN_WEEKDAY == 1 && $FDOM == 0) {
- $first_week_days = 7 - $FDOM + DATE_CALC_BEGIN_WEEKDAY;
- $weeks = 1;
- } elseif (DATE_CALC_BEGIN_WEEKDAY == 0 && $FDOM == 6) {
- $first_week_days = 7 - $FDOM + DATE_CALC_BEGIN_WEEKDAY;
- $weeks = 1;
- } else {
- $first_week_days = DATE_CALC_BEGIN_WEEKDAY - $FDOM;
- $weeks = 0;
- }
- $first_week_days %= 7;
- return ceil((Date_Calc::daysInMonth($month, $year)
- - $first_week_days) / 7) + $weeks;
- }
-
-
- // }}}
- // {{{ getCalendarWeek()
-
- /**
- * Return an array with days in week
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return array $week[$weekday]
- * @access public
- * @static
- */
- public function getCalendarWeek(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- $week_array = array();
-
- // date for the column of week
-
- $curr_day = Date_Calc::beginOfWeek($day, $month, $year, '%E');
-
- for ($counter = 0; $counter <= 6; $counter++) {
- $week_array[$counter] = Date_Calc::daysToDate($curr_day, $format);
- $curr_day++;
- }
- return $week_array;
- }
-
-
- // }}}
- // {{{ getCalendarMonth()
-
- /**
- * Return a set of arrays to construct a calendar month for the given date
- *
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return array $month[$row][$col]
- * @access public
- * @static
- */
- public function getCalendarMonth(
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- $month_array = array();
-
- // date for the first row, first column of calendar month
- if (DATE_CALC_BEGIN_WEEKDAY == 1) {
- if (Date_Calc::firstOfMonthWeekday($month, $year) == 0) {
- $curr_day = Date_Calc::firstDayOfMonth($month, $year) - 6;
- } else {
- $curr_day = Date_Calc::firstDayOfMonth($month, $year)
- - Date_Calc::firstOfMonthWeekday($month, $year) + 1;
- }
- } else {
- $curr_day = (Date_Calc::firstDayOfMonth($month, $year)
- - Date_Calc::firstOfMonthWeekday($month, $year));
- }
-
- // number of days in this month
- $daysInMonth = Date_Calc::daysInMonth($month, $year);
-
- $weeksInMonth = Date_Calc::weeksInMonth($month, $year);
- for ($row_counter = 0; $row_counter < $weeksInMonth; $row_counter++) {
- for ($column_counter = 0; $column_counter <= 6; $column_counter++) {
- $month_array[$row_counter][$column_counter] =
- Date_Calc::daysToDate($curr_day, $format);
- $curr_day++;
- }
- }
-
- return $month_array;
- }
-
-
- // }}}
- // {{{ getCalendarYear()
-
- /**
- * Return a set of arrays to construct a calendar year for the given date
- *
- * @param int $year the year in four digit format, default current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return array $year[$month][$row][$col]
- * @access public
- * @static
- */
- public function getCalendarYear($year = null, $format = DATE_CALC_FORMAT)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
-
- $year_array = array();
-
- for ($curr_month = 0; $curr_month <= 11; $curr_month++) {
- $year_array[$curr_month] =
- Date_Calc::getCalendarMonth(
- $curr_month + 1,
- $year,
- $format
- );
- }
-
- return $year_array;
- }
-
-
- // }}}
- // {{{ prevDay()
-
- /**
- * Returns date of day before given date
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function prevDay(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- return Date_Calc::addDays(-1, $day, $month, $year, $format);
- }
-
-
- // }}}
- // {{{ nextDay()
-
- /**
- * Returns date of day after given date
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function nextDay(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- return Date_Calc::addDays(1, $day, $month, $year, $format);
- }
-
-
- // }}}
- // {{{ prevWeekday()
-
- /**
- * Returns date of the previous weekday, skipping from Monday to Friday
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function prevWeekday(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- $days = Date_Calc::dateToDays($day, $month, $year);
- if (Date_Calc::dayOfWeek($day, $month, $year) == 1) {
- $days -= 3;
- } elseif (Date_Calc::dayOfWeek($day, $month, $year) == 0) {
- $days -= 2;
- } else {
- $days -= 1;
- }
-
- return Date_Calc::daysToDate($days, $format);
- }
-
-
- // }}}
- // {{{ nextWeekday()
-
- /**
- * Returns date of the next weekday of given date, skipping from
- * Friday to Monday
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function nextWeekday(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- $days = Date_Calc::dateToDays($day, $month, $year);
- if (Date_Calc::dayOfWeek($day, $month, $year) == 5) {
- $days += 3;
- } elseif (Date_Calc::dayOfWeek($day, $month, $year) == 6) {
- $days += 2;
- } else {
- $days += 1;
- }
-
- return Date_Calc::daysToDate($days, $format);
- }
-
-
- // }}}
- // {{{ daysToPrevDayOfWeek()
-
- /**
- * Returns 'Julian Day' of the previous specific day of the week
- * from the given date.
- *
- * @param int $dow the day of the week (0 = Sunday)
- * @param int $days 'Julian Day', i.e. the no of days since 1st
- * January, 4713 B.C.
- * @param bool $onorbefore if true and days are same, returns current day
- *
- * @return int 'Julian Day', i.e. the no of days since 1st January,
- * 4713 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function daysToPrevDayOfWeek($dow, $days, $onorbefore = false)
- {
- $curr_weekday = Date_Calc::daysToDayOfWeek($days);
- if ($curr_weekday == $dow) {
- if ($onorbefore) {
- return $days;
- } else {
- return $days - 7;
- }
- } elseif ($curr_weekday < $dow) {
- return $days - 7 + $dow - $curr_weekday;
- } else {
- return $days - $curr_weekday + $dow;
- }
- }
-
-
- // }}}
- // {{{ prevDayOfWeek()
-
- /**
- * Returns date of the previous specific day of the week
- * from the given date
- *
- * @param int $dow the day of the week (0 = Sunday)
- * @param int $day the day of the month, default is current local
- * day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is
- * current local year
- * @param string $format the string indicating how to format the output
- * @param bool $onorbefore if true and days are same, returns current day
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function prevDayOfWeek(
- $dow,
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT,
- $onorbefore = false
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- $days = Date_Calc::dateToDays($day, $month, $year);
- $days = Date_Calc::daysToPrevDayOfWeek($dow, $days, $onorbefore);
- return Date_Calc::daysToDate($days, $format);
- }
-
-
- // }}}
- // {{{ daysToNextDayOfWeek()
-
- /**
- * Returns 'Julian Day' of the next specific day of the week
- * from the given date.
- *
- * @param int $dow the day of the week (0 = Sunday)
- * @param int $days 'Julian Day', i.e. the no of days since 1st
- * January, 4713 B.C.
- * @param bool $onorafter if true and days are same, returns current day
- *
- * @return int 'Julian Day', i.e. the no of days since 1st January,
- * 4713 B.C.
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function daysToNextDayOfWeek($dow, $days, $onorafter = false)
- {
- $curr_weekday = Date_Calc::daysToDayOfWeek($days);
- if ($curr_weekday == $dow) {
- if ($onorafter) {
- return $days;
- } else {
- return $days + 7;
- }
- } elseif ($curr_weekday > $dow) {
- return $days + 7 - $curr_weekday + $dow;
- } else {
- return $days + $dow - $curr_weekday;
- }
- }
-
-
- // }}}
- // {{{ nextDayOfWeek()
-
- /**
- * Returns date of the next specific day of the week
- * from the given date
- *
- * @param int $dow the day of the week (0 = Sunday)
- * @param int $day the day of the month, default is current local
- * day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is
- * current local year
- * @param string $format the string indicating how to format the output
- * @param bool $onorafter if true and days are same, returns current day
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function nextDayOfWeek(
- $dow,
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT,
- $onorafter = false
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- $days = Date_Calc::dateToDays($day, $month, $year);
- $days = Date_Calc::daysToNextDayOfWeek($dow, $days, $onorafter);
- return Date_Calc::daysToDate($days, $format);
- }
-
-
- // }}}
- // {{{ prevDayOfWeekOnOrBefore()
-
- /**
- * Returns date of the previous specific day of the week
- * on or before the given date
- *
- * @param int $dow the day of the week (0 = Sunday)
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function prevDayOfWeekOnOrBefore(
- $dow,
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- return Date_Calc::prevDayOfWeek(
- $dow,
- $day,
- $month,
- $year,
- $format,
- true
- );
- }
-
-
- // }}}
- // {{{ nextDayOfWeekOnOrAfter()
-
- /**
- * Returns date of the next specific day of the week
- * on or after the given date
- *
- * @param int $dow the day of the week (0 = Sunday)
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function nextDayOfWeekOnOrAfter(
- $dow,
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- return Date_Calc::nextDayOfWeek(
- $dow,
- $day,
- $month,
- $year,
- $format,
- true
- );
- }
-
-
- // }}}
- // {{{ beginOfWeek()
-
- /**
- * Find the month day of the beginning of week for given date,
- * using {@link DATE_CALC_BEGIN_WEEKDAY}
- *
- * Can return weekday of prev month.
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function beginOfWeek(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- $hn_days = Date_Calc::dateToDays($day, $month, $year);
- $this_weekday = Date_Calc::daysToDayOfWeek($hn_days);
- $interval = (7 - DATE_CALC_BEGIN_WEEKDAY + $this_weekday) % 7;
- return Date_Calc::daysToDate($hn_days - $interval, $format);
- }
-
-
- // }}}
- // {{{ endOfWeek()
-
- /**
- * Find the month day of the end of week for given date,
- * using {@link DATE_CALC_BEGIN_WEEKDAY}
- *
- * Can return weekday of following month.
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function endOfWeek(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- $hn_days = Date_Calc::dateToDays($day, $month, $year);
- $this_weekday = Date_Calc::daysToDayOfWeek($hn_days);
- $interval = (6 + DATE_CALC_BEGIN_WEEKDAY - $this_weekday) % 7;
- return Date_Calc::daysToDate($hn_days + $interval, $format);
- }
-
-
- // }}}
- // {{{ beginOfPrevWeek()
-
- /**
- * Find the month day of the beginning of week before given date,
- * using {@link DATE_CALC_BEGIN_WEEKDAY}
- *
- * Can return weekday of prev month.
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function beginOfPrevWeek(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- list($hn_pwyear, $hn_pwmonth, $hn_pwday) =
- explode(" ", Date_Calc::daysToDate(
- Date_Calc::dateToDays(
- $day,
- $month,
- $year
- ) - 7,
- '%Y %m %d'
- ));
- return Date_Calc::beginOfWeek(
- $hn_pwday,
- $hn_pwmonth,
- $hn_pwyear,
- $format
- );
- }
-
-
- // }}}
- // {{{ beginOfNextWeek()
-
- /**
- * Find the month day of the beginning of week after given date,
- * using {@link DATE_CALC_BEGIN_WEEKDAY}
- *
- * Can return weekday of prev month.
- *
- * @param int $day the day of the month, default is current local day
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function beginOfNextWeek(
- $day = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- if (empty($day)) {
- $day = Date_Calc::dateNow('%d');
- }
-
- list($hn_pwyear, $hn_pwmonth, $hn_pwday) =
- explode(
- " ",
- Date_Calc::daysToDate(
- Date_Calc::dateToDays(
- $day,
- $month,
- $year
- ) + 7,
- '%Y %m %d'
- )
- );
- return Date_Calc::beginOfWeek(
- $hn_pwday,
- $hn_pwmonth,
- $hn_pwyear,
- $format
- );
- }
-
-
- // }}}
- // {{{ beginOfMonth()
-
- /**
- * Return date of first day of month of given date
- *
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @see Date_Calc::beginOfMonthBySpan()
- * @deprecated Method deprecated in Release 1.4.4
- */
- public function beginOfMonth($month = 0, $year = null, $format = DATE_CALC_FORMAT)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- return Date_Calc::dateFormat(
- Date_Calc::getFirstDayOfMonth(
- $month,
- $year
- ),
- $month,
- $year,
- $format
- );
- }
-
-
- // }}}
- // {{{ endOfMonth()
-
- /**
- * Return date of last day of month of given date
- *
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @see Date_Calc::beginOfMonthBySpan()
- * @since Method available since Release 1.5.0
- * @deprecated Method deprecated in Release 1.5.0
- */
- public function endOfMonth($month = 0, $year = null, $format = DATE_CALC_FORMAT)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- return Date_Calc::daysToDate(
- Date_Calc::lastDayOfMonth($month, $year),
- $format
- );
- }
-
-
- // }}}
- // {{{ beginOfPrevMonth()
-
- /**
- * Returns date of the first day of previous month of given date
- *
- * @param mixed $dummy irrelevant parameter
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @see Date_Calc::beginOfMonthBySpan()
- * @deprecated Method deprecated in Release 1.4.4
- */
- public function beginOfPrevMonth(
- $dummy = null,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- list($hn_pmyear, $hn_prevmonth) = Date_Calc::prevMonth($month, $year);
- return Date_Calc::dateFormat(
- Date_Calc::getFirstDayOfMonth(
- $hn_prevmonth,
- $hn_pmyear
- ),
- $hn_prevmonth,
- $hn_pmyear,
- $format
- );
- }
-
-
- // }}}
- // {{{ endOfPrevMonth()
-
- /**
- * Returns date of the last day of previous month for given date
- *
- * @param mixed $dummy irrelevant parameter
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @see Date_Calc::endOfMonthBySpan()
- * @deprecated Method deprecated in Release 1.4.4
- */
- public function endOfPrevMonth(
- $dummy = null,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- return Date_Calc::daysToDate(
- Date_Calc::firstDayOfMonth(
- $month,
- $year
- ) - 1,
- $format
- );
- }
-
-
- // }}}
- // {{{ beginOfNextMonth()
-
- /**
- * Returns date of begin of next month of given date
- *
- * @param mixed $dummy irrelevant parameter
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @see Date_Calc::beginOfMonthBySpan()
- * @deprecated Method deprecated in Release 1.4.4
- */
- public function beginOfNextMonth(
- $dummy = null,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- list($hn_nmyear, $hn_nextmonth) = Date_Calc::nextMonth($month, $year);
- return Date_Calc::dateFormat(
- Date_Calc::getFirstDayOfMonth(
- $hn_nextmonth,
- $hn_nmyear
- ),
- $hn_nextmonth,
- $hn_nmyear,
- $format
- );
- }
-
-
- // }}}
- // {{{ endOfNextMonth()
-
- /**
- * Returns date of the last day of next month of given date
- *
- * @param mixed $dummy irrelevant parameter
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @see Date_Calc::endOfMonthBySpan()
- * @deprecated Method deprecated in Release 1.4.4
- */
- public function endOfNextMonth(
- $dummy = null,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- list($hn_nmyear, $hn_nextmonth) = Date_Calc::nextMonth($month, $year);
- return Date_Calc::daysToDate(
- Date_Calc::lastDayOfMonth(
- $hn_nextmonth,
- $hn_nmyear
- ),
- $format
- );
- }
-
-
- // }}}
- // {{{ beginOfMonthBySpan()
-
- /**
- * Returns date of the first day of the month in the number of months
- * from the given date
- *
- * @param int $months the number of months from the date provided.
- * Positive numbers go into the future.
- * Negative numbers go into the past.
- * Nought is the month presented in $month.
- * @param string $month the month, default is current local month
- * @param string $year the year in four digit format, default is the
- * current local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @since Method available since Release 1.4.4
- */
- public function beginOfMonthBySpan(
- $months = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- return Date_Calc::addMonths(
- $months,
- Date_Calc::getFirstDayOfMonth($month, $year),
- $month,
- $year,
- $format
- );
- }
-
-
- // }}}
- // {{{ endOfMonthBySpan()
-
- /**
- * Returns date of the last day of the month in the number of months
- * from the given date
- *
- * @param int $months the number of months from the date provided.
- * Positive numbers go into the future.
- * Negative numbers go into the past.
- * Nought is the month presented in $month.
- * @param string $month the month, default is current local month
- * @param string $year the year in four digit format, default is the
- * current local year
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- * @since Method available since Release 1.4.4
- */
- public function endOfMonthBySpan(
- $months = 0,
- $month = 0,
- $year = null,
- $format = DATE_CALC_FORMAT
- )
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
-
- $hn_days = Date_Calc::addMonthsToDays(
- $months + 1,
- Date_Calc::firstDayOfMonth($month, $year)
- ) - 1;
- return Date_Calc::daysToDate($hn_days, $format);
- }
-
-
- // }}}
- // {{{ firstOfMonthWeekday()
-
- /**
- * Find the day of the week for the first of the month of given date
- *
- * @param int $month the month, default is current local month
- * @param int $year the year in four digit format, default is current
- * local year
- *
- * @return int number of weekday for the first day, 0=Sunday
- * @access public
- * @static
- */
- public function firstOfMonthWeekday($month = 0, $year = null)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if (empty($month)) {
- $month = Date_Calc::dateNow('%m');
- }
- return Date_Calc::daysToDayOfWeek(Date_Calc::firstDayOfMonth(
- $month,
- $year
- ));
- }
-
-
- // }}}
- // {{{ nWeekdayOfMonth()
-
- /**
- * Calculates the date of the Nth weekday of the month,
- * such as the second Saturday of January 2000
- *
- * @param int $week the number of the week to get
- * (1 to 5. Also can be 'last'.)
- * @param int $dow the day of the week (0 = Sunday)
- * @param int $month the month
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- * @param string $format the string indicating how to format the output
- *
- * @return string the date in the desired format
- * @access public
- * @static
- */
- public function nWeekDayOfMonth(
- $week,
- $dow,
- $month,
- $year,
- $format = DATE_CALC_FORMAT
- )
- {
- if ((is_numeric($week) && ($week < 1 || $week > 5)) ||
- (!is_numeric($week) && $week != "last")
- ) {
- return PEAR::raiseError("Invalid week value '$week', only 1-5 or 'last' accepted");
- }
-
- if ($dow < 0 || $dow > 6) {
- return PEAR::raiseError("Invalid dow value '$dow', only 0-6 accepted");
- }
-
- if ($month < 1 || $month > 12) {
- return PEAR::raiseError("Invalid month value '$month'");
- }
-
- if (is_numeric($week)) {
- // the weekday of first day of month "1"
- $DOW1 = Date_Calc::dayOfWeek(1, $month, $year);
-
- // finds the sunday
- $sunday = ($week - 1) * 7 + 1;
- if ($DOW1 > 0) {
- $sunday += (7 - $DOW1);
- }
-
- // adjust the sunday with dow addition
- $wdate = $sunday + $dow;
- if ($wdate > Date_Calc::daysInMonth($month, $year)) {
- return -1;
- } else {
- return Date_Calc::dateFormat($wdate, $month, $year, $format);
- }
- } elseif ($week == 'last' && $dow < 7) {
- $lastday = Date_Calc::daysInMonth($month, $year);
- $lastdow = Date_Calc::dayOfWeek($lastday, $month, $year);
- $diff = $dow - $lastdow;
- if ($diff > 0) {
- return Date_Calc::dateFormat(
- $lastday - (7 - $diff),
- $month,
- $year,
- $format
- );
- } else {
- return Date_Calc::dateFormat(
- $lastday + $diff,
- $month,
- $year,
- $format
- );
- }
- } else {
- return -1;
- }
- }
-
-
- // }}}
- // {{{ isValidDate()
-
- /**
- * Returns true for valid date, false for invalid date
- *
- * Uses the proleptic Gregorian calendar, with the year 0 (1 B.C.)
- * assumed to be valid and also assumed to be a leap year.
- *
- * @param int $day the day of the month
- * @param int $month the month
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return bool
- * @access public
- * @static
- */
- public function isValidDate($day, $month, $year)
- {
- if ($day < 1 || $month < 1 || $month > 12) {
- return false;
- }
- if ($month == 2) {
- if (Date_Calc::isLeapYearGregorian($year)) {
- return $day <= 29;
- } else {
- return $day <= 28;
- }
- } elseif ($month == 4 || $month == 6 || $month == 9 || $month == 11) {
- return $day <= 30;
- } else {
- return $day <= 31;
- }
- }
-
-
- // }}}
- // {{{ isLeapYearGregorian()
-
- /**
- * Returns true for a leap year, else false
- *
- * Uses the proleptic Gregorian calendar. The year 0 (1 B.C.) is
- * assumed in this algorithm to be a leap year. The function is
- * valid for all years, positive and negative.
- *
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return bool
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function isLeapYearGregorian($year = null)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- return (($year % 4 == 0) &&
- ($year % 100 != 0)) ||
- ($year % 400 == 0);
- }
-
-
- // }}}
- // {{{ isLeapYearJulian()
-
- /**
- * Returns true for a leap year, else false
- *
- * Uses the proleptic Julian calendar. The year 0 (1 B.C.) is
- * assumed in this algorithm to be a leap year. The function is
- * valid for all years, positive and negative.
- *
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return boolean
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function isLeapYearJulian($year = null)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- return $year % 4 == 0;
- }
-
-
- // }}}
- // {{{ isLeapYear()
-
- /**
- * Returns true for a leap year, else false
- *
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return boolean
- * @access public
- * @static
- */
- public function isLeapYear($year = null)
- {
- if (is_null($year)) {
- $year = Date_Calc::dateNow('%Y');
- }
- if ($year < 1582) {
- // pre Gregorio XIII - 1582
- return Date_Calc::isLeapYearJulian($year);
- } else {
- // post Gregorio XIII - 1582
- return Date_Calc::isLeapYearGregorian($year);
- }
- }
-
-
- // }}}
- // {{{ isFutureDate()
-
- /**
- * Determines if given date is a future date from now
- *
- * @param int $day the day of the month
- * @param int $month the month
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return bool
- * @access public
- * @static
- */
- public function isFutureDate($day, $month, $year)
- {
- $this_year = Date_Calc::dateNow('%Y');
- $this_month = Date_Calc::dateNow('%m');
- $this_day = Date_Calc::dateNow('%d');
-
- if ($year > $this_year) {
- return true;
- } elseif ($year == $this_year) {
- if ($month > $this_month) {
- return true;
- } elseif ($month == $this_month) {
- if ($day > $this_day) {
- return true;
- }
- }
- }
- return false;
- }
-
-
- // }}}
- // {{{ isPastDate()
-
- /**
- * Determines if given date is a past date from now
- *
- * @param int $day the day of the month
- * @param int $month the month
- * @param int $year the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return boolean
- * @access public
- * @static
- */
- public function isPastDate($day, $month, $year)
- {
- $this_year = Date_Calc::dateNow('%Y');
- $this_month = Date_Calc::dateNow('%m');
- $this_day = Date_Calc::dateNow('%d');
-
- if ($year < $this_year) {
- return true;
- } elseif ($year == $this_year) {
- if ($month < $this_month) {
- return true;
- } elseif ($month == $this_month) {
- if ($day < $this_day) {
- return true;
- }
- }
- }
- return false;
- }
-
-
- // }}}
- // {{{ dateDiff()
-
- /**
- * Returns number of days between two given dates
- *
- * @param int $day1 the day of the month
- * @param int $month1 the month
- * @param int $year1 the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- * @param int $day2 the day of the month
- * @param int $month2 the month
- * @param int $year2 the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return int the absolute number of days between the two dates.
- * If an error occurs, -1 is returned.
- * @access public
- * @static
- */
- public function dateDiff($day1, $month1, $year1, $day2, $month2, $year2)
- {
- if (!Date_Calc::isValidDate($day1, $month1, $year1)) {
- return -1;
- }
- if (!Date_Calc::isValidDate($day2, $month2, $year2)) {
- return -1;
- }
- return abs(Date_Calc::dateToDays($day1, $month1, $year1)
- - Date_Calc::dateToDays($day2, $month2, $year2));
- }
-
-
- // }}}
- // {{{ compareDates()
-
- /**
- * Compares two dates
- *
- * @param int $day1 the day of the month
- * @param int $month1 the month
- * @param int $year1 the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- * @param int $day2 the day of the month
- * @param int $month2 the month
- * @param int $year2 the year. Use the complete year instead of the
- * abbreviated version. E.g. use 2005, not 05.
- *
- * @return int 0 if the dates are equal. 1 if date 1 is later, -1
- * if date 1 is earlier.
- * @access public
- * @static
- */
- public static function compareDates($day1, $month1, $year1, $day2, $month2, $year2)
- {
- $ndays1 = Date_Calc::dateToDays($day1, $month1, $year1);
- $ndays2 = Date_Calc::dateToDays($day2, $month2, $year2);
- if ($ndays1 == $ndays2) {
- return 0;
- }
- return ($ndays1 > $ndays2) ? 1 : -1;
- }
-
-
- // }}}
- // {{{ round()
-
- /**
- * Rounds the date according to the specified precision
- *
- * The precision parameter must be one of the following constants:
- *
- * - {@link DATE_PRECISION_YEAR}
- * - {@link DATE_PRECISION_MONTH}
- * - {@link DATE_PRECISION_DAY}
- * - {@link DATE_PRECISION_HOUR}
- * - {@link DATE_PRECISION_10MINUTES}
- * - {@link DATE_PRECISION_MINUTE}
- * - {@link DATE_PRECISION_10SECONDS}
- * - {@link DATE_PRECISION_SECOND}
- *
- * The precision can also be specified as an integral offset from
- * one of these constants, where the offset reflects a precision
- * of 10 to the power of the offset greater than the constant.
- * For example:
- *
- * - <b>(DATE_PRECISION_YEAR - 1)</b> rounds the date to the nearest 10
- * years
- * - <b>(DATE_PRECISION_YEAR - 3)</b> rounds the date to the nearest 1000
- * years
- * - <b>(DATE_PRECISION_SECOND + 1)</b> rounds the date to 1 decimal
- * point of a second
- * - <b>(DATE_PRECISION_SECOND + 1)</b> rounds the date to 3 decimal
- * points of a second
- * - <b>(DATE_PRECISION_SECOND + 1)</b> rounds the date to the nearest 10
- * seconds (thus it is equivalent to
- * <b>DATE_PRECISION_10SECONDS</b>)
- *
- * N.B. This function requires a time in UTC if both the precision is at
- * least DATE_PRECISION_SECOND and leap seconds are being counted, otherwise
- * any local time is acceptable.
- *
- * @param int $pn_precision a 'DATE_PRECISION_*' constant (defaults to
- * {@link DATE_PRECISION_DAY})
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- * @param mixed $pn_second the second as integer or float
- * @param bool $pb_countleap whether to count leap seconds (defaults to
- * {@link DATE_COUNT_LEAP_SECONDS})
- *
- * @return array array of year, month, day, hour, minute, second
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function round(
- $pn_precision,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour = 0,
- $pn_minute = 0,
- $pn_second = 0,
- $pb_countleap = DATE_COUNT_LEAP_SECONDS
- )
- {
- if ($pn_precision <= DATE_PRECISION_YEAR) {
- $hn_month = 0;
- $hn_day = 0;
- $hn_hour = 0;
- $hn_minute = 0;
- $hn_second = 0;
-
- if ($pn_precision < DATE_PRECISION_YEAR) {
- $hn_year = round($pn_year, $pn_precision - DATE_PRECISION_YEAR);
- } else {
- // Check part-year:
- //
- $hn_midyear = (Date_Calc::firstDayOfYear($pn_year + 1) -
- Date_Calc::firstDayOfYear($pn_year)) / 2;
- if (($hn_days = Date_Calc::dayOfYear(
- $pn_day,
- $pn_month,
- $pn_year
- )) <=
- $hn_midyear - 1) {
- $hn_year = $pn_year;
- } elseif ($hn_days >= $hn_midyear) {
- // Round up:
- //
- $hn_year = $pn_year + 1;
- } else {
- // Take time into account:
- //
- $hn_partday = Date_Calc::secondsPastMidnight(
- $pn_hour,
- $pn_minute,
- $pn_second
- ) /
- 86400;
- if ($hn_partday >= $hn_midyear - $hn_days) {
- // Round up:
- //
- $hn_year = $pn_year + 1;
- } else {
- $hn_year = $pn_year;
- }
- }
- }
- } elseif ($pn_precision == DATE_PRECISION_MONTH) {
- $hn_year = $pn_year;
- $hn_day = 0;
- $hn_hour = 0;
- $hn_minute = 0;
- $hn_second = 0;
-
- $hn_firstofmonth = Date_Calc::firstDayOfMonth($pn_month, $pn_year);
- $hn_midmonth = (Date_Calc::lastDayOfMonth($pn_month, $pn_year) +
- 1 -
- $hn_firstofmonth) / 2;
- if (($hn_days = Date_Calc::dateToDays(
- $pn_day,
- $pn_month,
- $pn_year
- ) -
- $hn_firstofmonth) <= $hn_midmonth - 1) {
- $hn_month = $pn_month;
- } elseif ($hn_days >= $hn_midmonth) {
- // Round up:
- //
- list($hn_year, $hn_month) = Date_Calc::nextMonth(
- $pn_month,
- $pn_year
- );
- } else {
- // Take time into account:
- //
- $hn_partday = Date_Calc::secondsPastMidnight(
- $pn_hour,
- $pn_minute,
- $pn_second
- ) /
- 86400;
- if ($hn_partday >= $hn_midmonth - $hn_days) {
- // Round up:
- //
- list($hn_year, $hn_month) = Date_Calc::nextMonth(
- $pn_month,
- $pn_year
- );
- } else {
- $hn_month = $pn_month;
- }
- }
- } elseif ($pn_precision == DATE_PRECISION_DAY) {
- $hn_year = $pn_year;
- $hn_month = $pn_month;
- $hn_hour = 0;
- $hn_minute = 0;
- $hn_second = 0;
-
- if (Date_Calc::secondsPastMidnight(
- $pn_hour,
- $pn_minute,
- $pn_second
- ) >= 43200) {
- // Round up:
- //
- list($hn_year, $hn_month, $hn_day) =
- explode(" ", Date_Calc::nextDay(
- $pn_day,
- $pn_month,
- $pn_year,
- "%Y %m %d"
- ));
- } else {
- $hn_day = $pn_day;
- }
- } elseif ($pn_precision == DATE_PRECISION_HOUR) {
- $hn_year = $pn_year;
- $hn_month = $pn_month;
- $hn_day = $pn_day;
- $hn_minute = 0;
- $hn_second = 0;
-
- if (Date_Calc::secondsPastTheHour($pn_minute, $pn_second) >= 1800) {
- // Round up:
- //
- list($hn_year, $hn_month, $hn_day, $hn_hour) =
- Date_Calc::addHours(
- 1,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour
- );
- } else {
- $hn_hour = $pn_hour;
- }
- } elseif ($pn_precision <= DATE_PRECISION_MINUTE) {
- $hn_year = $pn_year;
- $hn_month = $pn_month;
- $hn_day = $pn_day;
- $hn_hour = $pn_hour;
- $hn_second = 0;
-
- if ($pn_precision < DATE_PRECISION_MINUTE) {
- $hn_minute = round(
- $pn_minute,
- $pn_precision - DATE_PRECISION_MINUTE
- );
- } else {
- // Check seconds:
- //
- if ($pn_second >= 30) {
- // Round up:
- //
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute) =
- Date_Calc::addMinutes(
- 1,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute
- );
- } else {
- $hn_minute = $pn_minute;
- }
- }
- } else {
- // Precision is at least (DATE_PRECISION_SECOND - 1):
- //
- $hn_year = $pn_year;
- $hn_month = $pn_month;
- $hn_day = $pn_day;
- $hn_hour = $pn_hour;
- $hn_minute = $pn_minute;
-
- $hn_second = round(
- $pn_second,
- $pn_precision - DATE_PRECISION_SECOND
- );
-
- if (fmod($hn_second, 1) == 0.0) {
- $hn_second = (int)$hn_second;
-
- if ($hn_second != intval($pn_second)) {
- list($hn_year,
- $hn_month,
- $hn_day,
- $hn_hour,
- $hn_minute,
- $hn_second) =
- Date_Calc::addSeconds(
- $hn_second - intval($pn_second),
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- intval($pn_second),
- $pn_precision >=
- DATE_PRECISION_SECOND &&
- $pb_countleap
- );
- //
- // (N.B. if rounded to nearest 10 seconds,
- // user does not expect seconds to be '60')
- }
- }
- }
-
- return array((int)$hn_year,
- (int)$hn_month,
- (int)$hn_day,
- (int)$hn_hour,
- (int)$hn_minute,
- $hn_second);
- }
-
-
- // }}}
- // {{{ roundSeconds()
-
- /**
- * Rounds seconds up or down to the nearest specified unit
- *
- * @param int $pn_precision number of digits after the decimal point
- * @param int $pn_day the day of the month
- * @param int $pn_month the month
- * @param int $pn_year the year
- * @param int $pn_hour the hour
- * @param int $pn_minute the minute
- * @param mixed $pn_second the second as integer or float
- * @param bool $pb_countleap whether to count leap seconds (defaults to
- * DATE_COUNT_LEAP_SECONDS)
- *
- * @return array array of year, month, day, hour, minute, second
- * @access public
- * @static
- * @since Method available since Release 1.5.0
- */
- public function roundSeconds(
- $pn_precision,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second,
- $pb_countleap = DATE_COUNT_LEAP_SECONDS
- )
- {
- return Date_Calc::round(
- DATE_PRECISION_SECOND + $pn_precision,
- $pn_day,
- $pn_month,
- $pn_year,
- $pn_hour,
- $pn_minute,
- $pn_second
- );
- }
-
-
- // }}}
- // {{{ isoWeekToDate()
-
- /**
- * Converts the Week number and Day-of-Week to Date
- *
- * Calculation algorithm taken from
- * {@link http://www.merlyn.demon.co.uk/weekcalc.htm}.
- *
- * @param int $dow day of week from 1 (Monday) to 7 (Sunday)
- * @param int $week number of week from 1 to 53
- * @param int $year four digits of year
- * @param string $format the output format
- *
- * @return string formatted date
- * @access public
- * @static
- * @since Method available since Release 1.5.0a2
- */
- public function isoWeekToDate($dow, $week, $year, $format = DATE_CALC_FORMAT)
- {
- // validates the week number
- list(, $nweeks) = Date_Calc::isoWeekDate(28, 12, $year);
- if ($week > $nweeks) {
- return PEAR::raiseError(
- "ISO week number for $year cannot be greater than $nweeks",
- DATE_ERROR_INVALIDDATE
- );
- }
-
- // validates the day of week
- if ($dow < 1 || $dow > 7) {
- return PEAR::raiseError(
- "ISO day of week must be between 1 and 7",
- DATE_ERROR_INVALIDDATE
- );
- }
-
- // finds the day of week of January 4th.
- $jan4th = Date_Calc::dayOfWeek(4, 1, $year);
- if ($jan4th == 0) {
- $jan4th = 7;
- }
-
- // offset to the monday of that week
- $offset = -($jan4th - 1);
-
- // increment the days starting from january 4th.
- $days = Date_Calc::dateToDays(1, 1, $year) + $offset + 7 * ($week - 1) + ($dow - 1) + 3;
-
- return Date_Calc::daysToDate($days, $format);
- }
-
- // }}}
-}
-
-// }}}
-
-/*
- * Local variables:
- * mode: php
- * tab-width: 4
- * c-basic-offset: 4
- * c-hanging-comment-ender-p: nil
- * End:
- */
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
-
-// {{{ Header
-
-/**
- * Class to convert date strings between Gregorian and Human calendar formats
- *
- * The Human Calendar format has been proposed by Scott Flansburg and can be
- * explained as follows:
- * The year is made up of 13 months
- * Each month has 28 days
- * Counting of months starts from 0 (zero) so the months will run from 0 to 12
- * New Years day (00) is a monthless day
- * Note: Leap Years are not yet accounted for in the Human Calendar system
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 1997-2006 Allan Kent
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted under the terms of the BSD License.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @category Date and Time
- * @package Date
- * @author Allan Kent <allan@lodestone.co.za>
- * @copyright 1997-2006 Allan Kent
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Date
- * @since File available since Release 1.3
- */
-
-// }}}
-// {{{ Class: Date_Human
-
-/**
- * Class to convert date strings between Gregorian and Human calendar formats
- *
- * The Human Calendar format has been proposed by Scott Flansburg and can be
- * explained as follows:
- * The year is made up of 13 months
- * Each month has 28 days
- * Counting of months starts from 0 (zero) so the months will run from 0 to 12
- * New Years day (00) is a monthless day
- * Note: Leap Years are not yet accounted for in the Human Calendar system
- *
- * @category Date and Time
- * @package Date
- * @author Allan Kent <allan@lodestone.co.za>
- * @copyright 1997-2005 Allan Kent
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version Release: 1.5.0a4
- * @link http://pear.php.net/package/Date
- * @since Class available since Release 1.3
- */
-class Date_Human
-{
- // {{{ gregorianToHuman()
-
- /**
- * Returns an associative array containing the converted date information
- * in 'Human Calendar' format.
- *
- * If the day is New Years Day, the function will return
- * "hdom" => 0
- * "hdow" => 0
- * "hwom" => 0
- * "hwoy" => 0
- * "hmoy" => -1
- * Since 0 is a valid month number under the Human Calendar, I have left
- * the month as -1 for New Years Day.
- *
- * @param int $day in DD format, default current local day
- * @param int $month in MM format, default current local month
- * @param int $year in CCYY format, default to current local year
- *
- * @return associative array(
- * hdom, // Human Day Of Month, starting at 1
- * hdow, // Human Day Of Week, starting at 1
- * hwom, // Human Week of Month, starting at 1
- * hwoy, // Human Week of Year, starting at 1
- * hmoy, // Human Month of Year, starting at 0
- * )
- * @access public
- * @static
- */
- public function gregorianToHuman($day = 0, $month = 0, $year = 0)
- {
- /*
- * Check to see if any of the arguments are empty
- * If they are then populate the $dateinfo array
- * Then check to see which arguments are empty and fill
- * those with the current date info
- */
- if ((empty($day) || (empty($month)) || empty($year))) {
- $dateinfo = getdate(time());
- }
- if (empty($day)) {
- $day = $dateinfo["mday"];
- }
- if (empty($month)) {
- $month = $dateinfo["mon"];
- }
- if (empty($year)) {
- $year = $dateinfo["year"];
- }
- /*
- * We need to know how many days into the year we are
- */
- $dateinfo = getdate(mktime(0, 0, 0, $month, $day, $year));
- $dayofyear = $dateinfo["yday"];
- /*
- * Human Calendar starts at 0 for months and the first day of the year
- * is designated 00, so we need to start our day of the year at 0 for
- * these calculations.
- * Also, the day of the month is calculated with a modulus of 28.
- * Because a day is 28 days, the last day of the month would have a
- * remainder of 0 and not 28 as it should be. Decrementing $dayofyear
- * gets around this.
- */
- $dayofyear--;
- /*
- * 28 days in a month...
- */
- $humanMonthOfYear = floor($dayofyear / 28);
- /*
- * If we are in the first month then the day of the month is $dayofyear
- * else we need to find the modulus of 28.
- */
- if ($humanMonthOfYear == 0) {
- $humanDayOfMonth = $dayofyear;
- } else {
- $humanDayOfMonth = ($dayofyear) % 28;
- }
- /*
- * Day of the week is modulus 7
- */
- $humanDayOfWeek = $dayofyear % 7;
- /*
- * We can now increment $dayofyear back to it's correct value for
- * the remainder of the calculations
- */
- $dayofyear++;
- /*
- * $humanDayOfMonth needs to be incremented now - recall that we fudged
- * it a bit by decrementing $dayofyear earlier
- * Same goes for $humanDayOfWeek
- */
- $humanDayOfMonth++;
- $humanDayOfWeek++;
- /*
- * Week of the month is day of the month divided by 7, rounded up
- * Same for week of the year, but use $dayofyear instead $humanDayOfMonth
- */
- $humanWeekOfMonth = ceil($humanDayOfMonth / 7);
- $humanWeekOfYear = ceil($dayofyear / 7);
- /*
- * Return an associative array of the values
- */
- return array("hdom" => $humanDayOfMonth,
- "hdow" => $humanDayOfWeek,
- "hwom" => $humanWeekOfMonth,
- "hwoy" => $humanWeekOfYear,
- "hmoy" => $humanMonthOfYear);
- }
-
- // }}}
- // {{{ humanToGregorian()
-
- /**
- * Returns unix timestamp for a given Human Calendar date
- *
- * @param int $day in DD format
- * @param int $month in MM format
- * @param int $year in CCYY format, default to current local year
- *
- * @return int unix timestamp of date
- * @access public
- * @static
- */
- public function humanToGregorian($day, $month, $year = 0)
- {
- /*
- * Check to see if the year has been passed through.
- * If not get current year
- */
- if (empty($year)) {
- $dateinfo = getdate(time());
- $year = $dateinfo["year"];
- }
- /*
- * We need to get the day of the year that we are currently at so that
- * we can work out the Gregorian Month and day
- */
- $DayOfYear = $month * 28;
- $DayOfYear += $day;
- /*
- * Human Calendar starts at 0, so we need to increment $DayOfYear
- * to take into account the day 00
- */
- $DayOfYear++;
- /*
- * the mktime() function will correctly calculate the date for out of
- * range values, so putting $DayOfYear instead of the day of the month
- * will work fine.
- */
- $GregorianTimeStamp = mktime(0, 0, 0, 1, $DayOfYear, $year);
- return $GregorianTimeStamp;
- }
-
- // }}}
-}
-
-// }}}
-
-/*
- * Local variables:
- * mode: php
- * tab-width: 4
- * c-basic-offset: 4
- * c-hanging-comment-ender-p: nil
- * End:
- */
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
-
-// {{{ Header
-
-/**
- * Generic time span handling class for PEAR
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 1997-2005 Leandro Lucarella, Pierre-Alain Joye
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted under the terms of the BSD License.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @category Date and Time
- * @package Date
- * @author Leandro Lucarella <llucax@php.net>
- * @author Pierre-Alain Joye <pajoye@php.net>
- * @copyright 1997-2006 Leandro Lucarella, Pierre-Alain Joye
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Date
- * @since File available since Release 1.4
- */
-
-// }}}
-// {{{ Includes
-
-/**
- * Get the Date class
- */
-require_once 'Date.php';
-
-/**
- * Get the Date_Calc class
- */
-require_once 'Date/Calc.php';
-
-// }}}
-// {{{ Constants
-
-/**
- * Non Numeric Separated Values (NNSV) Input Format
- *
- * Input format guessed from something like this:
- *
- * <b>days</b><sep><b>hours</b><sep><b>minutes</b><sep><b>seconds</b>
- *
- * Where '<sep>' is any quantity of non numeric chars. If no values are
- * given, time span is set to zero, if one value is given, it is used for
- * hours, if two values are given it's used for hours and minutes and if
- * three values are given, it is used for hours, minutes and seconds.
- *
- * Examples:
- *
- * - <b>""</b> -> 0, 0, 0, 0 (days, hours, minutes, seconds)
- * - <b>"12"</b> -> 0, 12, 0, 0
- * - <b>"12.30"</b> -> 0, 12, 30, 0
- * - <b>"12:30:18"</b> -> 0, 12, 30, 18
- * - <b>"3-12-30-18"</b> -> 3, 12, 30, 18
- * - <b>"3 days, 12-30-18"</b> -> 3, 12, 30, 18
- * - <b>"12:30 with 18 secs"</b> -> 0, 12, 30, 18
- *
- * @see Date_Span::setFromString()
- */
-define('DATE_SPAN_INPUT_FORMAT_NNSV', 1);
-
-// }}}
-// {{{ Global Variables
-
-/**
- * Default time format when converting to a string
- *
- * @global string
- */
-$GLOBALS['_DATE_SPAN_FORMAT'] = '%C';
-
-/**
- * Default time format when converting from a string
- *
- * @global mixed
- */
-$GLOBALS['_DATE_SPAN_INPUT_FORMAT'] = DATE_SPAN_INPUT_FORMAT_NNSV;
-
-// }}}
-// {{{ Class: Date_Span
-
-/**
- * Generic time span handling class for PEAR
- *
- * @category Date and Time
- * @package Date
- * @author Leandro Lucarella <llucax@php.net>
- * @author Pierre-Alain Joye <pajoye@php.net>
- * @copyright 1997-2006 Leandro Lucarella, Pierre-Alain Joye
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version Release: 1.5.0a1
- * @link http://pear.php.net/package/Date
- * @since Class available since Release 1.4
- */
-class Date_Span
-{
-
- // {{{ Properties
-
- /**
- * The no of days
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $day;
-
- /**
- * The no of hours (0 to 23)
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $hour;
-
- /**
- * The no of minutes (0 to 59)
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $minute;
-
- /**
- * The no of seconds (0 to 59)
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $second;
-
-
- // }}}
- // {{{ Constructor
-
- /**
- * Constructor
- *
- * Creates the time span object calling {@link Date_Span::set()}
- *
- * @param mixed $time time span expression
- * @param mixed $format format string to set it from a string or the
- * second date set it from a date diff
- *
- * @access public
- * @see set()
- */
- public function Date_Span($time = 0, $format = null)
- {
- $this->set($time, $format);
- }
-
-
- // }}}
- // {{{ set()
-
- /**
- * Set the time span to a new value in a 'smart' way
- *
- * Sets the time span depending on the argument types, calling
- * to the appropriate setFromXxx() method.
- *
- * @param mixed $time time span expression
- * @param mixed $format format string to set it from a string or the
- * second date set it from a date diff
- *
- * @return bool true on success
- * @access public
- * @see Date_Span::copy(), Date_Span::setFromArray(),
- * Date_Span::setFromString(), Date_Span::setFromSeconds(),
- * Date_Span::setFromDateDiff()
- */
- public function set($time = 0, $format = null)
- {
- if (is_a($time, 'Date_Span')) {
- return $this->copy($time);
- } elseif (is_a($time, 'Date') and is_a($format, 'Date')) {
- return $this->setFromDateDiff($time, $format);
- } elseif (is_array($time)) {
- return $this->setFromArray($time);
- } elseif (is_string($time) || is_string($format)) {
- return $this->setFromString((string)$time, $format);
- } elseif (is_int($time)) {
- return $this->setFromSeconds($time);
- } else {
- return $this->setFromSeconds(0);
- }
- }
-
-
- // }}}
- // {{{ setFromArray()
-
- /**
- * Set the time span from an array
- *
- * Any value can be a float (but it has no sense in seconds), for example:
- *
- * <code>$object->setFromArray(array(23.5, 20, 0));</code>
- *
- * is interpreted as 23 hours, 0.5 * 60 + 20 = 50 minutes and 0 seconds.
- *
- * @param array $time items are counted from right to left. First
- * item is for seconds, second for minutes, third
- * for hours and fourth for days. If there are
- * less items than 4, zero (0) is assumed for the
- * absent values.
- *
- * @return bool true on success
- * @access public
- * @see Date_Span::set()
- */
- public function setFromArray($time)
- {
- if (!is_array($time)) {
- return false;
- }
- $tmp1 = new Date_Span;
- if (!$tmp1->setFromSeconds(@array_pop($time))) {
- return false;
- }
- $tmp2 = new Date_Span;
- if (!$tmp2->setFromMinutes(@array_pop($time))) {
- return false;
- }
- $tmp1->add($tmp2);
- if (!$tmp2->setFromHours(@array_pop($time))) {
- return false;
- }
- $tmp1->add($tmp2);
- if (!$tmp2->setFromDays(@array_pop($time))) {
- return false;
- }
- $tmp1->add($tmp2);
- return $this->copy($tmp1);
- }
-
-
- // }}}
- // {{{ setFromString()
-
- /**
- * Sets the time span from a string, based on an input format
- *
- * This is some like a mix of the PHP functions
- * {@link http://www.php.net/strftime strftime()} and
- * {@link http://www.php.net/sscanf sscanf()}.
- * The error checking and validation of this function is very primitive,
- * so you should be careful when using it with unknown strings.
- * With this method you are assigning day, hour, minute and second
- * values, and the last values are used. This means that if you use
- * something like:
- *
- * <code>$object->setFromString('10, 20', '%H, %h');</code>
- *
- * your time span would be 20 hours long. Always remember that this
- * method sets all the values, so if you had a span object 30
- * minutes long and you call:
- *
- * <code>$object->setFromString('20 hours', '%H hours');</code>
- *
- * the span object would be 20 hours long (and not 20 hours and 30
- * minutes).
- *
- * Input format options:
- *
- * - <b>%C</b> - Days with time, equivalent to '<b>D, %H:%M:%S</b>'
- * - <b>%d</b> - Total days as a float number
- * (2 days, 12 hours = 2.5 days)
- * - <b>%D</b> - Days as a decimal number
- * - <b>%e</b> - Total hours as a float number
- * (1 day, 2 hours, 30 minutes = 26.5 hours)
- * - <b>%f</b> - Total minutes as a float number
- * (2 minutes, 30 seconds = 2.5 minutes)
- * - <b>%g</b> - Total seconds as a decimal number
- * (2 minutes, 30 seconds = 90 seconds)
- * - <b>%h</b> - Hours as decimal number
- * - <b>%H</b> - Hours as decimal number limited to 2 digits
- * - <b>%m</b> - Minutes as a decimal number
- * - <b>%M</b> - Minutes as a decimal number limited to 2 digits
- * - <b>%n</b> - Newline character (\n)
- * - <b>%p</b> - Either 'am' or 'pm' depending on the time. If 'pm'
- * is detected it adds 12 hours to the resulting time
- * span (without any checks). This is case
- * insensitive.
- * - <b>%r</b> - Time in am/pm notation, equivalent to '<b>H:%M:%S %p</b>'
- * - <b>%R</b> - Time in 24-hour notation, equivalent to '<b>H:%M</b>'
- * - <b>%s</b> - Seconds as a decimal number
- * - <b>%S</b> - Seconds as a decimal number limited to 2 digits
- * - <b>%t</b> - Tab character (\t)
- * - <b>%T</b> - Current time equivalent, equivalent to '<b>H:%M:%S</b>'
- * - <b>%%</b> - Literal '%'
- *
- * @param string $time string from where to get the time span
- * information
- * @param string $format format string
- *
- * @return bool true on success
- * @access public
- * @see Date_Span::set(), DATE_SPAN_INPUT_FORMAT_NNSV
- */
- public function setFromString($time, $format = null)
- {
- if (is_null($format)) {
- $format = $GLOBALS['_DATE_SPAN_INPUT_FORMAT'];
- }
- // If format is a string, it parses the string format.
- if (is_string($format)) {
- $str = '';
- $vars = array();
- $pm = 'am';
- $day = $hour = $minute = $second = 0;
- for ($i = 0; $i < strlen($format); $i++) {
- $char = $format{$i};
- if ($char == '%') {
- $nextchar = $format{++$i};
- switch ($nextchar) {
- case 'c':
- $str .= '%d, %d:%d:%d';
- array_push(
- $vars,
- 'day',
- 'hour',
- 'minute',
- 'second'
- );
- break;
- case 'C':
- $str .= '%d, %2d:%2d:%2d';
- array_push(
- $vars,
- 'day',
- 'hour',
- 'minute',
- 'second'
- );
- break;
- case 'd':
- $str .= '%f';
- array_push($vars, 'day');
- break;
- case 'D':
- $str .= '%d';
- array_push($vars, 'day');
- break;
- case 'e':
- $str .= '%f';
- array_push($vars, 'hour');
- break;
- case 'f':
- $str .= '%f';
- array_push($vars, 'minute');
- break;
- case 'g':
- $str .= '%f';
- array_push($vars, 'second');
- break;
- case 'h':
- $str .= '%d';
- array_push($vars, 'hour');
- break;
- case 'H':
- $str .= '%2d';
- array_push($vars, 'hour');
- break;
- case 'm':
- $str .= '%d';
- array_push($vars, 'minute');
- break;
- case 'M':
- $str .= '%2d';
- array_push($vars, 'minute');
- break;
- case 'n':
- $str .= "\n";
- break;
- case 'p':
- $str .= '%2s';
- array_push($vars, 'pm');
- break;
- case 'r':
- $str .= '%2d:%2d:%2d %2s';
- array_push(
- $vars,
- 'hour',
- 'minute',
- 'second',
- 'pm'
- );
- break;
- case 'R':
- $str .= '%2d:%2d';
- array_push($vars, 'hour', 'minute');
- break;
- case 's':
- $str .= '%d';
- array_push($vars, 'second');
- break;
- case 'S':
- $str .= '%2d';
- array_push($vars, 'second');
- break;
- case 't':
- $str .= "\t";
- break;
- case 'T':
- $str .= '%2d:%2d:%2d';
- array_push($vars, 'hour', 'minute', 'second');
- break;
- case '%':
- $str .= "%";
- break;
- default:
- $str .= $char . $nextchar;
- }
- } else {
- $str .= $char;
- }
- }
- $vals = sscanf($time, $str);
- foreach ($vals as $i => $val) {
- if (is_null($val)) {
- return false;
- }
- $$vars[$i] = $val;
- }
- if (strcasecmp($pm, 'pm') == 0) {
- $hour += 12;
- } elseif (strcasecmp($pm, 'am') != 0) {
- return false;
- }
- $this->setFromArray(array($day, $hour, $minute, $second));
- } elseif (is_integer($format)) {
- // If format is a integer, it uses a predefined format
- // detection method.
- switch ($format) {
- case DATE_SPAN_INPUT_FORMAT_NNSV:
- $time = preg_split('/\D+/', $time);
- switch (count($time)) {
- case 0:
- return $this->setFromArray(array(0,
- 0,
- 0,
- 0));
- case 1:
- return $this->setFromArray(array(0,
- $time[0],
- 0,
- 0));
- case 2:
- return $this->setFromArray(array(0,
- $time[0],
- $time[1],
- 0));
- case 3:
- return $this->setFromArray(array(0,
- $time[0],
- $time[1],
- $time[2]));
- default:
- return $this->setFromArray($time);
- }
- break;
- }
- }
- return false;
- }
-
-
- // }}}
- // {{{ setFromSeconds()
-
- /**
- * Set the time span from a total number of seconds
- *
- * @param int $seconds total number of seconds
- *
- * @return bool true on success
- * @access public
- * @see Date_Span::set(), Date_Span::setFromDays(),
- * Date_Span::setFromHours(), Date_Span::setFromMinutes()
- */
- public function setFromSeconds($seconds)
- {
- if ($seconds < 0) {
- return false;
- }
- $sec = intval($seconds);
- $min = floor($sec / 60);
- $hour = floor($min / 60);
- $day = intval(floor($hour / 24));
-
- $this->second = $sec % 60;
- $this->minute = $min % 60;
- $this->hour = $hour % 24;
- $this->day = $day;
- return true;
- }
-
-
- // }}}
- // {{{ setFromMinutes()
-
- /**
- * Sets the time span from a total number of minutes
- *
- * @param float $minutes total number of minutes
- *
- * @return bool true on success
- * @access public
- * @see Date_Span::set(), Date_Span::setFromDays(),
- * Date_Span::setFromHours(), Date_Span::setFromSeconds()
- */
- public function setFromMinutes($minutes)
- {
- return $this->setFromSeconds(round($minutes * 60));
- }
-
-
- // }}}
- // {{{ setFromHours()
-
- /**
- * Sets the time span from a total number of hours
- *
- * @param float $hours total number of hours
- *
- * @return bool true on success
- * @access public
- * @see Date_Span::set(), Date_Span::setFromDays(),
- * Date_Span::setFromHours(), Date_Span::setFromMinutes()
- */
- public function setFromHours($hours)
- {
- return $this->setFromSeconds(round($hours * 3600));
- }
-
-
- // }}}
- // {{{ setFromDays()
-
- /**
- * Sets the time span from a total number of days
- *
- * @param float $days total number of days
- *
- * @return bool true on success
- * @access public
- * @see Date_Span::set(), Date_Span::setFromHours(),
- * Date_Span::setFromMinutes(), Date_Span::setFromSeconds()
- */
- public function setFromDays($days)
- {
- return $this->setFromSeconds(round($days * 86400));
- }
-
-
- // }}}
- // {{{ setFromDateDiff()
-
- /**
- * Sets the span from the elapsed time between two dates
- *
- * The time span is unsigned, so the date's order is not important.
- *
- * @param object $date1 first Date
- * @param object $date2 second Date
- *
- * @return bool true on success
- * @access public
- * @see Date_Span::set()
- */
- public function setFromDateDiff($date1, $date2)
- {
- if (!is_a($date1, 'date') or !is_a($date2, 'date')) {
- return false;
- }
-
- // create a local copy of instance, in order avoid changes the object
- // reference when its object has converted to UTC due PHP5 is always
- // passed the object by reference.
- $tdate1 = new Date($date1);
- $tdate2 = new Date($date2);
-
- // convert to UTC
- $tdate1->toUTC();
- $tdate2->toUTC();
-
- if ($tdate1->after($tdate2)) {
- list($tdate1, $tdate2) = array($tdate2, $tdate1);
- }
-
- $days = Date_Calc::dateDiff(
- $tdate1->getDay(),
- $tdate1->getMonth(),
- $tdate1->getYear(),
- $tdate2->getDay(),
- $tdate2->getMonth(),
- $tdate2->getYear()
- );
-
- $hours = $tdate2->getHour() - $tdate1->getHour();
- $mins = $tdate2->getMinute() - $tdate1->getMinute();
- $secs = $tdate2->getSecond() - $tdate1->getSecond();
-
- $this->setFromSeconds($days * 86400 +
- $hours * 3600 +
- $mins * 60 + $secs);
- return true;
- }
-
- // }}}
- // {{{ copy()
-
- /**
- * Sets the time span from another time object
- *
- * @param object $time source time span object
- *
- * @return bool true on success
- * @access public
- */
- public function copy($time)
- {
- if (is_a($time, 'date_span')) {
- $this->second = $time->second;
- $this->minute = $time->minute;
- $this->hour = $time->hour;
- $this->day = $time->day;
- return true;
- } else {
- return false;
- }
- }
-
-
- // }}}
- // {{{ format()
-
- /**
- * Formats time span according to specified code (similar to
- * {@link Date::formatLikeStrftime()})
- *
- * Uses a code based on {@link http://www.php.net/strftime strftime()}.
- *
- * Formatting options:
- *
- * - <b>%C</b> - Days with time, equivalent to '<b>%D, %H:%M:%S</b>'
- * - <b>%d</b> - Total days as a float number
- * (2 days, 12 hours = 2.5 days)
- * - <b>%D</b> - Days as a decimal number
- * - <b>%e</b> - Total hours as a float number
- * (1 day, 2 hours, 30 minutes = 26.5 hours)
- * - <b>%E</b> - Total hours as a decimal number
- * (1 day, 2 hours, 40 minutes = 26 hours)
- * - <b>%f</b> - Total minutes as a float number
- * (2 minutes, 30 seconds = 2.5 minutes)
- * - <b>%F</b> - Total minutes as a decimal number
- * (1 hour, 2 minutes, 40 seconds = 62 minutes)
- * - <b>%g</b> - Total seconds as a decimal number
- * (2 minutes, 30 seconds = 90 seconds)
- * - <b>%h</b> - Hours as decimal number (0 to 23)
- * - <b>%H</b> - Hours as decimal number (00 to 23)
- * - <b>%i</b> - Hours as decimal number on 12-hour clock
- * (1 to 12)
- * - <b>%I</b> - Hours as decimal number on 12-hour clock
- * (01 to 12)
- * - <b>%m</b> - Minutes as a decimal number (0 to 59)
- * - <b>%M</b> - Minutes as a decimal number (00 to 59)
- * - <b>%n</b> - Newline character (\n)
- * - <b>%p</b> - Either 'am' or 'pm' depending on the time
- * - <b>%P</b> - Either 'AM' or 'PM' depending on the time
- * - <b>%r</b> - Time in am/pm notation, equivalent to '<b>%I:%M:%S %p</b>'
- * - <b>%R</b> - Time in 24-hour notation, equivalent to '<b>%H:%M</b>'
- * - <b>%s</b> - Seconds as a decimal number (0 to 59)
- * - <b>%S</b> - Seconds as a decimal number (00 to 59)
- * - <b>%t</b> - Tab character (\t)
- * - <b>%T</b> - Current time equivalent, equivalent to '<b>%H:%M:%S</b>'
- * - <b>%%</b> - Literal '%'
- *
- * @param string $format the format string for returned time span
- *
- * @return string the time span in specified format
- * @access public
- */
- public function format($format = null)
- {
- if (is_null($format)) {
- $format = $GLOBALS['_DATE_SPAN_FORMAT'];
- }
- $output = '';
- for ($i = 0; $i < strlen($format); $i++) {
- $char = $format{$i};
- if ($char == '%') {
- $nextchar = $format{++$i};
- switch ($nextchar) {
- case 'C':
- $output .= sprintf(
- '%d, %02d:%02d:%02d',
- $this->day,
- $this->hour,
- $this->minute,
- $this->second
- );
- break;
- case 'd':
- $output .= $this->toDays();
- break;
- case 'D':
- $output .= $this->day;
- break;
- case 'e':
- $output .= $this->toHours();
- break;
- case 'E':
- $output .= floor($this->toHours());
- break;
- case 'f':
- $output .= $this->toMinutes();
- break;
- case 'F':
- $output .= floor($this->toMinutes());
- break;
- case 'g':
- $output .= $this->toSeconds();
- break;
- case 'h':
- $output .= $this->hour;
- break;
- case 'H':
- $output .= sprintf('%02d', $this->hour);
- break;
- case 'i':
- case 'I':
- $hour = $this->hour + 1 > 12 ?
- $this->hour - 12 :
- $this->hour;
- $output .= $hour == 0 ?
- 12 :
- ($nextchar == "i" ?
- $hour :
- sprintf('%02d', $hour));
- break;
- case 'm':
- $output .= $this->minute;
- break;
- case 'M':
- $output .= sprintf('%02d', $this->minute);
- break;
- case 'n':
- $output .= "\n";
- break;
- case 'p':
- $output .= $this->hour >= 12 ? 'pm' : 'am';
- break;
- case 'P':
- $output .= $this->hour >= 12 ? 'PM' : 'AM';
- break;
- case 'r':
- $hour = $this->hour + 1 > 12 ?
- $this->hour - 12 :
- $this->hour;
- $output .= sprintf(
- '%02d:%02d:%02d %s',
- $hour == 0 ? 12 : $hour,
- $this->minute,
- $this->second,
- $this->hour >= 12 ? 'pm' : 'am'
- );
- break;
- case 'R':
- $output .= sprintf(
- '%02d:%02d',
- $this->hour,
- $this->minute
- );
- break;
- case 's':
- $output .= $this->second;
- break;
- case 'S':
- $output .= sprintf('%02d', $this->second);
- break;
- case 't':
- $output .= "\t";
- break;
- case 'T':
- $output .= sprintf(
- '%02d:%02d:%02d',
- $this->hour,
- $this->minute,
- $this->second
- );
- break;
- case '%':
- $output .= "%";
- break;
- default:
- $output .= $char . $nextchar;
- }
- } else {
- $output .= $char;
- }
- }
- return $output;
- }
-
-
- // }}}
- // {{{ toSeconds()
-
- /**
- * Converts time span to seconds
- *
- * @return int time span as an integer number of seconds
- * @access public
- * @see Date_Span::toDays(), Date_Span::toHours(),
- * Date_Span::toMinutes()
- */
- public function toSeconds()
- {
- return $this->day * 86400 + $this->hour * 3600 +
- $this->minute * 60 + $this->second;
- }
-
-
- // }}}
- // {{{ toMinutes()
-
- /**
- * Converts time span to minutes
- *
- * @return float time span as a decimal number of minutes
- * @access public
- * @see Date_Span::toDays(), Date_Span::toHours(),
- * Date_Span::toSeconds()
- */
- public function toMinutes()
- {
- return $this->day * 1440 + $this->hour * 60 + $this->minute +
- $this->second / 60;
- }
-
-
- // }}}
- // {{{ toHours()
-
- /**
- * Converts time span to hours
- *
- * @return float time span as a decimal number of hours
- * @access public
- * @see Date_Span::toDays(), Date_Span::toMinutes(),
- * Date_Span::toSeconds()
- */
- public function toHours()
- {
- return $this->day * 24 + $this->hour + $this->minute / 60 +
- $this->second / 3600;
- }
-
-
- // }}}
- // {{{ toDays()
-
- /**
- * Converts time span to days
- *
- * @return float time span as a decimal number of days
- * @access public
- * @see Date_Span::toHours(), Date_Span::toMinutes(),
- * Date_Span::toSeconds()
- */
- public function toDays()
- {
- return $this->day + $this->hour / 24 + $this->minute / 1440 +
- $this->second / 86400;
- }
-
-
- // }}}
- // {{{ add()
-
- /**
- * Adds a time span
- *
- * @param object $time time span to add
- *
- * @return void
- * @access public
- * @see Date_Span::subtract()
- */
- public function add($time)
- {
- return $this->setFromSeconds($this->toSeconds() +
- $time->toSeconds());
- }
-
-
- // }}}
- // {{{ subtract()
-
- /**
- * Subtracts a time span
- *
- * If the time span to subtract is larger than the original, the result
- * is zero (there's no sense in negative time spans).
- *
- * @param object $time time span to subtract
- *
- * @return void
- * @access public
- * @see Date_Span::add()
- */
- public function subtract($time)
- {
- $sub = $this->toSeconds() - $time->toSeconds();
- if ($sub < 0) {
- $this->setFromSeconds(0);
- } else {
- $this->setFromSeconds($sub);
- }
- }
-
-
- // }}}
- // {{{ equal()
-
- /**
- * Tells if time span is equal to $time
- *
- * @param object $time time span to compare to
- *
- * @return bool true if the time spans are equal
- * @access public
- * @see Date_Span::greater(), Date_Span::greaterEqual()
- * Date_Span::lower(), Date_Span::lowerEqual()
- */
- public function equal($time)
- {
- return $this->toSeconds() == $time->toSeconds();
- }
-
-
- // }}}
- // {{{ greaterEqual()
-
- /**
- * Tells if this time span is greater or equal than $time
- *
- * @param object $time time span to compare to
- *
- * @return bool true if this time span is greater or equal than $time
- * @access public
- * @see Date_Span::greater(), Date_Span::lower(),
- * Date_Span::lowerEqual(), Date_Span::equal()
- */
- public function greaterEqual($time)
- {
- return $this->toSeconds() >= $time->toSeconds();
- }
-
-
- // }}}
- // {{{ lowerEqual()
-
- /**
- * Tells if this time span is lower or equal than $time
- *
- * @param object $time time span to compare to
- *
- * @return bool true if this time span is lower or equal than $time
- * @access public
- * @see Date_Span::lower(), Date_Span::greater(),
- * Date_Span::greaterEqual(), Date_Span::equal()
- */
- public function lowerEqual($time)
- {
- return $this->toSeconds() <= $time->toSeconds();
- }
-
-
- // }}}
- // {{{ greater()
-
- /**
- * Tells if this time span is greater than $time
- *
- * @param object $time time span to compare to
- *
- * @return bool true if this time span is greater than $time
- * @access public
- * @see Date_Span::greaterEqual(), Date_Span::lower(),
- * Date_Span::lowerEqual(), Date_Span::equal()
- */
- public function greater($time)
- {
- return $this->toSeconds() > $time->toSeconds();
- }
-
-
- // }}}
- // {{{ lower()
-
- /**
- * Tells if this time span is lower than $time
- *
- * @param object $time time span to compare to
- *
- * @return bool true if this time span is lower than $time
- * @access public
- * @see Date_Span::lowerEqual(), Date_Span::greater(),
- * Date_Span::greaterEqual(), Date_Span::equal()
- */
- public function lower($time)
- {
- return $this->toSeconds() < $time->toSeconds();
- }
-
-
- // }}}
- // {{{ compare()
-
- /**
- * Compares two time spans
- *
- * Suitable for use in sorting functions.
- *
- * @param object $time1 the first time span
- * @param object $time2 the second time span
- *
- * @return int 0 if the time spans are equal, -1 if time1 is lower
- * than time2, 1 if time1 is greater than time2
- * @access public
- * @static
- */
- public function compare($time1, $time2)
- {
- if ($time1->equal($time2)) {
- return 0;
- } elseif ($time1->lower($time2)) {
- return -1;
- } else {
- return 1;
- }
- }
-
-
- // }}}
- // {{{ isEmpty()
-
- /**
- * Tells if the time span is empty (zero length)
- *
- * @return bool true if empty
- * @access public
- */
- public function isEmpty()
- {
- return !$this->day && !$this->hour && !$this->minute && !$this->second;
- }
-
-
- // }}}
- // {{{ setDefaultInputFormat()
-
- /**
- * Sets the default input format
- *
- * @param mixed $format new default input format
- *
- * @return mixed previous default input format
- * @access public
- * @static
- * @see Date_Span::getDefaultInputFormat(), Date_Span::setDefaultFormat()
- */
- public function setDefaultInputFormat($format)
- {
- $old = $GLOBALS['_DATE_SPAN_INPUT_FORMAT'];
- $GLOBALS['_DATE_SPAN_INPUT_FORMAT'] = $format;
- return $old;
- }
-
-
- // }}}
- // {{{ getDefaultInputFormat()
-
- /**
- * Returns the default input format
- *
- * @return mixed default input format
- * @access public
- * @static
- * @see Date_Span::setDefaultInputFormat(), Date_Span::getDefaultFormat()
- */
- public function getDefaultInputFormat()
- {
- return $GLOBALS['_DATE_SPAN_INPUT_FORMAT'];
- }
-
-
- // }}}
- // {{{ setDefaultFormat()
-
- /**
- * Sets the default format
- *
- * @param mixed $format new default format
- *
- * @return mixed previous default format
- * @access public
- * @static
- * @see Date_Span::getDefaultFormat(), Date_Span::setDefaultInputFormat()
- */
- public function setDefaultFormat($format)
- {
- $old = $GLOBALS['_DATE_SPAN_FORMAT'];
- $GLOBALS['_DATE_SPAN_FORMAT'] = $format;
- return $old;
- }
-
-
- // }}}
- // {{{ getDefaultFormat()
-
- /**
- * Returns the default format
- *
- * @return mixed default format
- * @access public
- * @static
- * @see Date_Span::setDefaultFormat(), Date_Span::getDefaultInputFormat()
- */
- public function getDefaultFormat()
- {
- return $GLOBALS['_DATE_SPAN_FORMAT'];
- }
-
-
- // }}}
-}
-
-// }}}
-
-/*
- * Local variables:
- * mode: php
- * tab-width: 4
- * c-basic-offset: 4
- * c-hanging-comment-ender-p: nil
- * End:
- */
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
-
-
-// {{{ Header
-
-/**
- * TimeZone representation class, along with time zone information data
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 1997-2007 Baba Buehler, Pierre-Alain Joye, C.A. Woodcock
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted under the terms of the BSD License.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @category Date and Time
- * @package Date
- * @author Baba Buehler <baba@babaz.com>
- * @author Pierre-Alain Joye <pajoye@php.net>
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright 1997-2007 Baba Buehler, Pierre-Alain Joye, C.A. Woodcock
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Date
- */
-
-
-// }}}
-// {{{ Class Date_TimeZone
-
-/**
- * TimeZone representation class, along with time zone information data
- *
- * The default timezone is set from the first valid timezone id found
- * in one of the following places, in this order:
- * + global $_DATE_TIMEZONE_DEFAULT
- * + system environment variable PHP_TZ
- * + system environment variable TZ
- * + the result of date('T')
- *
- * If no valid timezone id is found, the default timezone is set to 'UTC'.
- * You may also manually set the default timezone by passing a valid id to
- * {@link Date_TimeZone::setDefault()}.
- *
- * This class includes time zone data (from zoneinfo) in the form of a
- * global array, $_DATE_TIMEZONE_DATA.
- *
- * @category Date and Time
- * @package Date
- * @author Baba Buehler <baba@babaz.com>
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright 1997-2007 Baba Buehler, Pierre-Alain Joye, C.A. Woodcock
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version Release: 1.5.0a1
- * @link http://pear.php.net/package/Date
- */
-class Date_TimeZone
-{
-
- // {{{ Properties
-
- /**
- * Unique time Zone ID of this time zone
- *
- * @var string
- * @access private
- * @since Property available since Release 1.0
- */
- public $id;
-
- /**
- * Offset, in milliseconds, of this timezone
- *
- * @var int
- * @access private
- * @since Property available since Release 1.0
- */
- public $offset;
-
- /**
- * Short name of this time zone (e.g. "CST")
- *
- * @var string
- * @access private
- * @since Property available since Release 1.0
- */
- public $shortname;
-
- /**
- * DST short name of this timezone (e.g. 'BST')
- *
- * @var string
- * @access private
- * @since Property available since Release 1.0
- */
- public $dstshortname;
-
- /**
- * Long name of this time zone (e.g. "Central Standard Time")
- *
- * N.B. this is not necessarily unique
- *
- * @since 1.0
- * @access private
- * @since Property available since Release 1.0
- */
- public $longname;
-
- /**
- * DST long name of this time zone (e.g. 'British Summer Time')
- *
- * @var string
- * @access private
- * @since Property available since Release 1.0
- */
- public $dstlongname;
-
- /**
- * Whether this time zone observes daylight savings time
- *
- * @var bool
- * @access private
- * @since Property available since Release 1.0
- */
- public $hasdst;
-
- /**
- * Additional offset of Summer time from the standard time of the
- * time zone in milli-seconds
- *
- * The value is usually 3600000, i.e. one hour, and always positive
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_summertimeoffset;
-
- /**
- * Month no (1-12) in which Summer time starts (the clocks go forward)
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_summertimestartmonth;
-
- /**
- * Definition of when Summer time starts in the specified month
- *
- * Can take one of the following forms:
- *
- * 5 the fifth of the month
- * lastSun the last Sunday in the month
- * lastMon the last Monday in the month
- * Sun>=8 first Sunday on or after the 8th
- * Sun<=25 last Sunday on or before the 25th
- *
- * @var string
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $os_summertimestartday;
-
- /**
- * Time in milli-seconds relative to midnight UTC when
- * Summer time starts (the clocks go forward)
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_summertimestarttime;
-
- /**
- * Month no (1-12) in which Summer time ends (the clocks go back)
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_summertimeendmonth;
-
- /**
- * Definition of when Summer time ends in the specified month
- *
- * @var string
- * @access private
- * @see Date_TimeZone::$os_summertimestartday
- * @since Property available since Release 1.5.0
- */
- public $os_summertimeendday;
-
- /**
- * Time in milli-seconds relative to midnight UTC when
- * Summer time ends (the clocks go back)
- *
- * @var int
- * @access private
- * @since Property available since Release 1.5.0
- */
- public $on_summertimeendtime;
-
-
- // }}}
- // {{{ Constructor
-
- /**
- * Constructor
- *
- * If the supplied ID is invalid, the created time zone is "UTC".
- *
- * A note about time zones of the form 'Etc/*' (quoted from the public
- * domain 'tz' data-base (see {@link ftp://elsie.nci.nih.gov/pub/}
- * [file 'etcetera']):
- *
- * These entries are mostly present for historical reasons, so that
- * people in areas not otherwise covered by the tz files could use
- * a time zone that was right for their area. These days, the
- * tz files cover almost all the inhabited world, and the only practical
- * need now for the entries that are not on UTC are for ships at sea
- * that cannot use POSIX TZ settings.
- *
- * - <b>Etc/GMT</b> (GMT)
- * - <b>Etc/UTC</b> (UTC)
- * - <b>Etc/UCT</b> (UCT)
- *
- * The following link uses older naming conventions, but it belongs here.
- * We want this to work even on installations that omit the other older
- * names.
- *
- * - <b>Etc/GMT</b> (equivalent to GMT)
- *
- * - <b>Etc/UTC</b> (equivalent to Etc/Universal)
- * - <b>Etc/UTC</b> (equivalent to Etc/Zulu)
- *
- * - <b>Etc/GMT</b> (equivalent to Etc/Greenwich)
- * - <b>Etc/GMT</b> (equivalent to Etc/GMT-0)
- * - <b>Etc/GMT</b> (equivalent to Etc/GMT+0)
- * - <b>Etc/GMT</b> (equivalent to Etc/GMT0)
- *
- * We use POSIX-style signs in the Zone names and the output abbreviations,
- * even though this is the opposite of what many people expect.
- * POSIX has positive signs west of Greenwich, but many people expect
- * positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses
- * the abbreviation "GMT+4" and corresponds to 4 hours behind UTC
- * (i.e. west of Greenwich) even though many people would expect it to
- * mean 4 hours ahead of UTC (i.e. east of Greenwich).
- *
- * In the draft 5 of POSIX 1003.1-200x, the angle bracket notation
- * (which is not yet supported by the tz code) allows for
- * TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
- * ISO 8601 you can use TZ='<-0400>+4'. Thus the commonly-expected
- * offset is kept within the angle bracket (and is used for display)
- * while the POSIX sign is kept outside the angle bracket (and is used
- * for calculation).
- *
- * Do not use a TZ setting like TZ='GMT+4', which is four hours behind
- * GMT but uses the completely misleading abbreviation "GMT".
- *
- * Earlier incarnations of this package were not POSIX-compliant, and
- * we did not want things to change quietly if someone accustomed to the
- * old way uses the codes from previous versions so we moved the names
- * into the Etc subdirectory.
- *
- * - <b>Etc/GMT-14</b> (14 hours ahead of Greenwich)
- * - <b>Etc/GMT-13</b> (13)
- * - <b>Etc/GMT-12</b> (12)
- * - <b>Etc/GMT-11</b> (11)
- * - <b>Etc/GMT-10</b> (10)
- * - <b>Etc/GMT-9</b> (9)
- * - <b>Etc/GMT-8</b> (8)
- * - <b>Etc/GMT-7</b> (7)
- * - <b>Etc/GMT-6</b> (6)
- * - <b>Etc/GMT-5</b> (5)
- * - <b>Etc/GMT-4</b> (4)
- * - <b>Etc/GMT-3</b> (3)
- * - <b>Etc/GMT-2</b> (2)
- * - <b>Etc/GMT-1</b> (1)
- * - <b>Etc/GMT+1</b> (1 hour behind Greenwich)
- * - <b>Etc/GMT+2</b> (2)
- * - <b>Etc/GMT+3</b> (3)
- * - <b>Etc/GMT+4</b> (4)
- * - <b>Etc/GMT+5</b> (5)
- * - <b>Etc/GMT+6</b> (6)
- * - <b>Etc/GMT+7</b> (7)
- * - <b>Etc/GMT+8</b> (8)
- * - <b>Etc/GMT+9</b> (9)
- * - <b>Etc/GMT+10</b> (10)
- * - <b>Etc/GMT+11</b> (11)
- * - <b>Etc/GMT+12</b> (12)
- *
- * @param string $ps_id the time zone ID
- *
- * @return void
- * @access public
- * @see Date::setTZ(), Date::setTZByID(), Date_TimeZone::isValidID()
- */
- public function Date_TimeZone($ps_id)
- {
- $_DATE_TIMEZONE_DATA =& $GLOBALS['_DATE_TIMEZONE_DATA'];
-
- if (isset($GLOBALS['_DATE_TIMEZONE_DATA'][$ps_id])) {
- $this->id = $ps_id;
-
- $this->shortname = $_DATE_TIMEZONE_DATA[$ps_id]['shortname'];
- $this->longname = $_DATE_TIMEZONE_DATA[$ps_id]['longname'];
- $this->offset = $_DATE_TIMEZONE_DATA[$ps_id]['offset'];
- $this->dstshortname =
- array_key_exists(
- "dstshortname",
- $_DATE_TIMEZONE_DATA[$ps_id]
- ) ?
- $_DATE_TIMEZONE_DATA[$ps_id]['dstshortname'] :
- null;
- if ($this->hasdst = !is_null($this->dstshortname)) {
- $this->dstlongname =
- array_key_exists(
- "dstlongname",
- $_DATE_TIMEZONE_DATA[$ps_id]
- ) ?
- $_DATE_TIMEZONE_DATA[$ps_id]['dstlongname'] :
- null;
- if (isset($_DATE_TIMEZONE_DATA[$ps_id]["summertimeoffset"])) {
- $this->on_summertimeoffset = $_DATE_TIMEZONE_DATA[$ps_id]["summertimeoffset"];
- $this->on_summertimestartmonth = $_DATE_TIMEZONE_DATA[$ps_id]["summertimestartmonth"];
- $this->os_summertimestartday = $_DATE_TIMEZONE_DATA[$ps_id]["summertimestartday"];
- $this->on_summertimestarttime = $_DATE_TIMEZONE_DATA[$ps_id]["summertimestarttime"];
- $this->on_summertimeendmonth = $_DATE_TIMEZONE_DATA[$ps_id]["summertimeendmonth"];
- $this->os_summertimeendday = $_DATE_TIMEZONE_DATA[$ps_id]["summertimeendday"];
- $this->on_summertimeendtime = $_DATE_TIMEZONE_DATA[$ps_id]["summertimeendtime"];
- } else {
- $this->on_summertimeoffset = null;
- }
- }
- } else {
- $this->hasdst = false;
-
- if (preg_match(
- '/^UTC([+\-])([0-9]{2,2}):?([0-5][0-9])$/',
- $ps_id,
- $ha_matches
- )) {
- $this->id = $ps_id;
- $this->offset = ($ha_matches[1] .
- ($ha_matches[2] * 3600 +
- $ha_matches[3] * 60)) * 1000;
-
- if (!($hb_isutc = $this->offset == 0)) {
- $this->id = $ps_id;
- $this->shortname = "UTC" .
- $ha_matches[1] .
- ($ha_matches[3] == "00" ?
- ltrim($ha_matches[2], "0") :
- $ha_matches[2] . $ha_matches[3]);
- $this->longname = "UTC" .
- $ha_matches[1] .
- $ha_matches[2] .
- ":" .
- $ha_matches[3];
- }
- } elseif (preg_match(
- '/^UTC([+\-])([0-9]{1,2})$/',
- $ps_id,
- $ha_matches
- )) {
- $this->id = $ps_id;
- $this->offset = ($ha_matches[1] .
- ($ha_matches[2] * 3600)) * 1000;
-
- if (!($hb_isutc = $this->offset == 0)) {
- $this->shortname = "UTC" .
- $ha_matches[1] .
- ltrim($ha_matches[2], "0");
- $this->longname = "UTC" .
- $ha_matches[1] .
- sprintf("%02d", $ha_matches[2]) .
- ":00";
- }
- } else {
- $this->id = "UTC";
- $hb_isutc = true;
- }
-
- if ($hb_isutc) {
- $this->shortname = $_DATE_TIMEZONE_DATA["UTC"]['shortname'];
- $this->longname = $_DATE_TIMEZONE_DATA["UTC"]['longname'];
- $this->offset = $_DATE_TIMEZONE_DATA["UTC"]['offset'];
- }
- }
- }
-
-
- // }}}
- // {{{ getDefault()
-
- /**
- * Returns a TimeZone object representing the system default time zone
- *
- * The system default time zone is initialized during the loading of
- * this file.
- *
- * @return object Date_TimeZone object of the default time zone
- * @access public
- */
- public function getDefault()
- {
- return new Date_TimeZone($GLOBALS['_DATE_TIMEZONE_DEFAULT']);
- }
-
-
- // }}}
- // {{{ setDefault()
-
- /**
- * Sets the system default time zone to the time zone in $id
- *
- * @param string $id the time zone id to use
- *
- * @return void
- * @access public
- */
- public function setDefault($id)
- {
- if (Date_TimeZone::isValidID($id)) {
- $GLOBALS['_DATE_TIMEZONE_DEFAULT'] = $id;
- } else {
- return PEAR::raiseError("Invalid time zone ID '$id'");
- }
- }
-
-
- // }}}
- // {{{ isValidID()
-
- /**
- * Tests if given time zone ID (e.g. 'London/Europe') is valid and unique
- *
- * Checks if given ID is either represented in the $_DATE_TIMEZONE_DATA
- * time zone data, or is a UTC offset in one of the following forms,
- * i.e. an offset with no geographical or political base:
- *
- * - <b>UTC[+/-][hh]:[mm]</b> - e.g. UTC+03:00
- * - <b>UTC[+/-][hh][mm]</b> - e.g. UTC-0530
- * - <b>UTC[+/-][hh]</b> - e.g. UTC+03
- * - <b>UTC[+/-][h]</b> - e.g. UTC-1
- *
- * (the last is not an ISO 8601 standard but is the preferred form)
- *
- * N.B. these are not sanctioned by any ISO standard, but the form of
- * the offset itself, i.e. the part after the characters 'UTC', is the
- * ISO 8601 standard form for representing this part.
- *
- * The form '<b>[+/-][h]</b>' is not ISO conformant, but ISO 8601 only
- * defines the form of the time zone offset of a particular time, that
- * is, it actually defines the form '<b><time>UTC[+/-][hh]</b>', and
- * its purview does not apparently cover the name of the time zone
- * itself. For this there is no official international standard (or
- * even a non- international standard). The closest thing to a
- * sanctioning body is the 'tz' database
- * ({@link http://www.twinsun.com/tz/tz-link.htm})
- * which is run by volunteers but which is heavily relied upon by
- * various programming languages and the internet community. However
- * they mainly define geographical/political time zone names of the
- * form 'London/Europe' because their main aim is to collate the time
- * zone definitions which are set by individual countries/states, not
- * to prescribe any standard.
- *
- * However it seems that the de facto standard to describe time zones
- * as non-geographically/politically-based areas where the local time
- * on all clocks reads the same seems to be the form '<b>UTC[+/-][h]</b>'
- * for integral numbers of hours, and '<b>UTC[+/-][hh]:[mm]</b>'
- * otherwise.
- * (See {@link http://en.wikipedia.org/wiki/List_of_time_zones})
- *
- * N.B. 'GMT' is also commonly used instead of 'UTC', but 'UTC' seems
- * to be technically preferred. GMT-based IDs still exist in the 'tz
- * data-base', but beware of POSIX-style offsets which are the opposite
- * way round to what people normally expect.
- *
- * @param string $ps_id the time zone ID to test
- *
- * @return bool true if the supplied ID is valid
- * @access public
- * @see Date::setTZByID(), Date_TimeZone::Date_TimeZone()
- */
- public function isValidID($ps_id)
- {
- if (isset($GLOBALS['_DATE_TIMEZONE_DATA'][$ps_id])) {
- return true;
- } elseif (preg_match(
- '/^UTC[+\-]([0-9]{2,2}:?[0-5][0-9]|[0-9]{1,2})$/',
- $ps_id
- )) {
- return true;
- } else {
- return false;
- }
- }
-
-
- // }}}
- // {{{ isEqual()
-
- /**
- * Is this time zone equal to another
- *
- * Tests to see if this time zone is equal (ids match)
- * to a given Date_TimeZone object.
- *
- * @param object $tz the Date_TimeZone object to test
- *
- * @return bool true if this time zone is equal to the supplied
- * time zone
- * @access public
- * @see Date_TimeZone::isEquivalent()
- */
- public function isEqual($tz)
- {
- if (strcasecmp($this->id, $tz->id) == 0) {
- return true;
- } else {
- return false;
- }
- }
-
-
- // }}}
- // {{{ isEquivalent()
-
- /**
- * Is this time zone equivalent to another
- *
- * Tests to see if this time zone is equivalent to a given time zone object.
- * Equivalence in this context consists in the two time zones having:
- *
- * - an equal offset from UTC in both standard and Summer time (if
- * the time zones observe Summer time)
- * - the same Summer time start and end rules, that is, the two time
- * zones must switch from standard time to Summer time,
- * and vice versa, on the same day and at the same time
- *
- * @param object $pm_tz the Date_TimeZone object to test, or a valid time
- * zone ID
- *
- * @return bool true if this time zone is equivalent to the supplied
- * time zone
- * @access public
- * @see Date_TimeZone::isEqual(), Date::inEquivalentTimeZones()
- */
- public function isEquivalent($pm_tz)
- {
- if (is_a($pm_tz, "Date_TimeZone")) {
- if ($pm_tz->getID() == $this->id) {
- return true;
- }
- } else {
- if (!Date_TimeZone::isValidID($pm_tz)) {
- return PEAR::raiseError(
- "Invalid time zone ID '$pm_tz'",
- DATE_ERROR_INVALIDTIMEZONE
- );
- }
- if ($pm_tz == $this->id) {
- return true;
- }
-
- $pm_tz = new Date_TimeZone($pm_tz);
- }
-
- if ($this->getRawOffset() == $pm_tz->getRawOffset() &&
- $this->hasDaylightTime() == $pm_tz->hasDaylightTime() &&
- $this->getDSTSavings() == $pm_tz->getDSTSavings() &&
- $this->getSummerTimeStartMonth() == $pm_tz->getSummerTimeStartMonth() &&
- $this->getSummerTimeStartDay() == $pm_tz->getSummerTimeStartDay() &&
- $this->getSummerTimeStartTime() == $pm_tz->getSummerTimeStartTime() &&
- $this->getSummerTimeEndMonth() == $pm_tz->getSummerTimeEndMonth() &&
- $this->getSummerTimeEndDay() == $pm_tz->getSummerTimeEndDay() &&
- $this->getSummerTimeEndTime() == $pm_tz->getSummerTimeEndTime()
- ) {
- return true;
- } else {
- return false;
- }
- }
-
-
- // }}}
- // {{{ hasDaylightTime()
-
- /**
- * Returns true if this zone observes daylight savings time
- *
- * @return bool true if this time zone has DST
- * @access public
- */
- public function hasDaylightTime()
- {
- return $this->hasdst;
- }
-
-
- // }}}
- // {{{ getSummerTimeLimitDay()
-
- /**
- * Returns day on which Summer time starts or ends for given year
- *
- * The limit (start or end) code can take the following forms:
- *
- * - <b>5</b> - the fifth of the month
- * - <b>lastSun</b> - the last Sunday in the month
- * - <b>lastMon</b> - the last Monday in the month
- * - <b>Sun>=8</b> - first Sunday on or after the 8th
- * - <b>Sun<=25</b> - last Sunday on or before the 25th
- *
- * @param string $ps_summertimelimitcode code which specifies Summer time
- * limit day
- * @param int $pn_month start or end month
- * @param int $pn_year year for which to calculate Summer
- * time limit day
- *
- * @return int
- * @access private
- * @see Date_TimeZone::getSummerTimeStartDay()
- * @since Method available since Release 1.5.0
- */
- public function getSummerTimeLimitDay($ps_summertimelimitcode, $pn_month, $pn_year)
- {
- if (preg_match('/^[0-9]+$/', $ps_summertimelimitcode)) {
- $hn_day = $ps_summertimelimitcode;
- } else {
- if (!isset($ha_daysofweek)) {
- static $ha_daysofweek = array("Sun" => 0,
- "Mon" => 1,
- "Tue" => 2,
- "Wed" => 3,
- "Thu" => 4,
- "Fri" => 5,
- "Sat" => 6);
- }
-
- if (preg_match(
- '/^last(Sun|Mon|Tue|Wed|Thu|Fri|Sat)$/',
- $ps_summertimelimitcode,
- $ha_matches
- )) {
- list($hn_nmyear, $hn_nextmonth, $hn_nmday) =
- explode(" ", Date_Calc::beginOfMonthBySpan(
- 1,
- $pn_month,
- $pn_year,
- "%Y %m %d"
- ));
- list($hn_year, $hn_month, $hn_day) =
- explode(
- " ",
- Date_Calc::prevDayOfWeek(
- $ha_daysofweek[$ha_matches[1]],
- $hn_nmday,
- $hn_nextmonth,
- $hn_nmyear,
- "%Y %m %d",
- false
- )
- ); // not including
- // this day
-
- if ($hn_month != $pn_month) {
- // This code happen legitimately if the calendar jumped some days
- // e.g. in a calendar switch, or the limit day is badly defined:
- //
- $hn_day = Date_Calc::getFirstDayOfMonth($pn_month, $pn_year);
- }
- } elseif (preg_match(
- '/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat)([><]=)([0-9]+)$/',
- $ps_summertimelimitcode,
- $ha_matches
- )) {
- if ($ha_matches[2] == "<=") {
- list($hn_year, $hn_month, $hn_day) =
- explode(
- " ",
- Date_Calc::prevDayOfWeek(
- $ha_daysofweek[$ha_matches[1]],
- $ha_matches[3],
- $pn_month,
- $pn_year,
- "%Y %m %d",
- true
- )
- ); // including
- // this day
-
- if ($hn_month != $pn_month) {
- $hn_day = Date_Calc::getFirstDayOfMonth($pn_month, $pn_year);
- }
- } else {
- list($hn_year, $hn_month, $hn_day) =
- explode(
- " ",
- Date_Calc::nextDayOfWeek(
- $ha_daysofweek[$ha_matches[1]],
- $ha_matches[3],
- $pn_month,
- $pn_year,
- "%Y %m %d",
- true
- )
- ); // including
- // this day
-
- if ($hn_month != $pn_month) {
- $hn_day = Date_Calc::daysInMonth($pn_month, $pn_year);
- }
- }
- }
- }
-
- return $hn_day;
- }
-
-
- // }}}
- // {{{ inDaylightTime()
-
- /**
- * Returns whether the given date/time is in DST for this time zone
- *
- * Works for all years, positive and negative. Possible problems
- * are that when the clocks go forward, there is an invalid hour
- * which is skipped. If a time in this hour is specified, this
- * function returns an error. When the clocks go back, there is an
- * hour which is repeated, that is, the hour is gone through twice -
- * once in Summer time and once in standard time. If this time
- * is specified, then this function returns '$pb_repeatedhourdefault',
- * because there is no way of knowing which is correct, and
- * both possibilities are equally likely.
- *
- * Also bear in mind that the clocks go forward at the instant of
- * the hour specified in the time-zone array below, and if this
- * exact hour is specified then the clocks have actually changed,
- * and this function reflects this.
- *
- * @param object $pm_date Date object to test or array of
- * day, month, year, seconds past
- * midnight
- * @param bool $pb_repeatedhourdefault value to return if repeated hour is
- * specified (defaults to false)
- *
- * @return bool true if this date is in Summer time for this time
- * zone
- * @access public
- * @see Date_TimeZone::inDaylightTimeStandard()
- */
- public function inDaylightTime($pm_date, $pb_repeatedhourdefault = false)
- {
- if (!$this->hasdst) {
- return false;
- }
-
- if (is_a($pm_date, "Date")) {
- $hn_day = $pm_date->getDay();
- $hn_month = $pm_date->getMonth();
- $hn_year = $pm_date->getYear();
- $hn_seconds = $pm_date->getSecondsPastMidnight();
- } else {
- $hn_day = $pm_date[0];
- $hn_month = $pm_date[1];
- $hn_year = $pm_date[2];
- $hn_seconds = $pm_date[3]; // seconds past midnight
- }
-
- if (($this->on_summertimestartmonth < $this->on_summertimeendmonth &&
- $hn_month >= $this->on_summertimestartmonth &&
- $hn_month <= $this->on_summertimeendmonth) ||
- ($this->on_summertimestartmonth > $this->on_summertimeendmonth &&
- $hn_month >= $this->on_summertimestartmonth &&
- $hn_month <= $this->on_summertimeendmonth)
- ) {
- if ($hn_month == $this->on_summertimestartmonth) {
- $hn_startday =
- $this->getSummerTimeLimitDay(
- $this->os_summertimestartday,
- $this->on_summertimestartmonth,
- $hn_year
- );
-
- if ($hn_day < $hn_startday) {
- return false;
- } elseif ($hn_day > $hn_startday) {
- return true;
- } elseif (($hn_gmt = $hn_seconds * 1000 - $this->offset) -
- $this->on_summertimeoffset >=
- $this->on_summertimestarttime) {
- return true;
- } elseif (($hn_gmt = $hn_seconds * 1000 - $this->offset) >=
- $this->on_summertimestarttime) {
- return PEAR::raiseError(
- "Invalid time specified for date '" .
- Date_Calc::dateFormat(
- $hn_day,
- $hn_month,
- $hn_year,
- "%Y-%m-%d"
- ) .
- "'",
- DATE_ERROR_INVALIDTIME
- );
- } else {
- return false;
- }
- } elseif ($hn_month == $this->on_summertimeendmonth) {
- $hn_endday =
- $this->getSummerTimeLimitDay(
- $this->os_summertimeendday,
- $this->on_summertimeendmonth,
- $hn_year
- );
-
- if ($hn_day < $hn_endday) {
- return true;
- } elseif ($hn_day > $hn_endday) {
- return false;
- } elseif (($hn_gmt = $hn_seconds * 1000 - $this->offset) -
- $this->on_summertimeoffset >=
- $this->on_summertimeendtime) {
- return false;
- } elseif ($hn_gmt >= $this->on_summertimeendtime) {
- // There is a 50:50 chance that it's Summer time, but there
- // is no way of knowing (the hour is repeated), so return
- // default:
- //
- return $pb_repeatedhourdefault;
- } else {
- return true;
- }
- }
-
- return true;
- }
-
- return false;
- }
-
-
- // }}}
- // {{{ inDaylightTimeStandard()
-
- /**
- * Returns whether the given date/time in local standard time is
- * in Summer time
- *
- * For example, if the clocks go forward at 1.00 standard time,
- * then if the specified date/time is at 1.00, the function will
- * return true, although the correct local time will actually
- * be 2.00.
- *
- * This function is reliable for all dates and times, unlike the
- * related function '{@link Date_TimeZone::inDaylightTime()}',
- * which will fail if passed
- * an invalid time (the skipped hour) and will be wrong half the
- * time if passed an ambiguous time (the repeated hour).
- *
- * @param object $pm_date Date object to test or array of day, month, year,
- * seconds past midnight
- *
- * @return bool true if this date is in Summer time for this time
- * zone
- * @access public
- * @see Date_TimeZone::inDaylightTime()
- * @since Method available since Release 1.5.0
- */
- public function inDaylightTimeStandard($pm_date)
- {
- if (!$this->hasdst) {
- return false;
- }
-
- if (is_a($pm_date, "Date")) {
- $hn_day = $pm_date->getDay();
- $hn_month = $pm_date->getMonth();
- $hn_year = $pm_date->getYear();
- $hn_seconds = $pm_date->getSecondsPastMidnight();
- } else {
- $hn_day = $pm_date[0];
- $hn_month = $pm_date[1];
- $hn_year = $pm_date[2];
- $hn_seconds = $pm_date[3];
- }
-
- if (($this->on_summertimestartmonth < $this->on_summertimeendmonth &&
- $hn_month >= $this->on_summertimestartmonth &&
- $hn_month <= $this->on_summertimeendmonth) ||
- ($this->on_summertimestartmonth > $this->on_summertimeendmonth &&
- $hn_month >= $this->on_summertimestartmonth &&
- $hn_month <= $this->on_summertimeendmonth)
- ) {
- if ($hn_month == $this->on_summertimestartmonth) {
- $hn_startday =
- $this->getSummerTimeLimitDay(
- $this->os_summertimestartday,
- $this->on_summertimestartmonth,
- $hn_year
- );
-
- if ($hn_day < $hn_startday) {
- return false;
- } elseif ($hn_day > $hn_startday) {
- return true;
- } elseif ($hn_seconds * 1000 - $this->offset >=
- $this->on_summertimestarttime) {
- return true;
- } else {
- return false;
- }
- } elseif ($hn_month == $this->on_summertimeendmonth) {
- $hn_endday =
- $this->getSummerTimeLimitDay(
- $this->os_summertimeendday,
- $this->on_summertimeendmonth,
- $hn_year
- );
-
- if ($hn_day < $hn_endday) {
- return true;
- } elseif ($hn_day > $hn_endday) {
- return false;
- } elseif ($hn_seconds * 1000 - $this->offset >=
- $this->on_summertimeendtime) {
- return false;
- } else {
- return true;
- }
- }
-
- return true;
- }
-
- return false;
- }
-
-
- // }}}
- // {{{ getDSTSavings()
-
- /**
- * Get the DST offset for this time zone
- *
- * Returns the DST offset of this time zone, in milliseconds,
- * if the zone observes DST, zero otherwise. If the offset is not
- * known, the function returns one hour.
- *
- * @return int the DST offset, in milliseconds or nought if the
- * zone does not observe DST
- * @access public
- */
- public function getDSTSavings()
- {
- if ($this->hasdst) {
- // If offset is not specified, guess one hour. (This is almost
- // always correct anyway). This cannot be improved upon, because
- // where it is unset, the offset is either unknowable because the
- // time-zone covers more than one political area (which may have
- // different Summer time policies), or they might all have the
- // same policy, but there is no way to automatically maintain
- // this data at the moment, and manually it is simply not worth
- // the bother. If a user wants this functionality and refuses
- // to use the standard time-zone IDs, then he can always update
- // the array himself.
- //
- return isset($this->on_summertimeoffset) ?
- $this->on_summertimeoffset :
- 3600000;
- } else {
- return 0;
- }
- }
-
-
- // }}}
- // {{{ getRawOffset()
-
- /**
- * Returns the raw (non-DST-corrected) offset from UTC/GMT for this time
- * zone
- *
- * @return int the offset, in milliseconds
- * @access public
- * @see Date_TimeZone::getOffset()
- */
- public function getRawOffset()
- {
- return $this->offset;
- }
-
-
- // }}}
- // {{{ getOffset()
-
- /**
- * Returns the DST-corrected offset from UTC for the given date
- *
- * Gets the offset to UTC for a given date/time, taking into
- * account daylight savings time, if the time zone observes it and if
- * it is in effect.
- *
- * N.B. that the offset is calculated historically
- * and in the future according to the current Summer time rules,
- * and so this function is proleptically correct, but not necessarily
- * historically correct. (Although if you want to be correct about
- * times in the distant past, this class is probably not for you
- * because the whole notion of time zones does not apply, and
- * historically there are so many time zone changes, Summer time
- * rule changes, name changes, calendar changes, that calculating
- * this sort of information is beyond the scope of this package
- * altogether.)
- *
- * @param mixed $pm_insummertime a boolean specifying whether or not the
- * date is in Summer time, or,
- * a Date object to test for this condition
- *
- * @return int the corrected offset to UTC in milliseconds
- * @access public
- * @see Date_TimeZone::getRawOffset(), Date::getTZOffset()
- */
- public function getOffset($pm_insummertime)
- {
- if ($this->hasdst) {
- if (is_a($pm_insummertime, "Date")) {
- $hb_insummertime = $pm_insummertime->inDaylightTime();
- if (PEAR::isError($hb_insummertime)) {
- return $hb_insummertime;
- }
- } else {
- $hb_insummertime = $pm_insummertime;
- }
-
- if ($hb_insummertime) {
- return $this->offset + $this->getDSTSavings();
- }
- }
-
- return $this->offset;
- }
-
-
- // }}}
- // {{{ getAvailableIDs()
-
- /**
- * Returns the list of valid time zone id strings
- *
- * @return array an array of strings with the valid time zone IDs
- * @access public
- */
- public function getAvailableIDs()
- {
- return array_keys($GLOBALS['_DATE_TIMEZONE_DATA']);
- }
-
-
- // }}}
- // {{{ getID()
-
- /**
- * Returns the time zone id for this time zone, e.g. "America/Chicago"
- *
- * @return string the time zone ID
- * @access public
- */
- public function getID()
- {
- return $this->id;
- }
-
-
- // }}}
- // {{{ getLongName()
-
- /**
- * Returns the long name for this time zone
- *
- * Long form of time zone name, e.g. 'Greenwich Mean Time'. Additionally
- * a Date object can be passed in which case the Summer time name will
- * be returned instead if the date falls in Summer time, e.g. 'British
- * Summer Time', or a Boolean can be passed which explicitly specifies
- * whether the date is in Summer time.
- *
- * N.B. this is not a unique identifier - for this purpose use the
- * time zone ID.
- *
- * @param mixed $pm_insummertime a boolean specifying whether or not the
- * date is in Summer time, or,
- * a Date object to test for this condition
- *
- * @return string the long name
- * @access public
- * @see Date_TimeZone::getShortName(), Date_TimeZone::getDSTLongName(),
- * Date::getTZLongName()
- */
- public function getLongName($pm_insummertime = false)
- {
- if ($this->hasdst) {
- if (is_a($pm_insummertime, "Date")) {
- $hb_insummertime = $pm_insummertime->inDaylightTime();
- if (PEAR::isError($hb_insummertime)) {
- return $hb_insummertime;
- }
- } else {
- $hb_insummertime = $pm_insummertime;
- }
-
- if ($hb_insummertime) {
- return $this->dstlongname;
- }
- }
-
- return $this->longname;
- }
-
-
- // }}}
- // {{{ getShortName()
-
- /**
- * Returns the short name for this time zone
- *
- * Returns abbreviated form of time zone name, e.g. 'GMT'. Additionally
- * a Date object can be passed in which case the Summer time name will
- * be returned instead if the date falls in Summer time, e.g. 'BST'.
- *
- * N.B. this is not a unique identifier - for this purpose use the
- * time zone ID.
- *
- * @param mixed $pm_insummertime a boolean specifying whether or not the
- * date is in Summer time, or,
- * a Date object to test for this condition
- *
- * @return string the short name
- * @access public
- * @see Date_TimeZone::getLongName(), Date_TimeZone::getDSTShortName(),
- * Date::getTZShortName()
- */
- public function getShortName($pm_insummertime = false)
- {
- if ($this->hasdst) {
- if (is_a($pm_insummertime, "Date")) {
- $hb_insummertime = $pm_insummertime->inDaylightTime();
- if (PEAR::isError($hb_insummertime)) {
- return $hb_insummertime;
- }
- } else {
- $hb_insummertime = $pm_insummertime;
- }
-
- if ($hb_insummertime) {
- return $this->dstshortname;
- }
- }
-
- return $this->shortname;
- }
-
-
- // }}}
- // {{{ getDSTLongName()
-
- /**
- * Returns the DST long name for this time zone, e.g.
- * 'Central Daylight Time'
- *
- * @return string the daylight savings time long name
- * @access public
- * @see Date_TimeZone::getDSTShortName(), Date_TimeZone::getLongName()
- */
- public function getDSTLongName()
- {
- return $this->hasdst ? $this->dstlongname : $this->longname;
- }
-
-
- // }}}
- // {{{ getDSTShortName()
-
- /**
- * Returns the DST short name for this time zone, e.g. 'CDT'
- *
- * @return string the daylight savings time short name
- * @access public
- * @see Date_TimeZone::getDSTLongName(), Date_TimeZone::getShortName()
- */
- public function getDSTShortName()
- {
- return $this->hasdst ? $this->dstshortname : $this->shortname;
- }
-
-
- // }}}
- // {{{ getSummerTimeStartMonth()
-
- /**
- * Returns the month number in which Summer time starts
- *
- * @return int integer representing the month (1 to 12)
- * @access public
- * @see Date_TimeZone::getSummerTimeEndMonth(),
- * Date_TimeZone::getSummerTimeStartTime(),
- * Date_TimeZone::getSummerTimeStartDay()
- * @since Method available since Release 1.5.0
- */
- public function getSummerTimeStartMonth()
- {
- return $this->hasdst ? $this->on_summertimestartmonth : null;
- }
-
-
- // }}}
- // {{{ getSummerTimeStartDay()
-
- /**
- * Returns a code representing the day on which Summer time starts
- *
- * Returns a string in one of the following forms:
- *
- * - <b>5</b> - the fifth of the month
- * - <b>lastSun</b> - the last Sunday in the month
- * - <b>lastMon</b> - the last Monday in the month
- * - <b>Sun>=8</b> - first Sunday on or after the 8th
- * - <b>Sun<=25</b> - last Sunday on or before the 25th
- *
- * @return string
- * @access public
- * @see Date_TimeZone::getSummerTimeEndDay(),
- * Date_TimeZone::getSummerTimeStartTime(),
- * Date_TimeZone::getSummerTimeStartMonth(),
- * Date_TimeZone::getSummerTimeLimitDay()
- * @since Method available since Release 1.5.0
- */
- public function getSummerTimeStartDay()
- {
- return $this->hasdst ? $this->os_summertimestartday : null;
- }
-
-
- // }}}
- // {{{ getSummerTimeStartTime()
-
- /**
- * Returns the time of day at which which Summer time starts
- *
- * The returned time is an offset, in milliseconds, from midnight UTC. Note
- * that the offset can be negative, which represents the fact that the time
- * zone is East of Greenwich, and that when the clocks change locally, the
- * time in Greenwich is actually a time belonging to the previous day in
- * UTC. This, obviously, is unhelpful if you want to know the local time
- * at which the clocks change, but it is of immense value for the purpose
- * of calculation.
- *
- * @return int integer representing the month (1 to 12)
- * @access public
- * @see Date_TimeZone::getSummerTimeEndTime(),
- * Date_TimeZone::getSummerTimeStartDay(),
- * Date_TimeZone::getSummerTimeStartMonth()
- * @since Method available since Release 1.5.0
- */
- public function getSummerTimeStartTime()
- {
- return $this->hasdst ? $this->on_summertimestarttime : null;
- }
-
-
- // }}}
- // {{{ getSummerTimeEndMonth()
-
- /**
- * Returns the month number in which Summer time ends
- *
- * @return int integer representing the month (1 to 12)
- * @access public
- * @see Date_TimeZone::getSummerTimeStartMonth(),
- * Date_TimeZone::getSummerTimeEndTime(),
- * Date_TimeZone::getSummerTimeEndDay()
- * @since Method available since Release 1.5.0
- */
- public function getSummerTimeEndMonth()
- {
- return $this->hasdst ? $this->on_summertimeendmonth : null;
- }
-
-
- // }}}
- // {{{ getSummerTimeEndDay()
-
- /**
- * Returns a code representing the day on which Summer time ends
- *
- * Returns a string in one of the following forms:
- *
- * - <b>5</b> - the fifth of the month
- * - <b>lastSun</b> - the last Sunday in the month
- * - <b>lastMon</b> - the last Monday in the month
- * - <b>Sun>=8</b> - first Sunday on or after the 8th
- * - <b>Sun<=25</b> - last Sunday on or before the 25th
- *
- * @return string
- * @access public
- * @see Date_TimeZone::getSummerTimeStartDay(),
- * Date_TimeZone::getSummerTimeEndTime(),
- * Date_TimeZone::getSummerTimeEndMonth(),
- * Date_TimeZone::getSummerTimeLimitDay()
- * @since Method available since Release 1.5.0
- */
- public function getSummerTimeEndDay()
- {
- return $this->hasdst ? $this->os_summertimeendday : null;
- }
-
-
- // }}}
- // {{{ getSummerTimeEndTime()
-
- /**
- * Returns the time of day at which which Summer time ends
- *
- * @return int integer representing the month (1 to 12)
- * @access public
- * @see Date_TimeZone::getSummerTimeStartTime(),
- * Date_TimeZone::getSummerTimeEndDay(),
- * Date_TimeZone::getSummerTimeEndMonth()
- * @since Method available since Release 1.5.0
- */
- public function getSummerTimeEndTime()
- {
- return $this->hasdst ? $this->on_summertimeendtime : null;
- }
-
-
- // }}}
-}
-
-// }}}
-
-/**
- * Time Zone Data (correct as of 15.iii.2007)
- *
- * N.B. offsets are in milliseconds
- *
- * @global array $GLOBALS ['_DATE_TIMEZONE_DATA']
- */
-$GLOBALS['_DATE_TIMEZONE_DATA'] = array(
- 'Africa/Abidjan' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Accra' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Addis_Ababa' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Algiers' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => null,
- 'longname' => 'Central European Time'),
- 'Africa/Asmara' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Asmera' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Bamako' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Bangui' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Banjul' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Bissau' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Blantyre' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'dstshortname' => null,
- 'longname' => 'Central African Time'),
- 'Africa/Brazzaville' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Bujumbura' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'dstshortname' => null,
- 'longname' => 'Central African Time'),
- 'Africa/Cairo' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'lastFri',
- 'summertimestarttime' => -7200000,
- 'summertimeendmonth' => 8,
- 'summertimeendday' => 'lastThu',
- 'summertimeendtime' => 75600000),
- 'Africa/Casablanca' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => null,
- 'longname' => 'Western European Time'),
- 'Africa/Ceuta' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Africa/Conakry' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Dakar' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Dar_es_Salaam' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Djibouti' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Douala' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/El_Aaiun' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => null,
- 'longname' => 'Western European Time'),
- 'Africa/Freetown' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Gaborone' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'dstshortname' => null,
- 'longname' => 'Central African Time'),
- 'Africa/Harare' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'dstshortname' => null,
- 'longname' => 'Central African Time'),
- 'Africa/Johannesburg' => array(
- 'offset' => 7200000,
- 'shortname' => 'SAST',
- 'dstshortname' => null,
- 'longname' => 'South Africa Standard Time'),
- 'Africa/Kampala' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Khartoum' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Kigali' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'dstshortname' => null,
- 'longname' => 'Central African Time'),
- 'Africa/Kinshasa' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Lagos' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Libreville' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Lome' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Luanda' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Lubumbashi' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'dstshortname' => null,
- 'longname' => 'Central African Time'),
- 'Africa/Lusaka' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'dstshortname' => null,
- 'longname' => 'Central African Time'),
- 'Africa/Malabo' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Maputo' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'dstshortname' => null,
- 'longname' => 'Central African Time'),
- 'Africa/Maseru' => array(
- 'offset' => 7200000,
- 'shortname' => 'SAST',
- 'dstshortname' => null,
- 'longname' => 'South Africa Standard Time'),
- 'Africa/Mbabane' => array(
- 'offset' => 7200000,
- 'shortname' => 'SAST',
- 'dstshortname' => null,
- 'longname' => 'South Africa Standard Time'),
- 'Africa/Mogadishu' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Monrovia' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Nairobi' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Africa/Ndjamena' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Niamey' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Nouakchott' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Ouagadougou' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Porto-Novo' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => null,
- 'longname' => 'Western African Time'),
- 'Africa/Sao_Tome' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Timbuktu' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Africa/Tripoli' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => null,
- 'longname' => 'Eastern European Time'),
- 'Africa/Tunis' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Africa/Windhoek' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => 'WAST',
- 'longname' => 'Western African Time',
- 'dstlongname' => 'Western African Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 9,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 0),
- 'America/Adak' => array(
- 'offset' => -36000000,
- 'shortname' => 'HAST',
- 'dstshortname' => 'HADT',
- 'longname' => 'Hawaii-Aleutian Standard Time',
- 'dstlongname' => 'Hawaii-Aleutian Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 43200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 39600000),
- 'America/Anchorage' => array(
- 'offset' => -32400000,
- 'shortname' => 'AKST',
- 'dstshortname' => 'AKDT',
- 'longname' => 'Alaska Standard Time',
- 'dstlongname' => 'Alaska Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 39600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 36000000),
- 'America/Anguilla' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Antigua' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Araguaina' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => null,
- 'longname' => 'Brazil Time',
- 'dstlongname' => 'Brazil Summer Time'),
- 'America/Argentina/Buenos_Aires' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/Catamarca' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/ComodRivadavia' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/Cordoba' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/Jujuy' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/La_Rioja' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/Mendoza' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/Rio_Gallegos' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/San_Juan' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/Tucuman' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Argentina/Ushuaia' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentina Time',
- 'dstlongname' => 'Argentina Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Aruba' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Asuncion' => array(
- 'offset' => -14400000,
- 'shortname' => 'PYT',
- 'dstshortname' => 'PYST',
- 'longname' => 'Paraguay Time',
- 'dstlongname' => 'Paraguay Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=15',
- 'summertimestarttime' => 14400000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=8',
- 'summertimeendtime' => 10800000),
- 'America/Atikokan' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time'),
- 'America/Atka' => array(
- 'offset' => -36000000,
- 'shortname' => 'HAST',
- 'dstshortname' => 'HADT',
- 'longname' => 'Hawaii-Aleutian Standard Time',
- 'dstlongname' => 'Hawaii-Aleutian Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 43200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 39600000),
- 'America/Bahia' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => null,
- 'longname' => 'Brazil Eastern Time'),
- 'America/Barbados' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Belem' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => null,
- 'longname' => 'Brazil Time'),
- 'America/Belize' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'America/Blanc-Sablon' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Boa_Vista' => array(
- 'offset' => -14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => null,
- 'longname' => 'Amazon Standard Time'),
- 'America/Bogota' => array(
- 'offset' => -18000000,
- 'shortname' => 'COT',
- 'dstshortname' => null,
- 'longname' => 'Colombia Time'),
- 'America/Boise' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'America/Buenos_Aires' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentine Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Cambridge_Bay' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'America/Campo_Grande' => array(
- 'offset' => -14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => 'AMST',
- 'longname' => 'Amazon Standard Time',
- 'dstlongname' => 'Amazon Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 14400000,
- 'summertimeendmonth' => 2,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 10800000),
- 'America/Cancun' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 25200000),
- 'America/Caracas' => array(
- 'offset' => -16200000,
- 'shortname' => 'VET',
- 'dstshortname' => null,
- 'longname' => 'Venezuela Time'),
- 'America/Catamarca' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentine Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Cayenne' => array(
- 'offset' => -10800000,
- 'shortname' => 'GFT',
- 'dstshortname' => null,
- 'longname' => 'French Guiana Time'),
- 'America/Cayman' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time'),
- 'America/Chicago' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/Chihuahua' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 28800000),
- 'America/Coral_Harbour' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time'),
- 'America/Cordoba' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentine Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Costa_Rica' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'America/Cuiaba' => array(
- 'offset' => -14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => 'AMST',
- 'longname' => 'Amazon Standard Time',
- 'dstlongname' => 'Amazon Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 14400000,
- 'summertimeendmonth' => 2,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 10800000),
- 'America/Curacao' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Danmarkshavn' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'America/Dawson' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'America/Dawson_Creek' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => null,
- 'longname' => 'Mountain Standard Time'),
- 'America/Denver' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'America/Detroit' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Dominica' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Edmonton' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'America/Eirunepe' => array(
- 'offset' => -18000000,
- 'shortname' => 'ACT',
- 'dstshortname' => null,
- 'longname' => 'Acre Time'),
- 'America/El_Salvador' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'America/Ensenada' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 32400000),
- 'America/Fort_Wayne' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Fortaleza' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => null,
- 'longname' => 'Brazil Time',
- 'dstlongname' => 'Brazil Summer Time'),
- 'America/Glace_Bay' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'dstlongname' => 'Atlantic Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 21600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 18000000),
- 'America/Godthab' => array(
- 'offset' => -10800000,
- 'shortname' => 'WGT',
- 'dstshortname' => 'WGST',
- 'longname' => 'Western Greenland Time',
- 'dstlongname' => 'Western Greenland Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'America/Goose_Bay' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'dstlongname' => 'Atlantic Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 14460000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 10860000),
- 'America/Grand_Turk' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Grenada' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Guadeloupe' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Guatemala' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'America/Guayaquil' => array(
- 'offset' => -18000000,
- 'shortname' => 'ECT',
- 'dstshortname' => null,
- 'longname' => 'Ecuador Time'),
- 'America/Guyana' => array(
- 'offset' => -14400000,
- 'shortname' => 'GYT',
- 'dstshortname' => null,
- 'longname' => 'Guyana Time'),
- 'America/Halifax' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'dstlongname' => 'Atlantic Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 21600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 18000000),
- 'America/Havana' => array(
- 'offset' => -18000000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 18000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 18000000),
- 'America/Hermosillo' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => null,
- 'longname' => 'Mountain Standard Time'),
- 'America/Indiana/Indianapolis' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Indiana/Knox' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/Indiana/Marengo' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Indiana/Petersburg' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Indiana/Tell_City' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/Indiana/Vevay' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Indiana/Vincennes' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Indiana/Winamac' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Indianapolis' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Inuvik' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'America/Iqaluit' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Jamaica' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time'),
- 'America/Jujuy' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentine Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Juneau' => array(
- 'offset' => -32400000,
- 'shortname' => 'AKST',
- 'dstshortname' => 'AKDT',
- 'longname' => 'Alaska Standard Time',
- 'dstlongname' => 'Alaska Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 39600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 36000000),
- 'America/Kentucky/Louisville' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Kentucky/Monticello' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Knox_IN' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/La_Paz' => array(
- 'offset' => -14400000,
- 'shortname' => 'BOT',
- 'dstshortname' => null,
- 'longname' => 'Bolivia Time'),
- 'America/Lima' => array(
- 'offset' => -18000000,
- 'shortname' => 'PET',
- 'dstshortname' => null,
- 'longname' => 'Peru Time'),
- 'America/Los_Angeles' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'America/Louisville' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Maceio' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => null,
- 'longname' => 'Brazil Time',
- 'dstlongname' => 'Brazil Summer Time'),
- 'America/Managua' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'America/Manaus' => array(
- 'offset' => -14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => null,
- 'longname' => 'Amazon Standard Time'),
- 'America/Marigot' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Martinique' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Mazatlan' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 28800000),
- 'America/Mendoza' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentine Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Menominee' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/Merida' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 25200000),
- 'America/Mexico_City' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 25200000),
- 'America/Miquelon' => array(
- 'offset' => -10800000,
- 'shortname' => 'PMST',
- 'dstshortname' => 'PMDT',
- 'longname' => 'Pierre & Miquelon Standard Time',
- 'dstlongname' => 'Pierre & Miquelon Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 18000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 14400000),
- 'America/Moncton' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'dstlongname' => 'Atlantic Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 21600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 18000000),
- 'America/Monterrey' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 25200000),
- 'America/Montevideo' => array(
- 'offset' => -10800000,
- 'shortname' => 'UYT',
- 'dstshortname' => 'UYST',
- 'longname' => 'Uruguay Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 18000000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=8',
- 'summertimeendtime' => 14400000),
- 'America/Montreal' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Montserrat' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Nassau' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/New_York' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Nipigon' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Nome' => array(
- 'offset' => -32400000,
- 'shortname' => 'AKST',
- 'dstshortname' => 'AKDT',
- 'longname' => 'Alaska Standard Time',
- 'dstlongname' => 'Alaska Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 39600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 36000000),
- 'America/Noronha' => array(
- 'offset' => -7200000,
- 'shortname' => 'FNT',
- 'dstshortname' => null,
- 'longname' => 'Fernando de Noronha Time'),
- 'America/North_Dakota/Center' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/North_Dakota/New_Salem' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/Panama' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time'),
- 'America/Pangnirtung' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Paramaribo' => array(
- 'offset' => -10800000,
- 'shortname' => 'SRT',
- 'dstshortname' => null,
- 'longname' => 'Suriname Time'),
- 'America/Phoenix' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => null,
- 'longname' => 'Mountain Standard Time'),
- 'America/Port-au-Prince' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time'),
- 'America/Port_of_Spain' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Porto_Acre' => array(
- 'offset' => -18000000,
- 'shortname' => 'ACT',
- 'dstshortname' => null,
- 'longname' => 'Acre Time'),
- 'America/Porto_Velho' => array(
- 'offset' => -14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => null,
- 'longname' => 'Amazon Standard Time'),
- 'America/Puerto_Rico' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Rainy_River' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/Rankin_Inlet' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/Recife' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => null,
- 'longname' => 'Brazil Time',
- 'dstlongname' => 'Brazil Summer Time'),
- 'America/Regina' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'America/Resolute' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time'),
- 'America/Rio_Branco' => array(
- 'offset' => -18000000,
- 'shortname' => 'ACT',
- 'dstshortname' => null,
- 'longname' => 'Acre Time'),
- 'America/Rosario' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'dstshortname' => 'ARST',
- 'longname' => 'Argentine Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 0),
- 'America/Santiago' => array(
- 'offset' => -14400000,
- 'shortname' => 'CLT',
- 'dstshortname' => 'CLST',
- 'longname' => 'Chile Time',
- 'dstlongname' => 'Chile Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=9',
- 'summertimestarttime' => 14400000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => '30',
- 'summertimeendtime' => 10800000),
- 'America/Santo_Domingo' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Sao_Paulo' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => 'BRST',
- 'longname' => 'Brazil Time',
- 'dstlongname' => 'Brazil Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 10800000,
- 'summertimeendmonth' => 2,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 7200000),
- 'America/Scoresbysund' => array(
- 'offset' => -3600000,
- 'shortname' => 'EGT',
- 'dstshortname' => 'EGST',
- 'longname' => 'Eastern Greenland Time',
- 'dstlongname' => 'Eastern Greenland Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'America/Shiprock' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'America/St_Barthelemy' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/St_Johns' => array(
- 'offset' => -12600000,
- 'shortname' => 'NST',
- 'dstshortname' => 'NDT',
- 'longname' => 'Newfoundland Standard Time',
- 'dstlongname' => 'Newfoundland Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 12660000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 9060000),
- 'America/St_Kitts' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/St_Lucia' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/St_Thomas' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/St_Vincent' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Swift_Current' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'America/Tegucigalpa' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'America/Thule' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 21600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 18000000),
- 'America/Thunder_Bay' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Tijuana' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 32400000),
- 'America/Toronto' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'America/Tortola' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Vancouver' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'America/Virgin' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Atlantic Standard Time'),
- 'America/Whitehorse' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'America/Winnipeg' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'America/Yakutat' => array(
- 'offset' => -32400000,
- 'shortname' => 'AKST',
- 'dstshortname' => 'AKDT',
- 'longname' => 'Alaska Standard Time',
- 'dstlongname' => 'Alaska Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 39600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 36000000),
- 'America/Yellowknife' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'Antarctica/Casey' => array(
- 'offset' => 28800000,
- 'shortname' => 'WST',
- 'dstshortname' => null,
- 'longname' => 'Western Standard Time (Australia)'),
- 'Antarctica/Davis' => array(
- 'offset' => 25200000,
- 'shortname' => 'DAVT',
- 'dstshortname' => null,
- 'longname' => 'Davis Time'),
- 'Antarctica/DumontDUrville' => array(
- 'offset' => 36000000,
- 'shortname' => 'DDUT',
- 'dstshortname' => null,
- 'longname' => 'Dumont-d\'Urville Time'),
- 'Antarctica/Mawson' => array(
- 'offset' => 21600000,
- 'shortname' => 'MAWT',
- 'dstshortname' => null,
- 'longname' => 'Mawson Time'),
- 'Antarctica/McMurdo' => array(
- 'offset' => 43200000,
- 'shortname' => 'NZST',
- 'dstshortname' => 'NZDT',
- 'longname' => 'New Zealand Standard Time',
- 'dstlongname' => 'New Zealand Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 9,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -36000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -36000000),
- 'Antarctica/Palmer' => array(
- 'offset' => -14400000,
- 'shortname' => 'CLT',
- 'dstshortname' => 'CLST',
- 'longname' => 'Chile Time',
- 'dstlongname' => 'Chile Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=9',
- 'summertimestarttime' => 14400000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'Sun>=9',
- 'summertimeendtime' => 10800000),
- 'Antarctica/Rothera' => array(
- 'offset' => -10800000,
- 'shortname' => 'ROTT',
- 'dstshortname' => null,
- 'longname' => 'Rothera Time'),
- 'Antarctica/South_Pole' => array(
- 'offset' => 43200000,
- 'shortname' => 'NZST',
- 'dstshortname' => 'NZDT',
- 'longname' => 'New Zealand Standard Time',
- 'dstlongname' => 'New Zealand Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 9,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -36000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -36000000),
- 'Antarctica/Syowa' => array(
- 'offset' => 10800000,
- 'shortname' => 'SYOT',
- 'dstshortname' => null,
- 'longname' => 'Syowa Time'),
- 'Antarctica/Vostok' => array(
- 'offset' => 21600000,
- 'shortname' => 'VOST',
- 'dstshortname' => null,
- 'longname' => 'Vostok time'),
- 'Arctic/Longyearbyen' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Asia/Aden' => array(
- 'offset' => 10800000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Arabia Standard Time'),
- 'Asia/Almaty' => array(
- 'offset' => 21600000,
- 'shortname' => 'ALMT',
- 'dstshortname' => null,
- 'longname' => 'Alma-Ata Time',
- 'dstlongname' => 'Alma-Ata Summer Time'),
- 'Asia/Amman' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastThu',
- 'summertimestarttime' => -7200000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastFri',
- 'summertimeendtime' => -7200000),
- 'Asia/Anadyr' => array(
- 'offset' => 43200000,
- 'shortname' => 'ANAT',
- 'dstshortname' => 'ANAST',
- 'longname' => 'Anadyr Time',
- 'dstlongname' => 'Anadyr Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -36000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -36000000),
- 'Asia/Aqtau' => array(
- 'offset' => 18000000,
- 'shortname' => 'AQTT',
- 'dstshortname' => null,
- 'longname' => 'Aqtau Time',
- 'dstlongname' => 'Aqtau Summer Time'),
- 'Asia/Aqtobe' => array(
- 'offset' => 18000000,
- 'shortname' => 'AQTT',
- 'dstshortname' => null,
- 'longname' => 'Aqtobe Time',
- 'dstlongname' => 'Aqtobe Summer Time'),
- 'Asia/Ashgabat' => array(
- 'offset' => 18000000,
- 'shortname' => 'TMT',
- 'dstshortname' => null,
- 'longname' => 'Turkmenistan Time'),
- 'Asia/Ashkhabad' => array(
- 'offset' => 18000000,
- 'shortname' => 'TMT',
- 'dstshortname' => null,
- 'longname' => 'Turkmenistan Time'),
- 'Asia/Baghdad' => array(
- 'offset' => 10800000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Arabia Standard Time',
- 'dstlongname' => 'Arabia Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => '1',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => '1',
- 'summertimeendtime' => 0),
- 'Asia/Bahrain' => array(
- 'offset' => 10800000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Arabia Standard Time'),
- 'Asia/Baku' => array(
- 'offset' => 14400000,
- 'shortname' => 'AZT',
- 'dstshortname' => 'AZST',
- 'longname' => 'Azerbaijan Time',
- 'dstlongname' => 'Azerbaijan Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 0),
- 'Asia/Bangkok' => array(
- 'offset' => 25200000,
- 'shortname' => 'ICT',
- 'dstshortname' => null,
- 'longname' => 'Indochina Time'),
- 'Asia/Beirut' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -7200000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -10800000),
- 'Asia/Bishkek' => array(
- 'offset' => 21600000,
- 'shortname' => 'KGT',
- 'dstshortname' => null,
- 'longname' => 'Kirgizstan Time',
- 'dstlongname' => 'Kirgizstan Summer Time'),
- 'Asia/Brunei' => array(
- 'offset' => 28800000,
- 'shortname' => 'BNT',
- 'dstshortname' => null,
- 'longname' => 'Brunei Time'),
- 'Asia/Calcutta' => array(
- 'offset' => 19800000,
- 'shortname' => 'IST',
- 'dstshortname' => null,
- 'longname' => 'India Standard Time'),
- 'Asia/Choibalsan' => array(
- 'offset' => 32400000,
- 'shortname' => 'CHOT',
- 'dstshortname' => null,
- 'longname' => 'Choibalsan Time'),
- 'Asia/Chongqing' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Chungking' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Colombo' => array(
- 'offset' => 19800000,
- 'shortname' => 'IST',
- 'dstshortname' => null,
- 'longname' => 'India Standard Time'),
- 'Asia/Dacca' => array(
- 'offset' => 21600000,
- 'shortname' => 'BDT',
- 'dstshortname' => null,
- 'longname' => 'Bangladesh Time'),
- 'Asia/Damascus' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastFri',
- 'summertimestarttime' => -7200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Fri>=1',
- 'summertimeendtime' => -10800000),
- 'Asia/Dhaka' => array(
- 'offset' => 21600000,
- 'shortname' => 'BDT',
- 'dstshortname' => null,
- 'longname' => 'Bangladesh Time'),
- 'Asia/Dili' => array(
- 'offset' => 32400000,
- 'shortname' => 'TLT',
- 'dstshortname' => null,
- 'longname' => 'East Timor Time'),
- 'Asia/Dubai' => array(
- 'offset' => 14400000,
- 'shortname' => 'GST',
- 'dstshortname' => null,
- 'longname' => 'Gulf Standard Time'),
- 'Asia/Dushanbe' => array(
- 'offset' => 18000000,
- 'shortname' => 'TJT',
- 'dstshortname' => null,
- 'longname' => 'Tajikistan Time'),
- 'Asia/Gaza' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => '1',
- 'summertimestarttime' => -7200000,
- 'summertimeendmonth' => 9,
- 'summertimeendday' => 'Thu>=8',
- 'summertimeendtime' => -3600000),
- 'Asia/Harbin' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Hong_Kong' => array(
- 'offset' => 28800000,
- 'shortname' => 'HKT',
- 'dstshortname' => null,
- 'longname' => 'Hong Kong Time'),
- 'Asia/Hovd' => array(
- 'offset' => 25200000,
- 'shortname' => 'HOVT',
- 'dstshortname' => null,
- 'longname' => 'Hovd Time'),
- 'Asia/Irkutsk' => array(
- 'offset' => 28800000,
- 'shortname' => 'IRKT',
- 'dstshortname' => 'IRKST',
- 'longname' => 'Irkutsk Time',
- 'dstlongname' => 'Irkutsk Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -21600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -21600000),
- 'Asia/Istanbul' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Asia/Jakarta' => array(
- 'offset' => 25200000,
- 'shortname' => 'WIT',
- 'dstshortname' => null,
- 'longname' => 'West Indonesia Time'),
- 'Asia/Jayapura' => array(
- 'offset' => 32400000,
- 'shortname' => 'EIT',
- 'dstshortname' => null,
- 'longname' => 'East Indonesia Time'),
- 'Asia/Jerusalem' => array(
- 'offset' => 7200000,
- 'shortname' => 'IST',
- 'dstshortname' => 'IDT',
- 'longname' => 'Israel Standard Time',
- 'dstlongname' => 'Israel Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Fri>=26',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => '5',
- 'summertimeendtime' => -3600000),
- 'Asia/Kabul' => array(
- 'offset' => 16200000,
- 'shortname' => 'AFT',
- 'dstshortname' => null,
- 'longname' => 'Afghanistan Time'),
- 'Asia/Kamchatka' => array(
- 'offset' => 43200000,
- 'shortname' => 'PETT',
- 'dstshortname' => 'PETST',
- 'longname' => 'Petropavlovsk-Kamchatski Time',
- 'dstlongname' => 'Petropavlovsk-Kamchatski Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -36000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -36000000),
- 'Asia/Karachi' => array(
- 'offset' => 18000000,
- 'shortname' => 'PKT',
- 'dstshortname' => null,
- 'longname' => 'Pakistan Time'),
- 'Asia/Kashgar' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Katmandu' => array(
- 'offset' => 20700000,
- 'shortname' => 'NPT',
- 'dstshortname' => null,
- 'longname' => 'Nepal Time'),
- 'Asia/Krasnoyarsk' => array(
- 'offset' => 25200000,
- 'shortname' => 'KRAT',
- 'dstshortname' => 'KRAST',
- 'longname' => 'Krasnoyarsk Time',
- 'dstlongname' => 'Krasnoyarsk Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -18000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -18000000),
- 'Asia/Kuala_Lumpur' => array(
- 'offset' => 28800000,
- 'shortname' => 'MYT',
- 'dstshortname' => null,
- 'longname' => 'Malaysia Time'),
- 'Asia/Kuching' => array(
- 'offset' => 28800000,
- 'shortname' => 'MYT',
- 'dstshortname' => null,
- 'longname' => 'Malaysia Time'),
- 'Asia/Kuwait' => array(
- 'offset' => 10800000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Arabia Standard Time'),
- 'Asia/Macao' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Macau' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Magadan' => array(
- 'offset' => 39600000,
- 'shortname' => 'MAGT',
- 'dstshortname' => 'MAGST',
- 'longname' => 'Magadan Time',
- 'dstlongname' => 'Magadan Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -32400000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -32400000),
- 'Asia/Makassar' => array(
- 'offset' => 28800000,
- 'shortname' => 'CIT',
- 'dstshortname' => null,
- 'longname' => 'Central Indonesia Time'),
- 'Asia/Manila' => array(
- 'offset' => 28800000,
- 'shortname' => 'PHT',
- 'dstshortname' => null,
- 'longname' => 'Philippines Time'),
- 'Asia/Muscat' => array(
- 'offset' => 14400000,
- 'shortname' => 'GST',
- 'dstshortname' => null,
- 'longname' => 'Gulf Standard Time'),
- 'Asia/Nicosia' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Asia/Novosibirsk' => array(
- 'offset' => 21600000,
- 'shortname' => 'NOVT',
- 'dstshortname' => 'NOVST',
- 'longname' => 'Novosibirsk Time',
- 'dstlongname' => 'Novosibirsk Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -14400000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -14400000),
- 'Asia/Omsk' => array(
- 'offset' => 21600000,
- 'shortname' => 'OMST',
- 'dstshortname' => 'OMSST',
- 'longname' => 'Omsk Time',
- 'dstlongname' => 'Omsk Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -14400000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -14400000),
- 'Asia/Oral' => array(
- 'offset' => 18000000,
- 'shortname' => 'ORAT',
- 'dstshortname' => null,
- 'longname' => 'Oral Time'),
- 'Asia/Phnom_Penh' => array(
- 'offset' => 25200000,
- 'shortname' => 'ICT',
- 'dstshortname' => null,
- 'longname' => 'Indochina Time'),
- 'Asia/Pontianak' => array(
- 'offset' => 25200000,
- 'shortname' => 'WIT',
- 'dstshortname' => null,
- 'longname' => 'West Indonesia Time'),
- 'Asia/Pyongyang' => array(
- 'offset' => 32400000,
- 'shortname' => 'KST',
- 'dstshortname' => null,
- 'longname' => 'Korea Standard Time'),
- 'Asia/Qatar' => array(
- 'offset' => 10800000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Arabia Standard Time'),
- 'Asia/Qyzylorda' => array(
- 'offset' => 21600000,
- 'shortname' => 'QYZT',
- 'dstshortname' => null,
- 'longname' => 'Qyzylorda Time'),
- 'Asia/Rangoon' => array(
- 'offset' => 23400000,
- 'shortname' => 'MMT',
- 'dstshortname' => null,
- 'longname' => 'Myanmar Time'),
- 'Asia/Riyadh' => array(
- 'offset' => 10800000,
- 'shortname' => 'AST',
- 'dstshortname' => null,
- 'longname' => 'Arabia Standard Time'),
- 'Asia/Riyadh87' => array(
- 'offset' => 11224000,
- 'shortname' => '',
- 'dstshortname' => null,
- 'longname' => 'GMT+03:07'),
- 'Asia/Riyadh88' => array(
- 'offset' => 11224000,
- 'shortname' => '',
- 'dstshortname' => null,
- 'longname' => 'GMT+03:07'),
- 'Asia/Riyadh89' => array(
- 'offset' => 11224000,
- 'shortname' => '',
- 'dstshortname' => null,
- 'longname' => 'GMT+03:07'),
- 'Asia/Saigon' => array(
- 'offset' => 25200000,
- 'shortname' => 'ICT',
- 'dstshortname' => null,
- 'longname' => 'Indochina Time'),
- 'Asia/Sakhalin' => array(
- 'offset' => 36000000,
- 'shortname' => 'SAKT',
- 'dstshortname' => 'SAKST',
- 'longname' => 'Sakhalin Time',
- 'dstlongname' => 'Sakhalin Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -28800000),
- 'Asia/Samarkand' => array(
- 'offset' => 18000000,
- 'shortname' => 'UZT',
- 'dstshortname' => null,
- 'longname' => 'Turkmenistan Time'),
- 'Asia/Seoul' => array(
- 'offset' => 32400000,
- 'shortname' => 'KST',
- 'dstshortname' => null,
- 'longname' => 'Korea Standard Time'),
- 'Asia/Shanghai' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Singapore' => array(
- 'offset' => 28800000,
- 'shortname' => 'SGT',
- 'dstshortname' => null,
- 'longname' => 'Singapore Time'),
- 'Asia/Taipei' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Tashkent' => array(
- 'offset' => 18000000,
- 'shortname' => 'UZT',
- 'dstshortname' => null,
- 'longname' => 'Uzbekistan Time'),
- 'Asia/Tbilisi' => array(
- 'offset' => 14400000,
- 'shortname' => 'GET',
- 'dstshortname' => null,
- 'longname' => 'Georgia Time',
- 'dstlongname' => 'Georgia Summer Time'),
- 'Asia/Tehran' => array(
- 'offset' => 12600000,
- 'shortname' => 'IRST',
- 'dstshortname' => 'IRDT',
- 'longname' => 'Iran Time',
- 'dstlongname' => 'Iran Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => '21',
- 'summertimestarttime' => -12600000,
- 'summertimeendmonth' => 9,
- 'summertimeendday' => '21',
- 'summertimeendtime' => -16200000),
- 'Asia/Tel_Aviv' => array(
- 'offset' => 7200000,
- 'shortname' => 'IST',
- 'dstshortname' => 'IDT',
- 'longname' => 'Israel Standard Time',
- 'dstlongname' => 'Israel Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Fri>=26',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => '5',
- 'summertimeendtime' => -3600000),
- 'Asia/Thimbu' => array(
- 'offset' => 21600000,
- 'shortname' => 'BTT',
- 'dstshortname' => null,
- 'longname' => 'Bhutan Time'),
- 'Asia/Thimphu' => array(
- 'offset' => 21600000,
- 'shortname' => 'BTT',
- 'dstshortname' => null,
- 'longname' => 'Bhutan Time'),
- 'Asia/Tokyo' => array(
- 'offset' => 32400000,
- 'shortname' => 'JST',
- 'dstshortname' => null,
- 'longname' => 'Japan Standard Time'),
- 'Asia/Ujung_Pandang' => array(
- 'offset' => 28800000,
- 'shortname' => 'CIT',
- 'dstshortname' => null,
- 'longname' => 'Central Indonesia Time'),
- 'Asia/Ulaanbaatar' => array(
- 'offset' => 28800000,
- 'shortname' => 'ULAT',
- 'dstshortname' => null,
- 'longname' => 'Ulaanbaatar Time'),
- 'Asia/Ulan_Bator' => array(
- 'offset' => 28800000,
- 'shortname' => 'ULAT',
- 'dstshortname' => null,
- 'longname' => 'Ulaanbaatar Time'),
- 'Asia/Urumqi' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'Asia/Vientiane' => array(
- 'offset' => 25200000,
- 'shortname' => 'ICT',
- 'dstshortname' => null,
- 'longname' => 'Indochina Time'),
- 'Asia/Vladivostok' => array(
- 'offset' => 36000000,
- 'shortname' => 'VLAT',
- 'dstshortname' => 'VLAST',
- 'longname' => 'Vladivostok Time',
- 'dstlongname' => 'Vladivostok Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -28800000),
- 'Asia/Yakutsk' => array(
- 'offset' => 32400000,
- 'shortname' => 'YAKT',
- 'dstshortname' => 'YAKST',
- 'longname' => 'Yakutsk Time',
- 'dstlongname' => 'Yaktsk Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -25200000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -25200000),
- 'Asia/Yekaterinburg' => array(
- 'offset' => 18000000,
- 'shortname' => 'YEKT',
- 'dstshortname' => 'YEKST',
- 'longname' => 'Yekaterinburg Time',
- 'dstlongname' => 'Yekaterinburg Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -10800000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -10800000),
- 'Asia/Yerevan' => array(
- 'offset' => 14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => 'AMST',
- 'longname' => 'Armenia Time',
- 'dstlongname' => 'Armenia Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -7200000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -7200000),
- 'Atlantic/Azores' => array(
- 'offset' => -3600000,
- 'shortname' => 'AZOT',
- 'dstshortname' => 'AZOST',
- 'longname' => 'Azores Time',
- 'dstlongname' => 'Azores Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Atlantic/Bermuda' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'dstlongname' => 'Atlantic Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 21600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 18000000),
- 'Atlantic/Canary' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => 'WEST',
- 'longname' => 'Western European Time',
- 'dstlongname' => 'Western European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Atlantic/Cape_Verde' => array(
- 'offset' => -3600000,
- 'shortname' => 'CVT',
- 'dstshortname' => null,
- 'longname' => 'Cape Verde Time'),
- 'Atlantic/Faeroe' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => 'WEST',
- 'longname' => 'Western European Time',
- 'dstlongname' => 'Western European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Atlantic/Faroe' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => 'WEST',
- 'longname' => 'Western Europe Time',
- 'dstlongname' => 'Western Europe Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Atlantic/Jan_Mayen' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Eastern Greenland Time',
- 'dstlongname' => 'Eastern Greenland Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Atlantic/Madeira' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => 'WEST',
- 'longname' => 'Western European Time',
- 'dstlongname' => 'Western European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Atlantic/Reykjavik' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Atlantic/South_Georgia' => array(
- 'offset' => -7200000,
- 'shortname' => 'GST',
- 'dstshortname' => null,
- 'longname' => 'South Georgia Standard Time'),
- 'Atlantic/St_Helena' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Atlantic/Stanley' => array(
- 'offset' => -14400000,
- 'shortname' => 'FKT',
- 'dstshortname' => 'FKST',
- 'longname' => 'Falkland Is. Time',
- 'dstlongname' => 'Falkland Is. Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 9,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 7200000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 7200000),
- 'Australia/ACT' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (New South Wales)',
- 'dstlongname' => 'Eastern Summer Time (New South Wales)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/Adelaide' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CST',
- 'longname' => 'Central Standard Time (South Australia)',
- 'dstlongname' => 'Central Summer Time (South Australia)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -27000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -27000000),
- 'Australia/Brisbane' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time (Queensland)'),
- 'Australia/Broken_Hill' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CST',
- 'longname' => 'Central Standard Time (South Australia/New South Wales)',
- 'dstlongname' => 'Central Summer Time (South Australia/New South Wales)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -27000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -27000000),
- 'Australia/Canberra' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (New South Wales)',
- 'dstlongname' => 'Eastern Summer Time (New South Wales)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/Currie' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Standard Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/Darwin' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time (Northern Territory)'),
- 'Australia/Eucla' => array(
- 'offset' => 31500000,
- 'shortname' => 'CWST',
- 'dstshortname' => 'CWST',
- 'longname' => 'Central Western Standard Time',
- 'dstlongname' => 'Central Western Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -24300000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -24300000),
- 'Australia/Hobart' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (Tasmania)',
- 'dstlongname' => 'Eastern Summer Time (Tasmania)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/LHI' => array(
- 'offset' => 37800000,
- 'shortname' => 'LHST',
- 'dstshortname' => 'LHST',
- 'longname' => 'Load Howe Standard Time',
- 'dstlongname' => 'Load Howe Summer Time',
- 'summertimeoffset' => 1800000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 7200000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 7200000),
- 'Australia/Lindeman' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time (Queensland)'),
- 'Australia/Lord_Howe' => array(
- 'offset' => 37800000,
- 'shortname' => 'LHST',
- 'dstshortname' => 'LHST',
- 'longname' => 'Load Howe Standard Time',
- 'dstlongname' => 'Load Howe Summer Time',
- 'summertimeoffset' => 1800000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 7200000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 7200000),
- 'Australia/Melbourne' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (Victoria)',
- 'dstlongname' => 'Eastern Summer Time (Victoria)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/NSW' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (New South Wales)',
- 'dstlongname' => 'Eastern Summer Time (New South Wales)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/North' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time (Northern Territory)'),
- 'Australia/Perth' => array(
- 'offset' => 28800000,
- 'shortname' => 'WST',
- 'dstshortname' => 'WST',
- 'longname' => 'Western Standard Time (Australia)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -21600000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -21600000),
- 'Australia/Queensland' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time (Queensland)'),
- 'Australia/South' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CST',
- 'longname' => 'Central Standard Time (South Australia)',
- 'dstlongname' => 'Central Summer Time (South Australia)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -27000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -27000000),
- 'Australia/Sydney' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (New South Wales)',
- 'dstlongname' => 'Eastern Summer Time (New South Wales)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/Tasmania' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (Tasmania)',
- 'dstlongname' => 'Eastern Summer Time (Tasmania)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/Victoria' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (Victoria)',
- 'dstlongname' => 'Eastern Summer Time (Victoria)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -28800000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -28800000),
- 'Australia/West' => array(
- 'offset' => 28800000,
- 'shortname' => 'WST',
- 'dstshortname' => 'WST',
- 'longname' => 'Western Standard Time (Australia)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -21600000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -21600000),
- 'Australia/Yancowinna' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CST',
- 'longname' => 'Central Standard Time (South Australia/New South Wales)',
- 'dstlongname' => 'Central Summer Time (South Australia/New South Wales)',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => -27000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -27000000),
- 'Brazil/Acre' => array(
- 'offset' => -18000000,
- 'shortname' => 'ACT',
- 'dstshortname' => null,
- 'longname' => 'Acre Time'),
- 'Brazil/DeNoronha' => array(
- 'offset' => -7200000,
- 'shortname' => 'FNT',
- 'dstshortname' => null,
- 'longname' => 'Fernando de Noronha Time'),
- 'Brazil/East' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => 'BRST',
- 'longname' => 'Brazil Time',
- 'dstlongname' => 'Brazil Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 10800000,
- 'summertimeendmonth' => 2,
- 'summertimeendday' => 'Sun>=15',
- 'summertimeendtime' => 7200000),
- 'Brazil/West' => array(
- 'offset' => -14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => null,
- 'longname' => 'Amazon Standard Time'),
- 'CET' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'CST6CDT' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'Canada/Atlantic' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'dstlongname' => 'Atlantic Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 21600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 18000000),
- 'Canada/Central' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'Canada/East-Saskatchewan' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'Canada/Eastern' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'Canada/Mountain' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'Canada/Newfoundland' => array(
- 'offset' => -12600000,
- 'shortname' => 'NST',
- 'dstshortname' => 'NDT',
- 'longname' => 'Newfoundland Standard Time',
- 'dstlongname' => 'Newfoundland Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 12660000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 9060000),
- 'Canada/Pacific' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'Canada/Saskatchewan' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'Central Standard Time'),
- 'Canada/Yukon' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'Chile/Continental' => array(
- 'offset' => -14400000,
- 'shortname' => 'CLT',
- 'dstshortname' => 'CLST',
- 'longname' => 'Chile Time',
- 'dstlongname' => 'Chile Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=9',
- 'summertimestarttime' => 14400000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => '30',
- 'summertimeendtime' => 10800000),
- 'Chile/EasterIsland' => array(
- 'offset' => -21600000,
- 'shortname' => 'EAST',
- 'dstshortname' => 'EASST',
- 'longname' => 'Easter Is. Time',
- 'dstlongname' => 'Easter Is. Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=9',
- 'summertimestarttime' => 14400000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => '30',
- 'summertimeendtime' => 10800000),
- 'Cuba' => array(
- 'offset' => -18000000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 18000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 18000000),
- 'EET' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'EST' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time'),
- 'EST5EDT' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'Egypt' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'lastFri',
- 'summertimestarttime' => -7200000,
- 'summertimeendmonth' => 8,
- 'summertimeendday' => 'lastThu',
- 'summertimeendtime' => 75600000),
- 'Eire' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'IST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'Irish Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Etc/GMT' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'GMT+00:00'),
- 'Etc/GMT+0' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'GMT+00:00'),
- 'Etc/GMT+1' => array(
- 'offset' => -3600000,
- 'shortname' => 'GMT+1',
- 'dstshortname' => null,
- 'longname' => 'GMT-01:00'),
- 'Etc/GMT+10' => array(
- 'offset' => -36000000,
- 'shortname' => 'GMT+10',
- 'dstshortname' => null,
- 'longname' => 'GMT-10:00'),
- 'Etc/GMT+11' => array(
- 'offset' => -39600000,
- 'shortname' => 'GMT+11',
- 'dstshortname' => null,
- 'longname' => 'GMT-11:00'),
- 'Etc/GMT+12' => array(
- 'offset' => -43200000,
- 'shortname' => 'GMT+12',
- 'dstshortname' => null,
- 'longname' => 'GMT-12:00'),
- 'Etc/GMT+2' => array(
- 'offset' => -7200000,
- 'shortname' => 'GMT+2',
- 'dstshortname' => null,
- 'longname' => 'GMT-02:00'),
- 'Etc/GMT+3' => array(
- 'offset' => -10800000,
- 'shortname' => 'GMT+3',
- 'dstshortname' => null,
- 'longname' => 'GMT-03:00'),
- 'Etc/GMT+4' => array(
- 'offset' => -14400000,
- 'shortname' => 'GMT+4',
- 'dstshortname' => null,
- 'longname' => 'GMT-04:00'),
- 'Etc/GMT+5' => array(
- 'offset' => -18000000,
- 'shortname' => 'GMT+5',
- 'dstshortname' => null,
- 'longname' => 'GMT-05:00'),
- 'Etc/GMT+6' => array(
- 'offset' => -21600000,
- 'shortname' => 'GMT+6',
- 'dstshortname' => null,
- 'longname' => 'GMT-06:00'),
- 'Etc/GMT+7' => array(
- 'offset' => -25200000,
- 'shortname' => 'GMT+7',
- 'dstshortname' => null,
- 'longname' => 'GMT-07:00'),
- 'Etc/GMT+8' => array(
- 'offset' => -28800000,
- 'shortname' => 'GMT+8',
- 'dstshortname' => null,
- 'longname' => 'GMT-08:00'),
- 'Etc/GMT+9' => array(
- 'offset' => -32400000,
- 'shortname' => 'GMT+9',
- 'dstshortname' => null,
- 'longname' => 'GMT-09:00'),
- 'Etc/GMT-0' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'GMT+00:00'),
- 'Etc/GMT-1' => array(
- 'offset' => 3600000,
- 'shortname' => 'GMT-1',
- 'dstshortname' => null,
- 'longname' => 'GMT+01:00'),
- 'Etc/GMT-10' => array(
- 'offset' => 36000000,
- 'shortname' => 'GMT-10',
- 'dstshortname' => null,
- 'longname' => 'GMT+10:00'),
- 'Etc/GMT-11' => array(
- 'offset' => 39600000,
- 'shortname' => 'GMT-11',
- 'dstshortname' => null,
- 'longname' => 'GMT+11:00'),
- 'Etc/GMT-12' => array(
- 'offset' => 43200000,
- 'shortname' => 'GMT-12',
- 'dstshortname' => null,
- 'longname' => 'GMT+12:00'),
- 'Etc/GMT-13' => array(
- 'offset' => 46800000,
- 'shortname' => 'GMT-13',
- 'dstshortname' => null,
- 'longname' => 'GMT+13:00'),
- 'Etc/GMT-14' => array(
- 'offset' => 50400000,
- 'shortname' => 'GMT-14',
- 'dstshortname' => null,
- 'longname' => 'GMT+14:00'),
- 'Etc/GMT-2' => array(
- 'offset' => 7200000,
- 'shortname' => 'GMT-2',
- 'dstshortname' => null,
- 'longname' => 'GMT+02:00'),
- 'Etc/GMT-3' => array(
- 'offset' => 10800000,
- 'shortname' => 'GMT-3',
- 'dstshortname' => null,
- 'longname' => 'GMT+03:00'),
- 'Etc/GMT-4' => array(
- 'offset' => 14400000,
- 'shortname' => 'GMT-4',
- 'dstshortname' => null,
- 'longname' => 'GMT+04:00'),
- 'Etc/GMT-5' => array(
- 'offset' => 18000000,
- 'shortname' => 'GMT-5',
- 'dstshortname' => null,
- 'longname' => 'GMT+05:00'),
- 'Etc/GMT-6' => array(
- 'offset' => 21600000,
- 'shortname' => 'GMT-6',
- 'dstshortname' => null,
- 'longname' => 'GMT+06:00'),
- 'Etc/GMT-7' => array(
- 'offset' => 25200000,
- 'shortname' => 'GMT-7',
- 'dstshortname' => null,
- 'longname' => 'GMT+07:00'),
- 'Etc/GMT-8' => array(
- 'offset' => 28800000,
- 'shortname' => 'GMT-8',
- 'dstshortname' => null,
- 'longname' => 'GMT+08:00'),
- 'Etc/GMT-9' => array(
- 'offset' => 32400000,
- 'shortname' => 'GMT-9',
- 'dstshortname' => null,
- 'longname' => 'GMT+09:00'),
- 'Etc/GMT0' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'GMT+00:00'),
- 'Etc/Greenwich' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Etc/UCT' => array(
- 'offset' => 0,
- 'shortname' => 'UCT',
- 'dstshortname' => null,
- 'longname' => 'Coordinated Universal Time'),
- 'Etc/UTC' => array(
- 'offset' => 0,
- 'shortname' => 'UTC',
- 'dstshortname' => null,
- 'longname' => 'Coordinated Universal Time'),
- 'Etc/Universal' => array(
- 'offset' => 0,
- 'shortname' => 'UTC',
- 'dstshortname' => null,
- 'longname' => 'Coordinated Universal Time'),
- 'Etc/Zulu' => array(
- 'offset' => 0,
- 'shortname' => 'UTC',
- 'dstshortname' => null,
- 'longname' => 'Coordinated Universal Time'),
- 'Europe/Amsterdam' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Andorra' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Athens' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Belfast' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'BST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'British Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Belgrade' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Berlin' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Bratislava' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Brussels' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Bucharest' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Budapest' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Chisinau' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Copenhagen' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Dublin' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'IST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'Irish Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Gibraltar' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Guernsey' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'BST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'British Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Helsinki' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Isle_of_Man' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'BST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'British Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Istanbul' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Jersey' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'BST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'British Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Kaliningrad' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 0),
- 'Europe/Kiev' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Lisbon' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => 'WEST',
- 'longname' => 'Western European Time',
- 'dstlongname' => 'Western European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Ljubljana' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/London' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'BST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'British Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Luxembourg' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Madrid' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Malta' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Mariehamn' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Minsk' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 0),
- 'Europe/Monaco' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Moscow' => array(
- 'offset' => 10800000,
- 'shortname' => 'MSK',
- 'dstshortname' => 'MSD',
- 'longname' => 'Moscow Standard Time',
- 'dstlongname' => 'Moscow Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -3600000),
- 'Europe/Nicosia' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Oslo' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Paris' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Podgorica' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Prague' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Riga' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Rome' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Samara' => array(
- 'offset' => 14400000,
- 'shortname' => 'SAMT',
- 'dstshortname' => 'SAMST',
- 'longname' => 'Samara Time',
- 'dstlongname' => 'Samara Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -7200000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -7200000),
- 'Europe/San_Marino' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Sarajevo' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Simferopol' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Skopje' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Sofia' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Stockholm' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Tallinn' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Tirane' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Tiraspol' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Uzhgorod' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Vaduz' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Vatican' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Vienna' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Vilnius' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Volgograd' => array(
- 'offset' => 10800000,
- 'shortname' => 'VOLT',
- 'dstshortname' => 'VOLST',
- 'longname' => 'Volograd Time',
- 'longname' => 'Volograd Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -3600000),
- 'Europe/Warsaw' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Zagreb' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Zaporozhye' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Europe/Zurich' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'GB' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'BST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'British Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'GB-Eire' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => 'BST',
- 'longname' => 'Greenwich Mean Time',
- 'dstlongname' => 'British Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'GMT' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'GMT+0' => array(
- 'offset' => 0,
- 'shortname' => 'GMT+0',
- 'dstshortname' => null),
- 'GMT+00:00' => array(
- 'offset' => 0,
- 'shortname' => 'GMT+00:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+00:00'),
- 'GMT+01:00' => array(
- 'offset' => 3600000,
- 'shortname' => 'GMT+01:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+01:00'),
- 'GMT+02:00' => array(
- 'offset' => 7200000,
- 'shortname' => 'GMT+02:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+02:00'),
- 'GMT+03:00' => array(
- 'offset' => 10800000,
- 'shortname' => 'GMT+03:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+03:00'),
- 'GMT+04:00' => array(
- 'offset' => 14400000,
- 'shortname' => 'GMT+04:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+04:00'),
- 'GMT+05:00' => array(
- 'offset' => 18000000,
- 'shortname' => 'GMT+05:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+05:00'),
- 'GMT+06:00' => array(
- 'offset' => 21600000,
- 'shortname' => 'GMT+06:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+06:00'),
- 'GMT+07:00' => array(
- 'offset' => 25200000,
- 'shortname' => 'GMT+07:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+07:00'),
- 'GMT+08:00' => array(
- 'offset' => 28800000,
- 'shortname' => 'GMT+08:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+08:00'),
- 'GMT+09:00' => array(
- 'offset' => 32400000,
- 'shortname' => 'GMT+09:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+09:00'),
- 'GMT+1' => array(
- 'offset' => 3600000,
- 'shortname' => 'GMT+1',
- 'dstshortname' => null),
- 'GMT+10' => array(
- 'offset' => 36000000,
- 'shortname' => 'GMT+10',
- 'dstshortname' => null),
- 'GMT+10:00' => array(
- 'offset' => 36000000,
- 'shortname' => 'GMT+10:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+10:00'),
- 'GMT+11' => array(
- 'offset' => 39600000,
- 'shortname' => 'GMT+11',
- 'dstshortname' => null),
- 'GMT+11:00' => array(
- 'offset' => 39600000,
- 'shortname' => 'GMT+11:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+11:00'),
- 'GMT+12' => array(
- 'offset' => 43200000,
- 'shortname' => 'GMT+12',
- 'dstshortname' => null),
- 'GMT+12:00' => array(
- 'offset' => 43200000,
- 'shortname' => 'GMT+12:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+12:00'),
- 'GMT+13' => array(
- 'offset' => 46800000,
- 'shortname' => 'GMT+13',
- 'dstshortname' => null),
- 'GMT+13:00' => array(
- 'offset' => 46800000,
- 'shortname' => 'GMT+13:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+13:00'),
- 'GMT+14' => array(
- 'offset' => 50400000,
- 'shortname' => 'GMT+14',
- 'dstshortname' => null),
- 'GMT+14:00' => array(
- 'offset' => 50400000,
- 'shortname' => 'GMT+14:00',
- 'dstshortname' => null,
- 'longname' => 'GMT+14:00'),
- 'GMT+2' => array(
- 'offset' => 7200000,
- 'shortname' => 'GMT+2',
- 'dstshortname' => null),
- 'GMT+3' => array(
- 'offset' => 10800000,
- 'shortname' => 'GMT+3',
- 'dstshortname' => null),
- 'GMT+4' => array(
- 'offset' => 14400000,
- 'shortname' => 'GMT+4',
- 'dstshortname' => null),
- 'GMT+5' => array(
- 'offset' => 18000000,
- 'shortname' => 'GMT+5',
- 'dstshortname' => null),
- 'GMT+6' => array(
- 'offset' => 21600000,
- 'shortname' => 'GMT+6',
- 'dstshortname' => null),
- 'GMT+7' => array(
- 'offset' => 25200000,
- 'shortname' => 'GMT+7',
- 'dstshortname' => null),
- 'GMT+8' => array(
- 'offset' => 28800000,
- 'shortname' => 'GMT+8',
- 'dstshortname' => null),
- 'GMT+9' => array(
- 'offset' => 32400000,
- 'shortname' => 'GMT+9',
- 'dstshortname' => null),
- 'GMT-0' => array(
- 'offset' => 0,
- 'shortname' => 'GMT-0',
- 'dstshortname' => null),
- 'GMT-00:00' => array(
- 'offset' => 0,
- 'shortname' => 'GMT-00:00',
- 'dstshortname' => null),
- 'GMT-01:00' => array(
- 'offset' => -3600000,
- 'shortname' => 'GMT-01:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-01:00'),
- 'GMT-02:00' => array(
- 'offset' => -7200000,
- 'shortname' => 'GMT-02:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-02:00'),
- 'GMT-03:00' => array(
- 'offset' => -10800000,
- 'shortname' => 'GMT-03:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-03:00'),
- 'GMT-04:00' => array(
- 'offset' => -14400000,
- 'shortname' => 'GMT-04:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-04:00'),
- 'GMT-05:00' => array(
- 'offset' => -18000000,
- 'shortname' => 'GMT-05:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-05:00'),
- 'GMT-06:00' => array(
- 'offset' => -21600000,
- 'shortname' => 'GMT-06:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-06:00'),
- 'GMT-07:00' => array(
- 'offset' => -25200000,
- 'shortname' => 'GMT-07:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-07:00'),
- 'GMT-08:00' => array(
- 'offset' => -28800000,
- 'shortname' => 'GMT-08:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-08:00'),
- 'GMT-09:00' => array(
- 'offset' => -32400000,
- 'shortname' => 'GMT-09:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-09:00'),
- 'GMT-1' => array(
- 'offset' => -3600000,
- 'shortname' => 'GMT-1',
- 'dstshortname' => null),
- 'GMT-10' => array(
- 'offset' => -36000000,
- 'shortname' => 'GMT-10',
- 'dstshortname' => null),
- 'GMT-10:00' => array(
- 'offset' => -36000000,
- 'shortname' => 'GMT-10:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-10:00'),
- 'GMT-11' => array(
- 'offset' => -39600000,
- 'shortname' => 'GMT-11',
- 'dstshortname' => null),
- 'GMT-11:00' => array(
- 'offset' => -39600000,
- 'shortname' => 'GMT-11:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-11:00'),
- 'GMT-12' => array(
- 'offset' => -43200000,
- 'shortname' => 'GMT-12',
- 'dstshortname' => null),
- 'GMT-12:00' => array(
- 'offset' => -43200000,
- 'shortname' => 'GMT-12:00',
- 'dstshortname' => null,
- 'longname' => 'GMT-12:00'),
- 'GMT-2' => array(
- 'offset' => -7200000,
- 'shortname' => 'GMT-2',
- 'dstshortname' => null),
- 'GMT-3' => array(
- 'offset' => -10800000,
- 'shortname' => 'GMT-3',
- 'dstshortname' => null),
- 'GMT-4' => array(
- 'offset' => -14400000,
- 'shortname' => 'GMT-4',
- 'dstshortname' => null),
- 'GMT-5' => array(
- 'offset' => -18000000,
- 'shortname' => 'GMT-5',
- 'dstshortname' => null),
- 'GMT-6' => array(
- 'offset' => -21600000,
- 'shortname' => 'GMT-6',
- 'dstshortname' => null),
- 'GMT-7' => array(
- 'offset' => -25200000,
- 'shortname' => 'GMT-7',
- 'dstshortname' => null),
- 'GMT-8' => array(
- 'offset' => -28800000,
- 'shortname' => 'GMT-8',
- 'dstshortname' => null),
- 'GMT-9' => array(
- 'offset' => -32400000,
- 'shortname' => 'GMT-9',
- 'dstshortname' => null),
- 'GMT0' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'GMT+00:00'),
- 'Greenwich' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'HST' => array(
- 'offset' => -36000000,
- 'shortname' => 'HST',
- 'dstshortname' => null,
- 'longname' => 'Hawaii Standard Time'),
- 'Hongkong' => array(
- 'offset' => 28800000,
- 'shortname' => 'HKT',
- 'dstshortname' => null,
- 'longname' => 'Hong Kong Time'),
- 'Iceland' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'dstshortname' => null,
- 'longname' => 'Greenwich Mean Time'),
- 'Indian/Antananarivo' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Indian/Chagos' => array(
- 'offset' => 21600000,
- 'shortname' => 'IOT',
- 'dstshortname' => null,
- 'longname' => 'Indian Ocean Territory Time'),
- 'Indian/Christmas' => array(
- 'offset' => 25200000,
- 'shortname' => 'CXT',
- 'dstshortname' => null,
- 'longname' => 'Christmas Island Time'),
- 'Indian/Cocos' => array(
- 'offset' => 23400000,
- 'shortname' => 'CCT',
- 'dstshortname' => null,
- 'longname' => 'Cocos Islands Time'),
- 'Indian/Comoro' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Indian/Kerguelen' => array(
- 'offset' => 18000000,
- 'shortname' => 'TFT',
- 'dstshortname' => null,
- 'longname' => 'French Southern & Antarctic Lands Time'),
- 'Indian/Mahe' => array(
- 'offset' => 14400000,
- 'shortname' => 'SCT',
- 'dstshortname' => null,
- 'longname' => 'Seychelles Time'),
- 'Indian/Maldives' => array(
- 'offset' => 18000000,
- 'shortname' => 'MVT',
- 'dstshortname' => null,
- 'longname' => 'Maldives Time'),
- 'Indian/Mauritius' => array(
- 'offset' => 14400000,
- 'shortname' => 'MUT',
- 'dstshortname' => null,
- 'longname' => 'Mauritius Time'),
- 'Indian/Mayotte' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'dstshortname' => null,
- 'longname' => 'Eastern African Time'),
- 'Indian/Reunion' => array(
- 'offset' => 14400000,
- 'shortname' => 'RET',
- 'dstshortname' => null,
- 'longname' => 'Reunion Time'),
- 'Iran' => array(
- 'offset' => 12600000,
- 'shortname' => 'IRST',
- 'dstshortname' => 'IRDT',
- 'longname' => 'Iran Time',
- 'dstlongname' => 'Iran Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => '21',
- 'summertimestarttime' => -12600000,
- 'summertimeendmonth' => 9,
- 'summertimeendday' => '21',
- 'summertimeendtime' => -16200000),
- 'Israel' => array(
- 'offset' => 7200000,
- 'shortname' => 'IST',
- 'dstshortname' => 'IDT',
- 'longname' => 'Israel Standard Time',
- 'dstlongname' => 'Israel Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Fri>=26',
- 'summertimestarttime' => 0,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => '5',
- 'summertimeendtime' => -3600000),
- 'Jamaica' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => null,
- 'longname' => 'Eastern Standard Time'),
- 'Japan' => array(
- 'offset' => 32400000,
- 'shortname' => 'JST',
- 'dstshortname' => null,
- 'longname' => 'Japan Standard Time'),
- 'Kwajalein' => array(
- 'offset' => 43200000,
- 'shortname' => 'MHT',
- 'dstshortname' => null,
- 'longname' => 'Marshall Islands Time'),
- 'Libya' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => null,
- 'longname' => 'Eastern European Time'),
- 'MET' => array(
- 'offset' => 3600000,
- 'shortname' => 'MET',
- 'dstshortname' => 'MEST',
- 'longname' => 'Middle Europe Time',
- 'dstlongname' => 'Middle Europe Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'MST' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => null,
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time'),
- 'MST7MDT' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'Mexico/BajaNorte' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 32400000),
- 'Mexico/BajaSur' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 28800000),
- 'Mexico/General' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'Sun>=1',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 25200000),
- 'Mideast/Riyadh87' => array(
- 'offset' => 11224000,
- 'shortname' => '',
- 'dstshortname' => null,
- 'longname' => 'GMT+03:07'),
- 'Mideast/Riyadh88' => array(
- 'offset' => 11224000,
- 'shortname' => '',
- 'dstshortname' => null,
- 'longname' => 'GMT+03:07'),
- 'Mideast/Riyadh89' => array(
- 'offset' => 11224000,
- 'shortname' => '',
- 'dstshortname' => null,
- 'longname' => 'GMT+03:07'),
- 'NZ' => array(
- 'offset' => 43200000,
- 'shortname' => 'NZST',
- 'dstshortname' => 'NZDT',
- 'longname' => 'New Zealand Standard Time',
- 'dstlongname' => 'New Zealand Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 9,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -36000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -36000000),
- 'NZ-CHAT' => array(
- 'offset' => 45900000,
- 'shortname' => 'CHAST',
- 'dstshortname' => 'CHADT',
- 'longname' => 'Chatham Standard Time',
- 'dstlongname' => 'Chatham Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 9,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -36000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -36000000),
- 'Navajo' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'PRC' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null,
- 'longname' => 'China Standard Time'),
- 'PST8PDT' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'Pacific/Apia' => array(
- 'offset' => -39600000,
- 'shortname' => 'WST',
- 'dstshortname' => null,
- 'longname' => 'West Samoa Time'),
- 'Pacific/Auckland' => array(
- 'offset' => 43200000,
- 'shortname' => 'NZST',
- 'dstshortname' => 'NZDT',
- 'longname' => 'New Zealand Standard Time',
- 'dstlongname' => 'New Zealand Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 9,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -36000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -36000000),
- 'Pacific/Chatham' => array(
- 'offset' => 45900000,
- 'shortname' => 'CHAST',
- 'dstshortname' => 'CHADT',
- 'longname' => 'Chatham Standard Time',
- 'dstlongname' => 'Chatham Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 9,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -36000000,
- 'summertimeendmonth' => 4,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => -36000000),
- 'Pacific/Easter' => array(
- 'offset' => -21600000,
- 'shortname' => 'EAST',
- 'dstshortname' => 'EASST',
- 'longname' => 'Easter Is. Time',
- 'dstlongname' => 'Easter Is. Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 10,
- 'summertimestartday' => 'Sun>=9',
- 'summertimestarttime' => 14400000,
- 'summertimeendmonth' => 3,
- 'summertimeendday' => '30',
- 'summertimeendtime' => 10800000),
- 'Pacific/Efate' => array(
- 'offset' => 39600000,
- 'shortname' => 'VUT',
- 'dstshortname' => null,
- 'longname' => 'Vanuatu Time'),
- 'Pacific/Enderbury' => array(
- 'offset' => 46800000,
- 'shortname' => 'PHOT',
- 'dstshortname' => null,
- 'longname' => 'Phoenix Is. Time'),
- 'Pacific/Fakaofo' => array(
- 'offset' => -36000000,
- 'shortname' => 'TKT',
- 'dstshortname' => null,
- 'longname' => 'Tokelau Time'),
- 'Pacific/Fiji' => array(
- 'offset' => 43200000,
- 'shortname' => 'FJT',
- 'dstshortname' => null,
- 'longname' => 'Fiji Time'),
- 'Pacific/Funafuti' => array(
- 'offset' => 43200000,
- 'shortname' => 'TVT',
- 'dstshortname' => null,
- 'longname' => 'Tuvalu Time'),
- 'Pacific/Galapagos' => array(
- 'offset' => -21600000,
- 'shortname' => 'GALT',
- 'dstshortname' => null,
- 'longname' => 'Galapagos Time'),
- 'Pacific/Gambier' => array(
- 'offset' => -32400000,
- 'shortname' => 'GAMT',
- 'dstshortname' => null,
- 'longname' => 'Gambier Time'),
- 'Pacific/Guadalcanal' => array(
- 'offset' => 39600000,
- 'shortname' => 'SBT',
- 'dstshortname' => null,
- 'longname' => 'Solomon Is. Time'),
- 'Pacific/Guam' => array(
- 'offset' => 36000000,
- 'shortname' => 'ChST',
- 'dstshortname' => null,
- 'longname' => 'Chamorro Standard Time'),
- 'Pacific/Honolulu' => array(
- 'offset' => -36000000,
- 'shortname' => 'HST',
- 'dstshortname' => null,
- 'longname' => 'Hawaii Standard Time'),
- 'Pacific/Johnston' => array(
- 'offset' => -36000000,
- 'shortname' => 'HST',
- 'dstshortname' => null,
- 'longname' => 'Hawaii Standard Time'),
- 'Pacific/Kiritimati' => array(
- 'offset' => 50400000,
- 'shortname' => 'LINT',
- 'dstshortname' => null,
- 'longname' => 'Line Is. Time'),
- 'Pacific/Kosrae' => array(
- 'offset' => 39600000,
- 'shortname' => 'KOST',
- 'dstshortname' => null,
- 'longname' => 'Kosrae Time'),
- 'Pacific/Kwajalein' => array(
- 'offset' => 43200000,
- 'shortname' => 'MHT',
- 'dstshortname' => null,
- 'longname' => 'Marshall Islands Time'),
- 'Pacific/Majuro' => array(
- 'offset' => 43200000,
- 'shortname' => 'MHT',
- 'dstshortname' => null,
- 'longname' => 'Marshall Islands Time'),
- 'Pacific/Marquesas' => array(
- 'offset' => -34200000,
- 'shortname' => 'MART',
- 'dstshortname' => null,
- 'longname' => 'Marquesas Time'),
- 'Pacific/Midway' => array(
- 'offset' => -39600000,
- 'shortname' => 'SST',
- 'dstshortname' => null,
- 'longname' => 'Samoa Standard Time'),
- 'Pacific/Nauru' => array(
- 'offset' => 43200000,
- 'shortname' => 'NRT',
- 'dstshortname' => null,
- 'longname' => 'Nauru Time'),
- 'Pacific/Niue' => array(
- 'offset' => -39600000,
- 'shortname' => 'NUT',
- 'dstshortname' => null,
- 'longname' => 'Niue Time'),
- 'Pacific/Norfolk' => array(
- 'offset' => 41400000,
- 'shortname' => 'NFT',
- 'dstshortname' => null,
- 'longname' => 'Norfolk Time'),
- 'Pacific/Noumea' => array(
- 'offset' => 39600000,
- 'shortname' => 'NCT',
- 'dstshortname' => null,
- 'longname' => 'New Caledonia Time'),
- 'Pacific/Pago_Pago' => array(
- 'offset' => -39600000,
- 'shortname' => 'SST',
- 'dstshortname' => null,
- 'longname' => 'Samoa Standard Time'),
- 'Pacific/Palau' => array(
- 'offset' => 32400000,
- 'shortname' => 'PWT',
- 'dstshortname' => null,
- 'longname' => 'Palau Time'),
- 'Pacific/Pitcairn' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => null,
- 'longname' => 'Pitcairn Standard Time'),
- 'Pacific/Ponape' => array(
- 'offset' => 39600000,
- 'shortname' => 'PONT',
- 'dstshortname' => null,
- 'longname' => 'Ponape Time'),
- 'Pacific/Port_Moresby' => array(
- 'offset' => 36000000,
- 'shortname' => 'PGT',
- 'dstshortname' => null,
- 'longname' => 'Papua New Guinea Time'),
- 'Pacific/Rarotonga' => array(
- 'offset' => -36000000,
- 'shortname' => 'CKT',
- 'dstshortname' => null,
- 'longname' => 'Cook Is. Time'),
- 'Pacific/Saipan' => array(
- 'offset' => 36000000,
- 'shortname' => 'ChST',
- 'dstshortname' => null,
- 'longname' => 'Chamorro Standard Time'),
- 'Pacific/Samoa' => array(
- 'offset' => -39600000,
- 'shortname' => 'SST',
- 'dstshortname' => null,
- 'longname' => 'Samoa Standard Time'),
- 'Pacific/Tahiti' => array(
- 'offset' => -36000000,
- 'shortname' => 'TAHT',
- 'dstshortname' => null,
- 'longname' => 'Tahiti Time'),
- 'Pacific/Tarawa' => array(
- 'offset' => 43200000,
- 'shortname' => 'GILT',
- 'dstshortname' => null,
- 'longname' => 'Gilbert Is. Time'),
- 'Pacific/Tongatapu' => array(
- 'offset' => 46800000,
- 'shortname' => 'TOT',
- 'dstshortname' => null,
- 'longname' => 'Tonga Time'),
- 'Pacific/Truk' => array(
- 'offset' => 36000000,
- 'shortname' => 'TRUT',
- 'dstshortname' => null,
- 'longname' => 'Truk Time'),
- 'Pacific/Wake' => array(
- 'offset' => 43200000,
- 'shortname' => 'WAKT',
- 'dstshortname' => null,
- 'longname' => 'Wake Time'),
- 'Pacific/Wallis' => array(
- 'offset' => 43200000,
- 'shortname' => 'WFT',
- 'dstshortname' => null,
- 'longname' => 'Wallis & Futuna Time'),
- 'Pacific/Yap' => array(
- 'offset' => 36000000,
- 'shortname' => 'TRUT',
- 'dstshortname' => null,
- 'longname' => 'Yap Time'),
- 'Poland' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Portugal' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => 'WEST',
- 'longname' => 'Western European Time',
- 'dstlongname' => 'Western European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'ROC' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'dstshortname' => null),
- 'ROK' => array(
- 'offset' => 32400000,
- 'shortname' => 'KST',
- 'dstshortname' => null,
- 'longname' => 'Korea Standard Time'),
- 'Singapore' => array(
- 'offset' => 28800000,
- 'shortname' => 'SGT',
- 'dstshortname' => null,
- 'longname' => 'Singapore Time'),
- 'Turkey' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'UCT' => array(
- 'offset' => 0,
- 'shortname' => 'UCT',
- 'dstshortname' => null,
- 'longname' => 'Coordinated Universal Time'),
- 'US/Alaska' => array(
- 'offset' => -32400000,
- 'shortname' => 'AKST',
- 'dstshortname' => 'AKDT',
- 'longname' => 'Alaska Standard Time',
- 'dstlongname' => 'Alaska Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 39600000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 36000000),
- 'US/Aleutian' => array(
- 'offset' => -36000000,
- 'shortname' => 'HAST',
- 'dstshortname' => 'HADT',
- 'longname' => 'Hawaii-Aleutian Standard Time',
- 'dstlongname' => 'Hawaii-Aleutian Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 43200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 39600000),
- 'US/Arizona' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => null,
- 'longname' => 'Mountain Standard Time'),
- 'US/Central' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'US/East-Indiana' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'US/Eastern' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'US/Hawaii' => array(
- 'offset' => -36000000,
- 'shortname' => 'HST',
- 'dstshortname' => null,
- 'longname' => 'Hawaii Standard Time'),
- 'US/Indiana-Starke' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 28800000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 25200000),
- 'US/Michigan' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 25200000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 21600000),
- 'US/Mountain' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 32400000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 28800000),
- 'US/Pacific' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'US/Pacific-New' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'Sun>=8',
- 'summertimestarttime' => 36000000,
- 'summertimeendmonth' => 11,
- 'summertimeendday' => 'Sun>=1',
- 'summertimeendtime' => 32400000),
- 'US/Samoa' => array(
- 'offset' => -39600000,
- 'shortname' => 'SST',
- 'dstshortname' => null,
- 'longname' => 'Samoa Standard Time'),
- 'UTC' => array(
- 'offset' => 0,
- 'shortname' => 'UTC',
- 'dstshortname' => null,
- 'longname' => 'Coordinated Universal Time'),
- 'Universal' => array(
- 'offset' => 0,
- 'shortname' => 'UTC',
- 'dstshortname' => null,
- 'longname' => 'Coordinated Universal Time'),
- 'W-SU' => array(
- 'offset' => 10800000,
- 'shortname' => 'MSK',
- 'dstshortname' => 'MSD',
- 'longname' => 'Moscow Standard Time',
- 'dstlongname' => 'Moscow Daylight Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => -3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => -3600000),
- 'WET' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => 'WEST',
- 'longname' => 'Western European Time',
- 'dstlongname' => 'Western European Summer Time',
- 'summertimeoffset' => 3600000,
- 'summertimestartmonth' => 3,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 3600000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 3600000),
- 'Zulu' => array(
- 'offset' => 0,
- 'shortname' => 'UTC',
- 'dstshortname' => null,
- 'longname' => 'Coordinated Universal Time'),
- //
- // Following time-zones are the long names for the time-zones above, thus N.B.
- // that the Summer-Time for each zone cannot really be reliable, because two
- // zones may share the same zone name, but differ in Summer-Time arrangements;
- // and also that the data cannot be maintained as easily and thus may also
- // be inaccurate or out-of-date
- //
- 'ACT' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'longname' => 'Central Standard Time (Northern Territory)'),
- 'AET' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (New South Wales)',
- 'dstlongname' => 'Eastern Summer Time (New South Wales)'),
- 'AGT' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'longname' => 'Argentine Time'),
- 'ART' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time'),
- 'AST' => array(
- 'offset' => -32400000,
- 'shortname' => 'AKST',
- 'dstshortname' => 'AKDT',
- 'longname' => 'Alaska Standard Time',
- 'dstlongname' => 'Alaska Daylight Time'),
- 'Acre Time' => array(
- 'offset' => -18000000,
- 'shortname' => 'ACT',
- 'longname' => 'Acre Time'),
- 'Afghanistan Time' => array(
- 'offset' => 16200000,
- 'shortname' => 'AFT',
- 'longname' => 'Afghanistan Time'),
- 'Alaska Standard Time' => array(
- 'offset' => -32400000,
- 'shortname' => 'AKST',
- 'dstshortname' => 'AKDT',
- 'longname' => 'Alaska Standard Time',
- 'dstlongname' => 'Alaska Daylight Time'),
- 'Alma-Ata Time' => array(
- 'offset' => 21600000,
- 'shortname' => 'ALMT',
- 'dstshortname' => 'ALMST',
- 'longname' => 'Alma-Ata Time',
- 'dstlongname' => 'Alma-Ata Summer Time'),
- 'Amazon Standard Time' => array(
- 'offset' => -14400000,
- 'shortname' => 'AMT',
- 'longname' => 'Amazon Standard Time'),
- 'Anadyr Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'ANAT',
- 'dstshortname' => 'ANAST',
- 'longname' => 'Anadyr Time',
- 'dstlongname' => 'Anadyr Summer Time'),
- 'Aqtau Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'AQTT',
- 'dstshortname' => 'AQTST',
- 'longname' => 'Aqtau Time',
- 'dstlongname' => 'Aqtau Summer Time'),
- 'Aqtobe Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'AQTT',
- 'dstshortname' => 'AQTST',
- 'longname' => 'Aqtobe Time',
- 'dstlongname' => 'Aqtobe Summer Time'),
- 'Arabia Standard Time' => array(
- 'offset' => 10800000,
- 'shortname' => 'AST',
- 'longname' => 'Arabia Standard Time'),
- 'Argentine Time' => array(
- 'offset' => -10800000,
- 'shortname' => 'ART',
- 'longname' => 'Argentine Time'),
- 'Armenia Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => 'AMST',
- 'longname' => 'Armenia Time',
- 'dstlongname' => 'Armenia Summer Time'),
- 'Atlantic Standard Time' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'dstlongname' => 'Atlantic Daylight Time'),
- 'Azerbaijan Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'AZT',
- 'dstshortname' => 'AZST',
- 'longname' => 'Azerbaijan Time',
- 'dstlongname' => 'Azerbaijan Summer Time'),
- 'Azores Time' => array(
- 'offset' => -3600000,
- 'shortname' => 'AZOT',
- 'dstshortname' => 'AZOST',
- 'longname' => 'Azores Time',
- 'dstlongname' => 'Azores Summer Time'),
- 'BDT' => array(
- 'offset' => 21600000,
- 'shortname' => 'BDT',
- 'longname' => 'Bangladesh Time'),
- 'BET' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => 'BRST',
- 'longname' => 'Brazil Time',
- 'dstlongname' => 'Brazil Summer Time'),
- 'Bangladesh Time' => array(
- 'offset' => 21600000,
- 'shortname' => 'BDT',
- 'longname' => 'Bangladesh Time'),
- 'Bhutan Time' => array(
- 'offset' => 21600000,
- 'shortname' => 'BTT',
- 'longname' => 'Bhutan Time'),
- 'Bolivia Time' => array(
- 'offset' => -14400000,
- 'shortname' => 'BOT',
- 'longname' => 'Bolivia Time'),
- 'Brazil Time' => array(
- 'offset' => -10800000,
- 'shortname' => 'BRT',
- 'dstshortname' => 'BRST',
- 'longname' => 'Brazil Time',
- 'dstlongname' => 'Brazil Summer Time'),
- 'Brunei Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'BNT',
- 'longname' => 'Brunei Time'),
- 'CAT' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'longname' => 'Central African Time'),
- 'CEST' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time'),
- 'CNT' => array(
- 'offset' => -12600000,
- 'shortname' => 'NST',
- 'dstshortname' => 'NDT',
- 'longname' => 'Newfoundland Standard Time',
- 'dstlongname' => 'Newfoundland Daylight Time'),
- 'CST' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time'),
- 'CTT' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'longname' => 'China Standard Time'),
- 'Cape Verde Time' => array(
- 'offset' => -3600000,
- 'shortname' => 'CVT',
- 'longname' => 'Cape Verde Time'),
- 'Central African Time' => array(
- 'offset' => 7200000,
- 'shortname' => 'CAT',
- 'longname' => 'Central African Time'),
- 'Central European Time' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time'),
- 'Central Indonesia Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'CIT',
- 'longname' => 'Central Indonesia Time'),
- 'Central Standard Time' => array(
- 'offset' => -18000000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time'),
- 'Central Standard Time (Northern Territory)' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'longname' => 'Central Standard Time (Northern Territory)'),
- 'Central Standard Time (South Australia)' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CST',
- 'longname' => 'Central Standard Time (South Australia)',
- 'dstlongname' => 'Central Summer Time (South Australia)'),
- 'Central Standard Time (South Australia/New South Wales)' => array(
- 'offset' => 34200000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CST',
- 'longname' => 'Central Standard Time (South Australia/New South Wales)',
- 'dstlongname' => 'Central Summer Time (South Australia/New South Wales)'),
- 'Chamorro Standard Time' => array(
- 'offset' => 36000000,
- 'shortname' => 'ChST',
- 'longname' => 'Chamorro Standard Time'),
- 'Chatham Standard Time' => array(
- 'offset' => 45900000,
- 'shortname' => 'CHAST',
- 'dstshortname' => 'CHADT',
- 'longname' => 'Chatham Standard Time',
- 'dstlongname' => 'Chatham Daylight Time'),
- 'Chile Time' => array(
- 'offset' => -14400000,
- 'shortname' => 'CLT',
- 'dstshortname' => 'CLST',
- 'longname' => 'Chile Time',
- 'dstlongname' => 'Chile Summer Time'),
- 'China Standard Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'CST',
- 'longname' => 'China Standard Time'),
- 'Choibalsan Time' => array(
- 'offset' => 32400000,
- 'shortname' => 'CHOT',
- 'longname' => 'Choibalsan Time'),
- 'Christmas Island Time' => array(
- 'offset' => 25200000,
- 'shortname' => 'CXT',
- 'longname' => 'Christmas Island Time'),
- 'Cocos Islands Time' => array(
- 'offset' => 23400000,
- 'shortname' => 'CCT',
- 'longname' => 'Cocos Islands Time'),
- 'Colombia Time' => array(
- 'offset' => -18000000,
- 'shortname' => 'COT',
- 'longname' => 'Colombia Time'),
- 'Cook Is. Time' => array(
- 'offset' => -36000000,
- 'shortname' => 'CKT',
- 'longname' => 'Cook Is. Time'),
- 'Coordinated Universal Time' => array(
- 'offset' => 0,
- 'shortname' => 'UTC',
- 'longname' => 'Coordinated Universal Time'),
- 'Davis Time' => array(
- 'offset' => 25200000,
- 'shortname' => 'DAVT',
- 'longname' => 'Davis Time'),
- 'Dumont-d\'Urville Time' => array(
- 'offset' => 36000000,
- 'shortname' => 'DDUT',
- 'longname' => 'Dumont-d\'Urville Time'),
- 'EAT' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'longname' => 'Eastern African Time'),
- 'ECT' => array(
- 'offset' => 3600000,
- 'shortname' => 'CET',
- 'dstshortname' => 'CEST',
- 'longname' => 'Central European Time',
- 'dstlongname' => 'Central European Summer Time'),
- 'East Indonesia Time' => array(
- 'offset' => 32400000,
- 'shortname' => 'EIT',
- 'longname' => 'East Indonesia Time'),
- 'East Timor Time' => array(
- 'offset' => 32400000,
- 'shortname' => 'TPT',
- 'longname' => 'East Timor Time'),
- 'Easter Is. Time' => array(
- 'offset' => -21600000,
- 'shortname' => 'EAST',
- 'dstshortname' => 'EASST',
- 'longname' => 'Easter Is. Time',
- 'dstlongname' => 'Easter Is. Summer Time'),
- 'Eastern African Time' => array(
- 'offset' => 10800000,
- 'shortname' => 'EAT',
- 'longname' => 'Eastern African Time'),
- 'Eastern European Time' => array(
- 'offset' => 7200000,
- 'shortname' => 'EET',
- 'dstshortname' => 'EEST',
- 'longname' => 'Eastern European Time',
- 'dstlongname' => 'Eastern European Summer Time'),
- 'Eastern Greenland Time' => array(
- 'offset' => 3600000,
- 'shortname' => 'EGT',
- 'dstshortname' => 'EGST',
- 'longname' => 'Eastern Greenland Time',
- 'dstlongname' => 'Eastern Greenland Summer Time'),
- 'Eastern Standard Time' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time'),
- 'Eastern Standard Time (New South Wales)' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (New South Wales)',
- 'dstlongname' => 'Eastern Summer Time (New South Wales)'),
- 'Eastern Standard Time (Queensland)' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'longname' => 'Eastern Standard Time (Queensland)'),
- 'Eastern Standard Time (Tasmania)' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (Tasmania)',
- 'dstlongname' => 'Eastern Summer Time (Tasmania)'),
- 'Eastern Standard Time (Victoria)' => array(
- 'offset' => 36000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EST',
- 'longname' => 'Eastern Standard Time (Victoria)',
- 'dstlongname' => 'Eastern Summer Time (Victoria)'),
- 'Ecuador Time' => array(
- 'offset' => -18000000,
- 'shortname' => 'ECT',
- 'longname' => 'Ecuador Time'),
- 'Falkland Is. Time' => array(
- 'offset' => -14400000,
- 'shortname' => 'FKT',
- 'dstshortname' => 'FKST',
- 'longname' => 'Falkland Is. Time',
- 'dstlongname' => 'Falkland Is. Summer Time'),
- 'Fernando de Noronha Time' => array(
- 'offset' => -7200000,
- 'shortname' => 'FNT',
- 'longname' => 'Fernando de Noronha Time'),
- 'Fiji Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'FJT',
- 'longname' => 'Fiji Time'),
- 'French Guiana Time' => array(
- 'offset' => -10800000,
- 'shortname' => 'GFT',
- 'longname' => 'French Guiana Time'),
- 'French Southern & Antarctic Lands Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'TFT',
- 'longname' => 'French Southern & Antarctic Lands Time'),
- 'GMT+03:07' => array(
- 'offset' => 11224000,
- 'shortname' => 'GMT+03:07',
- 'longname' => 'GMT+03:07'),
- 'Galapagos Time' => array(
- 'offset' => -21600000,
- 'shortname' => 'GALT',
- 'longname' => 'Galapagos Time'),
- 'Gambier Time' => array(
- 'offset' => -32400000,
- 'shortname' => 'GAMT',
- 'longname' => 'Gambier Time'),
- 'Georgia Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'GET',
- 'dstshortname' => 'GEST',
- 'longname' => 'Georgia Time',
- 'dstlongname' => 'Georgia Summer Time'),
- 'Gilbert Is. Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'GILT',
- 'longname' => 'Gilbert Is. Time'),
- 'Greenwich Mean Time' => array(
- 'offset' => 0,
- 'shortname' => 'GMT',
- 'longname' => 'Greenwich Mean Time'),
- 'Gulf Standard Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'GST',
- 'longname' => 'Gulf Standard Time'),
- 'Guyana Time' => array(
- 'offset' => -14400000,
- 'shortname' => 'GYT',
- 'longname' => 'Guyana Time'),
- 'Hawaii Standard Time' => array(
- 'offset' => -36000000,
- 'shortname' => 'HST',
- 'longname' => 'Hawaii Standard Time'),
- 'Hawaii-Aleutian Standard Time' => array(
- 'offset' => -36000000,
- 'shortname' => 'HAST',
- 'dstshortname' => 'HADT',
- 'longname' => 'Hawaii-Aleutian Standard Time',
- 'dstlongname' => 'Hawaii-Aleutian Daylight Time'),
- 'Hong Kong Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'HKT',
- 'longname' => 'Hong Kong Time'),
- 'Hovd Time' => array(
- 'offset' => 25200000,
- 'shortname' => 'HOVT',
- 'longname' => 'Hovd Time'),
- 'IET' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'longname' => 'Eastern Standard Time'),
- 'IST' => array(
- 'offset' => 19800000,
- 'shortname' => 'IST',
- 'longname' => 'India Standard Time'),
- 'India Standard Time' => array(
- 'offset' => 19800000,
- 'shortname' => 'IST',
- 'longname' => 'India Standard Time'),
- 'Indian Ocean Territory Time' => array(
- 'offset' => 21600000,
- 'shortname' => 'IOT',
- 'longname' => 'Indian Ocean Territory Time'),
- 'Indochina Time' => array(
- 'offset' => 25200000,
- 'shortname' => 'ICT',
- 'longname' => 'Indochina Time'),
- 'Iran Time' => array(
- 'offset' => 12600000,
- 'shortname' => 'IRT',
- 'dstshortname' => 'IRST',
- 'longname' => 'Iran Time',
- 'dstlongname' => 'Iran Summer Time'),
- 'Irkutsk Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'IRKT',
- 'dstshortname' => 'IRKST',
- 'longname' => 'Irkutsk Time',
- 'dstlongname' => 'Irkutsk Summer Time'),
- 'Israel Standard Time' => array(
- 'offset' => 7200000,
- 'shortname' => 'IST',
- 'dstshortname' => 'IDT',
- 'longname' => 'Israel Standard Time',
- 'dstlongname' => 'Israel Daylight Time'),
- 'JST' => array(
- 'offset' => 32400000,
- 'shortname' => 'JST',
- 'longname' => 'Japan Standard Time'),
- 'Japan Standard Time' => array(
- 'offset' => 32400000,
- 'shortname' => 'JST',
- 'longname' => 'Japan Standard Time'),
- 'Kirgizstan Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'KGT',
- 'dstshortname' => 'KGST',
- 'longname' => 'Kirgizstan Time',
- 'dstlongname' => 'Kirgizstan Summer Time'),
- 'Korea Standard Time' => array(
- 'offset' => 32400000,
- 'shortname' => 'KST',
- 'longname' => 'Korea Standard Time'),
- 'Kosrae Time' => array(
- 'offset' => 39600000,
- 'shortname' => 'KOST',
- 'longname' => 'Kosrae Time'),
- 'Krasnoyarsk Time' => array(
- 'offset' => 25200000,
- 'shortname' => 'KRAT',
- 'dstshortname' => 'KRAST',
- 'longname' => 'Krasnoyarsk Time',
- 'dstlongname' => 'Krasnoyarsk Summer Time'),
- 'Line Is. Time' => array(
- 'offset' => 50400000,
- 'shortname' => 'LINT',
- 'longname' => 'Line Is. Time'),
- 'Load Howe Standard Time' => array(
- 'offset' => 37800000,
- 'shortname' => 'LHST',
- 'dstshortname' => 'LHST',
- 'longname' => 'Load Howe Standard Time',
- 'dstlongname' => 'Load Howe Summer Time'),
- 'MIT' => array(
- 'offset' => -39600000,
- 'shortname' => 'WST',
- 'longname' => 'West Samoa Time'),
- 'Magadan Time' => array(
- 'offset' => 39600000,
- 'shortname' => 'MAGT',
- 'dstshortname' => 'MAGST',
- 'longname' => 'Magadan Time',
- 'dstlongname' => 'Magadan Summer Time'),
- 'Malaysia Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'MYT',
- 'longname' => 'Malaysia Time'),
- 'Maldives Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'MVT',
- 'longname' => 'Maldives Time'),
- 'Marquesas Time' => array(
- 'offset' => -34200000,
- 'shortname' => 'MART',
- 'longname' => 'Marquesas Time'),
- 'Marshall Islands Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'MHT',
- 'longname' => 'Marshall Islands Time'),
- 'Mauritius Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'MUT',
- 'longname' => 'Mauritius Time'),
- 'Mawson Time' => array(
- 'offset' => 21600000,
- 'shortname' => 'MAWT',
- 'longname' => 'Mawson Time'),
- 'Middle Europe Time' => array(
- 'offset' => 3600000,
- 'shortname' => 'MET',
- 'dstshortname' => 'MEST',
- 'longname' => 'Middle Europe Time',
- 'dstlongname' => 'Middle Europe Summer Time'),
- 'Moscow Standard Time' => array(
- 'offset' => 10800000,
- 'shortname' => 'MSK',
- 'dstshortname' => 'MSD',
- 'longname' => 'Moscow Standard Time',
- 'dstlongname' => 'Moscow Daylight Time'),
- 'Mountain Standard Time' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time'),
- 'Myanmar Time' => array(
- 'offset' => 23400000,
- 'shortname' => 'MMT',
- 'longname' => 'Myanmar Time'),
- 'NET' => array(
- 'offset' => 14400000,
- 'shortname' => 'AMT',
- 'dstshortname' => 'AMST',
- 'longname' => 'Armenia Time',
- 'dstlongname' => 'Armenia Summer Time'),
- 'NST' => array(
- 'offset' => 43200000,
- 'shortname' => 'NZST',
- 'dstshortname' => 'NZDT',
- 'longname' => 'New Zealand Standard Time',
- 'dstlongname' => 'New Zealand Daylight Time'),
- 'Nauru Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'NRT',
- 'longname' => 'Nauru Time'),
- 'Nepal Time' => array(
- 'offset' => 20700000,
- 'shortname' => 'NPT',
- 'longname' => 'Nepal Time'),
- 'New Caledonia Time' => array(
- 'offset' => 39600000,
- 'shortname' => 'NCT',
- 'longname' => 'New Caledonia Time'),
- 'New Zealand Standard Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'NZST',
- 'dstshortname' => 'NZDT',
- 'longname' => 'New Zealand Standard Time',
- 'dstlongname' => 'New Zealand Daylight Time'),
- 'Newfoundland Standard Time' => array(
- 'offset' => -12600000,
- 'shortname' => 'NST',
- 'dstshortname' => 'NDT',
- 'longname' => 'Newfoundland Standard Time',
- 'dstlongname' => 'Newfoundland Daylight Time'),
- 'Niue Time' => array(
- 'offset' => -39600000,
- 'shortname' => 'NUT',
- 'longname' => 'Niue Time'),
- 'Norfolk Time' => array(
- 'offset' => 41400000,
- 'shortname' => 'NFT',
- 'longname' => 'Norfolk Time'),
- 'Novosibirsk Time' => array(
- 'offset' => 21600000,
- 'shortname' => 'NOVT',
- 'dstshortname' => 'NOVST',
- 'longname' => 'Novosibirsk Time',
- 'dstlongname' => 'Novosibirsk Summer Time'),
- 'Omsk Time' => array(
- 'offset' => 21600000,
- 'shortname' => 'OMST',
- 'dstshortname' => 'OMSST',
- 'longname' => 'Omsk Time',
- 'dstlongname' => 'Omsk Summer Time'),
- 'PLT' => array(
- 'offset' => 18000000,
- 'shortname' => 'PKT',
- 'longname' => 'Pakistan Time'),
- 'PNT' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'longname' => 'Mountain Standard Time'),
- 'PRT' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'longname' => 'Atlantic Standard Time'),
- 'PST' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time'),
- 'Pacific Standard Time' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time'),
- 'Pakistan Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'PKT',
- 'longname' => 'Pakistan Time'),
- 'Palau Time' => array(
- 'offset' => 32400000,
- 'shortname' => 'PWT',
- 'longname' => 'Palau Time'),
- 'Papua New Guinea Time' => array(
- 'offset' => 36000000,
- 'shortname' => 'PGT',
- 'longname' => 'Papua New Guinea Time'),
- 'Paraguay Time' => array(
- 'offset' => -14400000,
- 'shortname' => 'PYT',
- 'dstshortname' => 'PYST',
- 'longname' => 'Paraguay Time',
- 'dstlongname' => 'Paraguay Summer Time'),
- 'Peru Time' => array(
- 'offset' => -18000000,
- 'shortname' => 'PET',
- 'longname' => 'Peru Time'),
- 'Petropavlovsk-Kamchatski Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'PETT',
- 'dstshortname' => 'PETST',
- 'longname' => 'Petropavlovsk-Kamchatski Time',
- 'dstlongname' => 'Petropavlovsk-Kamchatski Summer Time'),
- 'Philippines Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'PHT',
- 'longname' => 'Philippines Time'),
- 'Phoenix Is. Time' => array(
- 'offset' => 46800000,
- 'shortname' => 'PHOT',
- 'longname' => 'Phoenix Is. Time'),
- 'Pierre & Miquelon Standard Time' => array(
- 'offset' => -10800000,
- 'shortname' => 'PMST',
- 'dstshortname' => 'PMDT',
- 'longname' => 'Pierre & Miquelon Standard Time',
- 'dstlongname' => 'Pierre & Miquelon Daylight Time'),
- 'Pitcairn Standard Time' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'longname' => 'Pitcairn Standard Time'),
- 'Ponape Time' => array(
- 'offset' => 39600000,
- 'shortname' => 'PONT',
- 'longname' => 'Ponape Time'),
- 'Reunion Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'RET',
- 'longname' => 'Reunion Time'),
- 'SST' => array(
- 'offset' => 39600000,
- 'shortname' => 'SBT',
- 'longname' => 'Solomon Is. Time'),
- 'Sakhalin Time' => array(
- 'offset' => 36000000,
- 'shortname' => 'SAKT',
- 'dstshortname' => 'SAKST',
- 'longname' => 'Sakhalin Time',
- 'dstlongname' => 'Sakhalin Summer Time'),
- 'Samara Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'SAMT',
- 'dstshortname' => 'SAMST',
- 'longname' => 'Samara Time',
- 'dstlongname' => 'Samara Summer Time'),
- 'Samoa Standard Time' => array(
- 'offset' => -39600000,
- 'shortname' => 'SST',
- 'longname' => 'Samoa Standard Time'),
- 'Seychelles Time' => array(
- 'offset' => 14400000,
- 'shortname' => 'SCT',
- 'longname' => 'Seychelles Time'),
- 'Singapore Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'SGT',
- 'longname' => 'Singapore Time'),
- 'Solomon Is. Time' => array(
- 'offset' => 39600000,
- 'shortname' => 'SBT',
- 'longname' => 'Solomon Is. Time'),
- 'South Africa Standard Time' => array(
- 'offset' => 7200000,
- 'shortname' => 'SAST',
- 'longname' => 'South Africa Standard Time'),
- 'South Georgia Standard Time' => array(
- 'offset' => -7200000,
- 'shortname' => 'GST',
- 'longname' => 'South Georgia Standard Time'),
- 'Sri Lanka Time' => array(
- 'offset' => 21600000,
- 'shortname' => 'LKT',
- 'longname' => 'Sri Lanka Time'),
- 'Suriname Time' => array(
- 'offset' => -10800000,
- 'shortname' => 'SRT',
- 'longname' => 'Suriname Time'),
- 'Syowa Time' => array(
- 'offset' => 10800000,
- 'shortname' => 'SYOT',
- 'longname' => 'Syowa Time'),
- 'SystemV/AST4' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => '',
- 'longname' => 'Atlantic Standard Time'),
- 'SystemV/AST4ADT' => array(
- 'offset' => -14400000,
- 'shortname' => 'AST',
- 'dstshortname' => 'ADT',
- 'longname' => 'Atlantic Standard Time',
- 'dstlongname' => 'Atlantic Daylight Time',
- 'summertimeoffset' => 3600000000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 21600000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 18000000000),
- 'SystemV/CST6' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => '',
- 'longname' => 'Central Standard Time'),
- 'SystemV/CST6CDT' => array(
- 'offset' => -21600000,
- 'shortname' => 'CST',
- 'dstshortname' => 'CDT',
- 'longname' => 'Central Standard Time',
- 'dstlongname' => 'Central Daylight Time',
- 'summertimeoffset' => 3600000000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 28800000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 25200000000),
- 'SystemV/EST5' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => '',
- 'longname' => 'Eastern Standard Time'),
- 'SystemV/EST5EDT' => array(
- 'offset' => -18000000,
- 'shortname' => 'EST',
- 'dstshortname' => 'EDT',
- 'longname' => 'Eastern Standard Time',
- 'dstlongname' => 'Eastern Daylight Time',
- 'summertimeoffset' => 3600000000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 25200000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 21600000000),
- 'SystemV/HST10' => array(
- 'offset' => -36000000,
- 'shortname' => 'HST',
- 'dstshortname' => '',
- 'longname' => 'Hawaii Standard Time'),
- 'SystemV/MST7' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => '',
- 'longname' => 'Mountain Standard Time'),
- 'SystemV/MST7MDT' => array(
- 'offset' => -25200000,
- 'shortname' => 'MST',
- 'dstshortname' => 'MDT',
- 'longname' => 'Mountain Standard Time',
- 'dstlongname' => 'Mountain Daylight Time',
- 'summertimeoffset' => 3600000000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 32400000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 28800000000),
- 'SystemV/PST8' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => '',
- 'longname' => 'Pitcairn Standard Time'),
- 'SystemV/PST8PDT' => array(
- 'offset' => -28800000,
- 'shortname' => 'PST',
- 'dstshortname' => 'PDT',
- 'longname' => 'Pacific Standard Time',
- 'dstlongname' => 'Pacific Daylight Time',
- 'summertimeoffset' => 3600000000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 36000000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 32400000000),
- 'SystemV/YST9' => array(
- 'offset' => -32400000,
- 'shortname' => 'YST',
- 'dstshortname' => '',
- 'longname' => 'Gambier Time'),
- 'SystemV/YST9YDT' => array(
- 'offset' => -32400000,
- 'shortname' => 'YST',
- 'dstshortname' => 'YDT',
- 'longname' => 'Alaska Standard Time',
- 'dstlongname' => 'Alaska Daylight Time',
- 'summertimeoffset' => 3600000000,
- 'summertimestartmonth' => 4,
- 'summertimestartday' => 'lastSun',
- 'summertimestarttime' => 39600000000,
- 'summertimeendmonth' => 10,
- 'summertimeendday' => 'lastSun',
- 'summertimeendtime' => 36000000000),
- 'Tahiti Time' => array(
- 'offset' => -36000000,
- 'shortname' => 'TAHT',
- 'longname' => 'Tahiti Time'),
- 'Tajikistan Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'TJT',
- 'longname' => 'Tajikistan Time'),
- 'Tokelau Time' => array(
- 'offset' => -36000000,
- 'shortname' => 'TKT',
- 'longname' => 'Tokelau Time'),
- 'Tonga Time' => array(
- 'offset' => 46800000,
- 'shortname' => 'TOT',
- 'longname' => 'Tonga Time'),
- 'Truk Time' => array(
- 'offset' => 36000000,
- 'shortname' => 'TRUT',
- 'longname' => 'Truk Time'),
- 'Turkmenistan Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'TMT',
- 'longname' => 'Turkmenistan Time'),
- 'Tuvalu Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'TVT',
- 'longname' => 'Tuvalu Time'),
- 'Ulaanbaatar Time' => array(
- 'offset' => 28800000,
- 'shortname' => 'ULAT',
- 'longname' => 'Ulaanbaatar Time'),
- 'Uruguay Time' => array(
- 'offset' => -10800000,
- 'shortname' => 'UYT',
- 'longname' => 'Uruguay Time'),
- 'Uzbekistan Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'UZT',
- 'longname' => 'Uzbekistan Time'),
- 'VST' => array(
- 'offset' => 25200000,
- 'shortname' => 'ICT',
- 'longname' => 'Indochina Time'),
- 'Vanuatu Time' => array(
- 'offset' => 39600000,
- 'shortname' => 'VUT',
- 'longname' => 'Vanuatu Time'),
- 'Venezuela Time' => array(
- 'offset' => -14400000,
- 'shortname' => 'VET',
- 'longname' => 'Venezuela Time'),
- 'Vladivostok Time' => array(
- 'offset' => 36000000,
- 'shortname' => 'VLAT',
- 'dstshortname' => 'VLAST',
- 'longname' => 'Vladivostok Time',
- 'dstlongname' => 'Vladivostok Summer Time'),
- 'Vostok time' => array(
- 'offset' => 21600000,
- 'shortname' => 'VOST',
- 'longname' => 'Vostok time'),
- 'Wake Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'WAKT',
- 'longname' => 'Wake Time'),
- 'Wallis & Futuna Time' => array(
- 'offset' => 43200000,
- 'shortname' => 'WFT',
- 'longname' => 'Wallis & Futuna Time'),
- 'West Indonesia Time' => array(
- 'offset' => 25200000,
- 'shortname' => 'WIT',
- 'longname' => 'West Indonesia Time'),
- 'West Samoa Time' => array(
- 'offset' => -39600000,
- 'shortname' => 'WST',
- 'longname' => 'West Samoa Time'),
- 'Western African Time' => array(
- 'offset' => 3600000,
- 'shortname' => 'WAT',
- 'dstshortname' => 'WAST',
- 'longname' => 'Western African Time',
- 'dstlongname' => 'Western African Summer Time'),
- 'Western European Time' => array(
- 'offset' => 0,
- 'shortname' => 'WET',
- 'dstshortname' => 'WEST',
- 'longname' => 'Western European Time',
- 'dstlongname' => 'Western European Summer Time'),
- 'Western Greenland Time' => array(
- 'offset' => -10800000,
- 'shortname' => 'WGT',
- 'dstshortname' => 'WGST',
- 'longname' => 'Western Greenland Time',
- 'dstlongname' => 'Western Greenland Summer Time'),
- 'Western Standard Time (Australia)' => array(
- 'offset' => 28800000,
- 'shortname' => 'WST',
- 'longname' => 'Western Standard Time (Australia)'),
- 'Yakutsk Time' => array(
- 'offset' => 32400000,
- 'shortname' => 'YAKT',
- 'dstshortname' => 'YAKST',
- 'longname' => 'Yakutsk Time',
- 'dstlongname' => 'Yaktsk Summer Time'),
- 'Yap Time' => array(
- 'offset' => 36000000,
- 'shortname' => 'YAPT',
- 'longname' => 'Yap Time'),
- 'Yekaterinburg Time' => array(
- 'offset' => 18000000,
- 'shortname' => 'YEKT',
- 'dstshortname' => 'YEKST',
- 'longname' => 'Yekaterinburg Time',
- 'dstlongname' => 'Yekaterinburg Summer Time'),
-);
-
-/**
- * Initialize default timezone
- *
- * First try php.ini directive, then the value returned by date("e"), then
- * _DATE_TIMEZONE_DEFAULT global, then PHP_TZ environment variable, then TZ
- * environment variable.
- */
-if (isset($GLOBALS['_DATE_TIMEZONE_DEFAULT'])
- && Date_TimeZone::isValidID($GLOBALS['_DATE_TIMEZONE_DEFAULT'])) {
- Date_TimeZone::setDefault($GLOBALS['_DATE_TIMEZONE_DEFAULT']);
-} elseif (function_exists('version_compare') &&
- version_compare(phpversion(), "5.1.0", ">=") &&
- (
- Date_TimeZone::isValidID($ps_id = date_default_timezone_get()) ||
- Date_TimeZone::isValidID($ps_id = date("e"))
- )
-) {
- Date_TimeZone::setDefault($ps_id);
-} elseif (getenv('PHP_TZ') && Date_TimeZone::isValidID(getenv('PHP_TZ'))) {
- Date_TimeZone::setDefault(getenv('PHP_TZ'));
-} elseif (getenv('TZ') && Date_TimeZone::isValidID(getenv('TZ'))) {
- Date_TimeZone::setDefault(getenv('TZ'));
-} elseif (Date_TimeZone::isValidID(date('T'))) {
- Date_TimeZone::setDefault(date('T'));
-} else {
- Date_TimeZone::setDefault('UTC');
-}
-
-/*
- * Local variables:
- * mode: php
- * tab-width: 4
- * c-basic-offset: 4
- * c-hanging-comment-ender-p: nil
- * End:
- */
+++ /dev/null
-Copyright (c) 1997-2006 Baba Buehler, Pierre-Alain Joye
-All rights reserved
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-3. The names of Baba Buehler, Pierre-Alain Joye nor the names of
- contributors may not be used to endorse or promote products
- derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
+++ /dev/null
-$Id$
-
-TODO
-
-- Fix once the timezone problem
-- Once TZ works nicely, update the testunit_date and use
- the real timezone and dct to check the expected time offset
-- Clean the test cases and atomic display instead of a global ok or failed
-- Write the docs....
-- More strict complaint againts ISO 8601
-- Complaint againts RFC 822 Date and Time Specification
-- Complaint againts ISO 3339
+++ /dev/null
-<html>
-<head>
- <title>Date Example</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <style>
- span.code {
- font-family: Monospace;
- }
- </style>
-</head>
-<body>
-<?php
-
-require_once "Date.php";
-
-function echo_code($ps_date)
-{
- echo '<span class="code">' . $ps_date . "</span><br />\n";
-}
-
-
-$date = new Date();
-
-
-?>
-<h4>Object is set to currrent time and local time zone by default:</h4>
-<?php
-
-echo_code($date->format('%d/%m/%Y %H.%M.%S%O (%Z)'));
-echo_code($date->format2('DD/MM/YYYY HH.MI.SSTZO (TZC - TZN)'));
-echo_code($date->getDate(DATE_FORMAT_ISO));
-
-
-?>
-<h4>Set date to 1st February, 1991:</h4>
-<?php
-
-$date->setDate("1991-02-01 01:02:03");
-
-echo_code($date->format('%d/%m/%Y %H.%M.%S'));
-echo_code($date->format2('DD/MM/YYYY HH.MI.SS'));
-
-// Display day, month spelled out:
-//
-echo_code($date->format('%A, %e %B %Y, %H.%M.%S'));
-echo_code($date->format2('NPDay, NPDDth Month YYYY, HH.MI.SS'));
-
-
-?>
-<h4>Time without padding (i.e. leading noughts), and with short year:</h4>
-<?php
-
-echo_code($date->format('%e/%m/%y %h.%M.%S'));
-echo_code($date->format2('NPDD/NPMM/YY NPHH.MI.SS'));
-
-
-?>
-<h4>Conversion to another time zone:</h4>
-<?php
-
-$date->convertTZbyID("Asia/Calcutta");
-
-echo_code($date->format2('"Time zone ID:" TZR'));
-echo_code($date->format2('"Time zone name:" TZN'));
-echo_code($date->format2('"Time zone code:" TZC'));
-echo_code($date->format2('"Time zone offset:" TZO'));
-echo "<br />\n";
-echo_code($date->format2('DD/MM/YYYY HH.MI.SSTZO (TZC)'));
-
-
-?>
-<h4>Addition/Subtraction:</h4>
-<?php
-
-$date->addDays(-1);
-echo_code($date->format2('DD/MM/YYYY HH.MI.SS'));
-
-$date->addHours(13);
-echo_code($date->format2('DD/MM/YYYY HH.MI.SS'));
-
-
-?>
-<h4>12-hour time:</h4>
-<?php
-
-echo_code($date->format('%d/%m/%Y %I.%M.%S %p'));
-echo_code($date->format2('DD/MM/YYYY HH12.MI.SS am'));
-
-
-?>
-<h4>Display micro-time:</h4>
-<?php
-
-$date->setSecond(3.201282);
-
-echo_code($date->format('%d/%m/%Y %I.%M.%s'));
-echo_code($date->format2('DD/MM/YYYY HH12.MI.SS.FFFFFF'));
-
-
-?>
-<h4>Convert to Unix time:</h4>
-<?php
-
-echo_code($hn_unixtime = $date->format2('U'));
-
-
-?>
-<h4>Convert Unix time back to Date object:</h4>
-<?php
-
-$date2 = new Date($hn_unixtime);
-
-echo_code($date2->format2("DD/MM/YYYY HH.MI.SSTZO"));
-
-
-?>
-<h4>Compare two times for equality:</h4>
-<?php
-
-if ($date2->before($date)) {
- echo "second date is earlier (because Unix time ignores the part-second)<br />\n";
-}
-
-$date->trunc(DATE_PRECISION_SECOND);
-
-if ($date2->equals($date)) {
- echo "dates are now the same<br />\n";
-}
-
-
-?>
-<br/>
-<br/>
-<br/>
-<br/>
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2003 Leandro Lucarella |
-// +----------------------------------------------------------------------+
-// | This source file is subject to the New BSD license, That is bundled |
-// | with this package in the file LICENSE, and is available through |
-// | the world-wide-web at |
-// | http://www.opensource.org/licenses/bsd-license.php |
-// | If you did not receive a copy of the new BSDlicense and are unable |
-// | to obtain it through the world-wide-web, please send a note to |
-// | pear-dev@lists.php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Author: Leandro Lucarella <llucax@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id$
-//
-
-require_once 'Date.php';
-require_once 'Date/Span.php';
-require_once 'PHPUnit/Autoload.php';
-
-/**
- * Test case for Date_Span
- *
- * @package Date
- * @author Leandro Lucarella <llucax@php.net>
- */
-class Date_SpanTest extends PHPUnit_Framework_TestCase
-{
- public $time;
-
- public function setUp()
- {
- $this->time = new Date_Span(97531);
- }
-
- public function tearDown()
- {
- unset($this->time);
- }
-
- public function testSetFromArray()
- {
- $this->time->setFromArray(array(5, 48.5, 28.5, 31));
- $this->assertEquals(
- '7:0:59:1',
- sprintf(
- '%d:%d:%d:%d',
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetFromString()
- {
- $this->time->setFromString('5:00:59:31');
- $this->assertEquals(
- '5:0:59:31',
- sprintf(
- '%d:%d:%d:%d',
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetFromSeconds()
- {
- $this->time->setFromSeconds(434344);
- $this->assertEquals(
- '5:0:39:4',
- sprintf(
- '%d:%d:%d:%d',
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetFromMinutes()
- {
- $this->time->setFromMinutes(7860.0166666666);
- $this->assertEquals(
- '5:11:0:1',
- sprintf(
- '%d:%d:%d:%d',
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetFromHours()
- {
- $this->time->setFromHours(50.12345);
- $this->assertEquals(
- '2:2:7:24',
- sprintf(
- '%d:%d:%d:%d',
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetFromDays()
- {
- $this->time->setFromDays(pi());
- $this->assertEquals(
- '3:3:23:54',
- sprintf(
- '%d:%d:%d:%d',
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetFromDateDiff()
- {
- $this->time->setFromDateDiff(
- new Date('2004-03-10 01:15:59'),
- new Date('2003-03-10 00:10:50')
- );
- $this->assertEquals(
- '366:1:5:9',
- sprintf(
- '%d:%d:%d:%d',
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testCopy()
- {
- $time = new Date_Span();
- $time->copy($this->time);
- $this->assertEquals(
- sprintf(
- '%d:%d:%d:%d',
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- ),
- sprintf(
- '%d:%d:%d:%d',
- $time->day,
- $time->hour,
- $time->minute,
- $time->second
- )
- );
- }
-
- public function testFormat()
- {
- $codes = array(
- 'C' => '1, 03:05:31',
- 'd' => '1.1288310185185',
- 'D' => '1',
- 'e' => '27.091944444444',
- 'f' => '1625.5166666667',
- 'g' => '97531',
- 'h' => '3',
- 'H' => '03',
- 'i' => '3',
- 'I' => '03',
- 'm' => '5',
- 'M' => '05',
- 'n' => "\n",
- 'p' => 'am',
- 'P' => 'AM',
- 'r' => '03:05:31 am',
- 'R' => '03:05',
- 's' => '31',
- 'S' => '31',
- 't' => "\t",
- 'T' => '03:05:31',
- '%' => '%',
- );
- foreach ($codes as $code => $expected) {
- $this->assertEquals(
- "$code: $expected",
- $this->time->format("$code: %$code")
- );
- }
- }
-
- public function testAdd()
- {
- $this->time->add(new Date_Span(6000));
- $result = $this->time->toSeconds();
- $expected = 103531;
- $this->assertEquals($expected, $result);
- }
-
- public function testSubtract()
- {
- $this->time->subtract(new Date_Span(6000));
- $result = $this->time->toSeconds();
- $expected = 91531;
- $this->assertEquals($expected, $result);
- }
-}
+++ /dev/null
-<?php
-// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2003 Marshall Roch |
-// +----------------------------------------------------------------------+
-// | This source file is subject to the New BSD license, That is bundled |
-// | with this package in the file LICENSE, and is available through |
-// | the world-wide-web at |
-// | http://www.opensource.org/licenses/bsd-license.php |
-// | If you did not receive a copy of the new BSDlicense and are unable |
-// | to obtain it through the world-wide-web, please send a note to |
-// | pear-dev@lists.php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Author: Marshall Roch <mroch@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id$
-//
-
-require_once 'Date.php';
-require_once 'PHPUnit/Autoload.php';
-
-class myDate extends Date
-{
- public function myDate($date)
- {
- $this->Date($date);
- }
-}
-
-/**
- * Test case for Date
- *
- * @package Date
- * @author Marshall Roch <mroch@php.net>
- */
-class Date_Test extends PHPUnit_Framework_TestCase
-{
- public $time;
-
- public function setUp()
- {
- $this->time = new Date("2003-10-04 14:03:24Z");
- }
-
- public function tearDown()
- {
- unset($this->time);
- }
-
- public function testDateNull()
- {
- $time = new Date();
- $this->assertEquals(
- date('Y-m-d H:i:s'),
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $time->year,
- $time->month,
- $time->day,
- $time->hour,
- $time->minute,
- $time->second
- )
- );
- }
-
- public function testAbstraction()
- {
- $d = new Date();
- $my = new myDate($d);
- $this->assertEquals($d->getDate(), $my->getDate());
- }
-
- public function testDateCopy()
- {
- $temp = new Date($this->time);
- $this->assertEquals($temp, $this->time);
- }
-
- public function testDateISO()
- {
- $temp = new Date("2003-10-04 14:03:24");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $temp->year,
- $temp->month,
- $temp->day,
- $temp->hour,
- $temp->minute,
- $temp->second
- )
- );
- }
-
- public function testDateISOBasic()
- {
- $temp = new Date("20031004T140324");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $temp->year,
- $temp->month,
- $temp->day,
- $temp->hour,
- $temp->minute,
- $temp->second
- )
- );
- }
-
- public function testDateISOExtended()
- {
- $temp = new Date("2003-10-04T14:03:24");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $temp->year,
- $temp->month,
- $temp->day,
- $temp->hour,
- $temp->minute,
- $temp->second
- )
- );
- }
-
- public function testDateISOTimestamp()
- {
- $temp = new Date("20031004140324");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $temp->year,
- $temp->month,
- $temp->day,
- $temp->hour,
- $temp->minute,
- $temp->second
- )
- );
- }
-
- public function testDateUnixtime()
- {
- $temp = new Date();
- $temp->setTZbyID("UTC");
- $temp->setDate(strtotime("2003-10-04 14:03:24Z"));
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $temp->year,
- $temp->month,
- $temp->day,
- $temp->hour,
- $temp->minute,
- $temp->second
- )
- );
- }
-
- public function testDateUnixtime2()
- {
- $temp = new Date();
- $temp->setTZbyID("UTC-05:30");
- $temp->setDate(strtotime("2003-10-04 14:03:24Z"));
- $temp->convertTZbyID("UTC");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $temp->year,
- $temp->month,
- $temp->day,
- $temp->hour,
- $temp->minute,
- $temp->second
- )
- );
- }
-
- public function testDateUnixtime3()
- {
- $temp = new Date();
- $temp->setTZbyID("America/Chicago");
- $temp->setDate(strtotime("2003-10-04 14:03:24Z"));
- $temp->convertTZbyID("UTC");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $temp->year,
- $temp->month,
- $temp->day,
- $temp->hour,
- $temp->minute,
- $temp->second
- )
- );
- }
-
- public function testDateUnixtime4()
- {
- $temp = new Date();
- $temp->setTZbyID("Europe/London");
- $temp->setDate(strtotime("2003-10-04 14:03:24Z")); // Summer time in London
- $temp->setTZbyID("UTC");
- $this->assertEquals(
- '2003-10-04 15:03:24', // Preserves London local time (15.03)
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $temp->year,
- $temp->month,
- $temp->day,
- $temp->hour,
- $temp->minute,
- $temp->second
- )
- );
- }
-
- public function testSetDateISO()
- {
- $this->time->setDate("2003-10-04 14:03:24");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $this->time->year,
- $this->time->month,
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetDateISOBasic()
- {
- $this->time->setDate("20031004T140324");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $this->time->year,
- $this->time->month,
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetDateISOExtended()
- {
- $this->time->setDate("2003-10-04T14:03:24");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $this->time->year,
- $this->time->month,
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetDateTimestamp()
- {
- $this->time->setDate("20031004140324");
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $this->time->year,
- $this->time->month,
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetDateUnixtime()
- {
- $this->time->setDate(strtotime("2003-10-04 14:03:24Z"));
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $this->time->year,
- $this->time->month,
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetDateUnixtime2()
- {
- $hs_oldtz = $this->time->getTZID();
- $this->time->setTZbyID("UTC-05:30");
- $this->time->setDate(strtotime("2003-10-04 14:03:24Z"));
- $this->time->convertTZbyID($hs_oldtz);
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $this->time->year,
- $this->time->month,
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testSetDateUnixtime3()
- {
- $hs_oldtz = $this->time->getTZID();
- $this->time->setTZbyID("America/Chicago");
- $this->time->setDate(strtotime("2003-10-04 14:03:24Z"));
- $this->time->convertTZbyID($hs_oldtz);
- $this->assertEquals(
- '2003-10-04 14:03:24',
- sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $this->time->year,
- $this->time->month,
- $this->time->day,
- $this->time->hour,
- $this->time->minute,
- $this->time->second
- )
- );
- }
-
- public function testGetDateISO()
- {
- $date = $this->time->getDate(DATE_FORMAT_ISO);
- $this->assertEquals('2003-10-04 14:03:24', $date);
- }
-
- public function testGetDateISOBasic()
- {
- $date = $this->time->getDate(DATE_FORMAT_ISO_BASIC);
- $this->assertEquals('20031004T140324Z', $date);
- }
-
- public function testGetDateISOExtended()
- {
- $date = $this->time->getDate(DATE_FORMAT_ISO_EXTENDED);
- $this->assertEquals('2003-10-04T14:03:24Z', $date);
- }
-
- public function testGetDateTimestamp()
- {
- $date = $this->time->getDate(DATE_FORMAT_TIMESTAMP);
- $this->assertEquals('20031004140324', $date);
- }
-
- public function testGetDateUnixtime()
- {
- $date = $this->time->getDate(DATE_FORMAT_UNIXTIME);
- $this->assertEquals(strtotime('2003-10-04 14:03:24Z'), $date);
- }
-
- public function testGetDateUnixtime2()
- {
- $hs_oldtz = $this->time->getTZID();
- $this->time->convertTZbyID("UTC-05:30");
- $date = $this->time->getDate(DATE_FORMAT_UNIXTIME);
- $this->assertEquals(strtotime('2003-10-04 14:03:24Z'), $date);
- $this->time->convertTZbyID($hs_oldtz);
- }
-
- public function testGetDateUnixtime3()
- {
- $hs_oldtz = $this->time->getTZID();
- $this->time->convertTZbyID("America/Chicago");
- $date = $this->time->getDate(DATE_FORMAT_UNIXTIME);
- $this->assertEquals(strtotime('2003-10-04 14:03:24Z'), $date);
- $this->time->convertTZbyID($hs_oldtz);
- }
-
- public function testFormatLikeStrftime()
- {
- $codes = array(
- 'a' => 'Sat',
- 'A' => 'Saturday',
- 'b' => 'Oct',
- 'B' => 'October',
- 'C' => '20',
- 'd' => '04',
- 'D' => '10/04/2003',
- 'e' => '4',
- 'H' => '14',
- 'I' => '02',
- 'j' => '277',
- 'm' => '10',
- 'M' => '03',
- 'n' => "\n",
- 'O' => '+00:00',
- 'o' => '+00:00',
- 'p' => 'pm',
- 'P' => 'PM',
- 'r' => '02:03:24 PM',
- 'R' => '14:03',
- 'S' => '24',
- 't' => "\t",
- 'T' => '14:03:24',
- 'w' => '6',
- 'U' => '39',
- 'y' => '03',
- 'Y' => '2003',
- '%' => '%'
- );
-
- foreach ($codes as $code => $expected) {
- $this->assertEquals(
- "$code: $expected",
- $this->time->formatLikeStrftime("$code: %$code")
- );
- }
- }
-
- public function testToUTCbyOffset()
- {
- $this->time->setTZbyID('EST');
- $this->time->toUTC();
- $temp = new Date("2003-10-04 14:03:24");
- $temp->toUTCbyOffset("-05:00");
-
- $this->assertEquals($temp, $this->time);
- }
-}
+++ /dev/null
---TEST--
-Bug #11313 DST time change not handled correctly
---FILE--
-<?php
-
-date_default_timezone_set('Europe/Moscow');
-//include_once('debug.php');
-require_once 'Date.php';
-
-$date = new Date('2007-03-25 03:00:04');
-$tmp = new Date($date);
-
-$PRINT_FORMAT = "%Y-%m-%d %H:%M:%S %Z%O";
-
-//var_dump($date->tz, 'TimeZone');
-printf("% 50s: %s\n", "Actual date", $date->format($PRINT_FORMAT));
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('0:00:00:05'));
-printf(
- "% 50s: %s\n",
- 'Subtracting 5 seconds',
- $tmp->format($PRINT_FORMAT)
-);
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('0:00:20:00'));
-printf(
- "% 50s: %s\n",
- "Subtracting 20 minutes",
- $tmp->format($PRINT_FORMAT)
-);
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('0:02:30:00'));
-printf(
- "% 50s: %s\n",
- "Subtracting 2 hours 30 minutes",
- $tmp->format($PRINT_FORMAT)
-);
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('0:10:00:00'));
-printf(
- "% 50s: %s\n",
- "Subtracting 10 hours",
- $tmp->format($PRINT_FORMAT)
-);
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('3:00:00:00'));
-printf(
- "% 50s: %s\n",
- "Subtracting 3 days",
- $tmp->format($PRINT_FORMAT)
-);
-
-?>
---EXPECT--
- Actual date: 2007-03-25 03:00:04 MSD+04:00
- Subtracting 5 seconds: 2007-03-25 01:59:59 MSK+03:00
- Subtracting 20 minutes: 2007-03-25 01:40:04 MSK+03:00
- Subtracting 2 hours 30 minutes: 2007-03-24 23:30:04 MSK+03:00
- Subtracting 10 hours: 2007-03-24 16:00:04 MSK+03:00
- Subtracting 3 days: 2007-03-22 02:00:04 MSK+03:00
+++ /dev/null
---TEST--
-Bug #13376 setFromDateDiff change the source of Date objects
---FILE--
-<?php
-/*
- * Test for: Date_Span
- * Part tested: Date_Span::setFromDateDiff()
- *
- * This test should be tested on both PHP4 and PHP5 to see the different.
- *
- * $Id$
- */
-
-require_once 'Date.php';
-
-$startDate = new Date('2008-02-29 00:00:00');
-$endDate = new Date('2008-03-01 23:30:10');
-print 'Days: ' . $startDate->format('%Y-%m-%d') . ' to ' . $endDate->format('%Y-%m-%d') . "\n";
-
-$diff = new Date_Span();
-$diff->setFromDateDiff($startDate, $endDate);
-
-// still same instances?
-print 'Days: ' . $startDate->format('%Y-%m-%d') . ' to ' . $endDate->format('%Y-%m-%d') . "\n";
-
-// what about diff?
-print 'Diff: ' . $diff->format('%D day %H hours %M minutes %S seconds') . "\n";
-?>
---EXPECT--
-Days: 2008-02-29 to 2008-03-01
-Days: 2008-02-29 to 2008-03-01
-Diff: 1 day 23 hours 30 minutes 10 seconds
+++ /dev/null
---TEST--
-Bug #13545 Date_Span::set() doesn't work when passed an int and format
---FILE--
-<?php
-
-require_once 'Date.php';
-
-$span = new Date_Span(1, '%D');
-echo $span->format('%D-%S');
-
-?>
---EXPECT--
-1-00
+++ /dev/null
---TEST--
-Bug #19568 setDate() handles ISO week dates incorrectly
---FILE--
-<?php
-require_once 'Date.php';
-
-$x = new Date('2012-W49-1');
-print $x->year . "\n";
-print $x->month . "\n";
-print $x->day . "\n";
-
-$y = new Date('2012-W50-1');
-print $y->year . "\n";
-print $y->month . "\n";
-print $y->day . "\n";
---EXPECT--
-2012
-12
-3
-2012
-12
-10
+++ /dev/null
---TEST--
-Bug #2378: Date::getDate(DATE_FORMAT_UNIXTIME) doesn't convert to GMT
---FILE--
-<?php
-
-require_once "Date.php";
-
-
-$date =& new Date(1095935549);
-echo $date->getTime()."\n";
-$date->convertTZbyID('America/Los_Angeles');
-echo $date->getTime()."\n";
-
-?>
---EXPECT--
-1095935549
-1095935549
+++ /dev/null
---TEST--
-Bug #2378: Date::getDate(DATE_FORMAT_UNIXTIME) doesn't convert to GMT
---FILE--
-<?php
-/**
- * Test for: Date
- * Parts tested: Date::getTime(), Date::getDate(DATE_FORMAT_UNIXTIME)
- */
-
-require_once 'Date.php';
-
-$dates = array(
- '1969-12-31T18:30:00-05:30', // 0
- '1970-01-01T07:00:00+07:00', // 0
- '1970-01-01T00:00:00Z', // 0
- '1998-12-31T23:59:59Z', // 915148799
-// '1998-12-31T23:59:60Z', // 915148800
- '1999-01-01T00:00:00Z', // 915148800 (no leap second)
- '2001-09-09T01:46:40Z', // 1000000000
- '2004-01-10T13:37:04Z', // 2^30
- '2005-03-18T01:58:31Z', // 1111111111
- '2006-12-08T01:00:00Z', // 1165539600
- '2009-02-13T23:31:30Z', // 1234567890
- '2033-05-18T03:33:20Z', // 2000000000
- );
-
-$date = new Date();
-foreach ($dates as $hs_date) {
- $date->setDate($hs_date);
-
- if (PEAR::isError($res = $date->convertTZbyID('UTC'))) {
- print_r($res);
- exit();
- }
- $ts = $date->getTime();
- echo 'Greenwich = ' . str_pad($ts, 10) . ' - ' . $date->formatLikeSQL('YYYY-MM-DD HH:MI:SSSTZH:TZM') . "\n";
-
- if (PEAR::isError($res = $date->convertTZbyID('Europe/London'))) {
- print_r($res);
- exit();
- }
- $ts = $date->getTime();
- echo 'London ' . $date->formatLikeSQL('("UTC"NPSTZH)') . " = " . str_pad($ts, 10) . ' - ' . $date->formatLikeSQL('YYYY-MM-DD HH:MI:SSSTZH:TZM') . "\n";
-
- if (PEAR::isError($res = $date->convertTZbyID('Europe/Paris'))) {
- print_r($res);
- exit();
- }
- $ts = $date->getTime();
- echo 'Paris ' . $date->formatLikeSQL('("UTC"NPSTZH)') . " = " . str_pad($ts, 10) . ' - ' . $date->formatLikeSQL('YYYY-MM-DD HH:MI:SSSTZH:TZM') . "\n";
-
- if (PEAR::isError($res = $date->convertTZbyID('Asia/Jakarta'))) {
- print_r($res);
- exit();
- }
- $ts = $date->getTime();
- echo 'Jakarta ' . $date->formatLikeSQL('("UTC"NPSTZH)') . " = " . str_pad($ts, 10) . ' - ' . $date->formatLikeSQL('YYYY-MM-DD HH:MI:SSSTZH:TZM') . "\n";
-}
-?>
---EXPECT--
-Greenwich = 0 - 1970-01-01 00:00:00+00:00
-London (UTC+0) = 0 - 1970-01-01 00:00:00+00:00
-Paris (UTC+1) = 0 - 1970-01-01 01:00:00+01:00
-Jakarta (UTC+7) = 0 - 1970-01-01 07:00:00+07:00
-Greenwich = 0 - 1970-01-01 00:00:00+00:00
-London (UTC+0) = 0 - 1970-01-01 00:00:00+00:00
-Paris (UTC+1) = 0 - 1970-01-01 01:00:00+01:00
-Jakarta (UTC+7) = 0 - 1970-01-01 07:00:00+07:00
-Greenwich = 0 - 1970-01-01 00:00:00+00:00
-London (UTC+0) = 0 - 1970-01-01 00:00:00+00:00
-Paris (UTC+1) = 0 - 1970-01-01 01:00:00+01:00
-Jakarta (UTC+7) = 0 - 1970-01-01 07:00:00+07:00
-Greenwich = 915148799 - 1998-12-31 23:59:59+00:00
-London (UTC+0) = 915148799 - 1998-12-31 23:59:59+00:00
-Paris (UTC+1) = 915148799 - 1999-01-01 00:59:59+01:00
-Jakarta (UTC+7) = 915148799 - 1999-01-01 06:59:59+07:00
-Greenwich = 915148800 - 1999-01-01 00:00:00+00:00
-London (UTC+0) = 915148800 - 1999-01-01 00:00:00+00:00
-Paris (UTC+1) = 915148800 - 1999-01-01 01:00:00+01:00
-Jakarta (UTC+7) = 915148800 - 1999-01-01 07:00:00+07:00
-Greenwich = 1000000000 - 2001-09-09 01:46:40+00:00
-London (UTC+1) = 1000000000 - 2001-09-09 02:46:40+01:00
-Paris (UTC+2) = 1000000000 - 2001-09-09 03:46:40+02:00
-Jakarta (UTC+7) = 1000000000 - 2001-09-09 08:46:40+07:00
-Greenwich = 1073741824 - 2004-01-10 13:37:04+00:00
-London (UTC+0) = 1073741824 - 2004-01-10 13:37:04+00:00
-Paris (UTC+1) = 1073741824 - 2004-01-10 14:37:04+01:00
-Jakarta (UTC+7) = 1073741824 - 2004-01-10 20:37:04+07:00
-Greenwich = 1111111111 - 2005-03-18 01:58:31+00:00
-London (UTC+0) = 1111111111 - 2005-03-18 01:58:31+00:00
-Paris (UTC+1) = 1111111111 - 2005-03-18 02:58:31+01:00
-Jakarta (UTC+7) = 1111111111 - 2005-03-18 08:58:31+07:00
-Greenwich = 1165539600 - 2006-12-08 01:00:00+00:00
-London (UTC+0) = 1165539600 - 2006-12-08 01:00:00+00:00
-Paris (UTC+1) = 1165539600 - 2006-12-08 02:00:00+01:00
-Jakarta (UTC+7) = 1165539600 - 2006-12-08 08:00:00+07:00
-Greenwich = 1234567890 - 2009-02-13 23:31:30+00:00
-London (UTC+0) = 1234567890 - 2009-02-13 23:31:30+00:00
-Paris (UTC+1) = 1234567890 - 2009-02-14 00:31:30+01:00
-Jakarta (UTC+7) = 1234567890 - 2009-02-14 06:31:30+07:00
-Greenwich = 2000000000 - 2033-05-18 03:33:20+00:00
-London (UTC+1) = 2000000000 - 2033-05-18 04:33:20+01:00
-Paris (UTC+2) = 2000000000 - 2033-05-18 05:33:20+02:00
-Jakarta (UTC+7) = 2000000000 - 2033-05-18 10:33:20+07:00
+++ /dev/null
---TEST--
-Bug #445: Date does not handle DATE_FORMAT_ISO_EXTENDED correctly
---FILE--
-<?php
-/**
- * Test for: Date
- * Parts tested: DATE_FORMAT_ISO_EXTENDED constant
- */
-
-require_once 'Date.php';
-
-$input = '2003-12-17T10:27:03Z';
-$date = new Date('2003-12-17T10:27:03Z');
-echo 'Date::getMonth() (via Constructor) = ' . $date->getMonth() . "\n";
-
-$date = new Date();
-$date->setDate($input, DATE_FORMAT_ISO_EXTENDED);
-echo 'Date::getMonth() (via Date::setDate()) = ' . $date->getMonth() . "\n";
-?>
---EXPECT--
-Date::getMonth() (via Constructor) = 12
-Date::getMonth() (via Date::setDate()) = 12
+++ /dev/null
---TEST--
-Bug #6246: Date::inDaylightTime() crashes Apache 2.0.55 with status 3221225477
---FILE--
-<?php
-/**
- * Test for: Date::inDaylightTime()
- * Parts tested: Date_TimeZone::inDaylightTime()
- */
-
-require_once 'Date.php';
-
-/**
- * In 2007, daylight saving time (DST) was extended in the United States.
- * DST started on March 11, 2007, which was three weeks earlier than in
- * the past, and it ended on November 4, 2007, one week later than in years
- * past. This results in a new DST period that is four weeks longer than in
- * previous years.
- *
- * N.B. the time at which US Summer time starts is 2.00 'Wall-Clock' Time,
- * that is, it goes forward at 2.00 in standard time, and goes back at
- * 2.00 in Summer time. This is unlike Europe which all switches together
- * at 1.00 GMT in both directions, so that in London, for example, the
- * clocks go back at 2.00 BST (although at that exact instant, the time
- * actually becomes 1.00 GMT).
- *
- * All countries in Europe except Iceland observe DST and change on the same
- * date and time, starting on the last Sunday in March and ending on the last
- * Sunday in October. Before 1996, DST ended on the last Sunday in September
- * in most European countries; on the British Isles though, DST then ended on
- * the fourth (which some years isn't the last) Sunday in October. In the
- * West European (UTC), Central European (CET, UTC+1), and East European
- * (UTC+2) time zones the change is simultaneous: on both dates the clocks
- * are changed everywhere at 01:00 UTC, i.e. from local times of
- * 01:00/02:00/03:00 to 02:00/03:00/04:00 in March, and vice versa in October.
- */
-
-$dates_us = array(
- '2007-03-11T01:59:59', // standard time
- '2007-03-11T01:59:59.999999', // standard time
- '2007-03-11T03:00:00', // Summer time
- '2007-11-04T00:59:59', // Summer time
- '2007-11-04T01:00:00', // ambiguous - could be either (standard time assumed)
- '2007-11-04T01:59:59', // ambiguous - could be either (standard time assumed)
- '2007-11-04T02:00:00', // standard time
-);
-
-$dates_eu = array(
- '2007-03-25T00:59:59', // standard time
- '2007-03-25T00:59:59.999999', // standard time
- '2007-03-25T02:00:00', // Summer time
- '2007-10-28T00:59:59', // Summer time
- '2007-10-28T01:00:00', // ambiguous - could be either (standard time assumed)
- '2007-10-28T01:59:59', // ambiguous - could be either (standard time assumed)
- '2007-11-28T02:00:00', // standard time
-);
-
-// Date_TimeZone does not yet have historical data, and so 2006
-// is treated as in the 2007 rules, and these dates will not
-// behave correctly (historically).
-//
-//$dates_us = array(
-// '2006-04-02T02:00:00', // begin of in daylight saving time.
-// '2006-10-29T01:59:59', // end of in daylight saving time.
-// '2006-10-30T02:00:00', // not in daylight saving time.
-//);
-
-$date = new Date;
-$date->setTZ($hs_tz = 'America/Chicago'); // N.B. the old name was 'US/Central' (this still works)
-foreach ($dates_us as $d) {
- $date->setDate($d);
- printf(
- '%s is in %s daylight saving time? %s' . "\n",
- $date->getDate(),
- $hs_tz,
- ($date->inDaylightTime() ? 'true' : 'false')
- );
-}
-$date = new Date;
-$date->setTZ($hs_tz = 'Europe/London'); // N.B. the old name was 'US/Central' (this still works)
-foreach ($dates_eu as $d) {
- $date->setDate($d);
- printf(
- '%s is in %s Summer time? %s' . "\n",
- $date->getDate(),
- $hs_tz,
- ($date->inDaylightTime() ? 'true' : 'false')
- );
-}
-?>
---EXPECT--
-2007-03-11 01:59:59 is in America/Chicago daylight saving time? false
-2007-03-11 01:59:59 is in America/Chicago daylight saving time? false
-2007-03-11 03:00:00 is in America/Chicago daylight saving time? true
-2007-11-04 00:59:59 is in America/Chicago daylight saving time? true
-2007-11-04 01:00:00 is in America/Chicago daylight saving time? false
-2007-11-04 01:59:59 is in America/Chicago daylight saving time? false
-2007-11-04 02:00:00 is in America/Chicago daylight saving time? false
-2007-03-25 00:59:59 is in Europe/London Summer time? false
-2007-03-25 00:59:59 is in Europe/London Summer time? false
-2007-03-25 02:00:00 is in Europe/London Summer time? true
-2007-10-28 00:59:59 is in Europe/London Summer time? true
-2007-10-28 01:00:00 is in Europe/London Summer time? false
-2007-10-28 01:59:59 is in Europe/London Summer time? false
-2007-11-28 02:00:00 is in Europe/London Summer time? false
+++ /dev/null
---TEST--
-Bug #674: strange (wrong?) result of Date_Calc::endOfWeek
---FILE--
-<?php
-/**
- * Test for: Date_Calc
- * Parts tested: Date_Calc::endOfWeek(), Date_Calc::beginOfWeek(),
- * Date_Calc::beginOfNextWeek() and Date_Calc::beginOfPrevWeek().
- */
-
-require_once 'Date.php';
-
-$dates = array(array(2003,3,17), array(2003,3,20), array(2003,3,23));
-foreach ($dates as $date) {
- echo 'Parameters: ' . implode('-', array_reverse($date)) . "\n";
- $bow = Date_Calc::endOfWeek($date[2], $date[1], $date[0]);
- $eow = Date_Calc::beginOfWeek($date[2], $date[1], $date[0]);
- $bonw = Date_Calc::beginOfNextWeek($date[2], $date[1], $date[0]);
- $bopw = Date_Calc::beginOfPrevWeek($date[2], $date[1], $date[0]);
- echo 'Begin of week = ' . $bow . ', End of week = ' . $eow . ', ' .
- 'Begin of next week = ' . $bonw . ', Begin of previous week = ' . $bopw .
- "\n\n";
-}
-?>
---EXPECT--
-Parameters: 17-3-2003
-Begin of week = 20030323, End of week = 20030317, Begin of next week = 20030324, Begin of previous week = 20030310
-
-Parameters: 20-3-2003
-Begin of week = 20030323, End of week = 20030317, Begin of next week = 20030324, Begin of previous week = 20030310
-
-Parameters: 23-3-2003
-Begin of week = 20030323, End of week = 20030317, Begin of next week = 20030324, Begin of previous week = 20030310
-
+++ /dev/null
---TEST--
-Bug #727: Date_Calc::weeksInMonth() wrong result
-Tests for weeksInMonth, february with 4 weeks
-Monday as 1st day of week
---FILE--
-<?php
-/**
- * Test for: Date_Calc
- * Parts tested: Date_Calc::weeksInMonth()
- */
-
-/**
- * Monday as 1st day of week
- */
-define('DATE_CALC_BEGIN_WEEKDAY', 1);
-
-require_once "Date/Calc.php";
-
-$tests = array(
- array(1999, 2), array(2010, 2), array(2021, 2), array(2027, 2),
- array(1937, 2), array(1943, 2), array(1802, 2), array(1813, 2),
- array(1819, 2), array(1830, 2), array(1841, 2), array(1847, 2),
- array(1858, 2), array(1869, 2), array(1875, 2), array(1886, 2),
- array(1897, 2), array(1909, 2), array(1915, 2), array(1926, 2)
-);
-
-foreach ($tests as $date) {
- list($year, $month) = $date;
- echo $year . '/' . $month . ' = ' . Date_Calc::weeksInMonth($month, $year) . ' weeks' . "\n";
-}
-?>
---EXPECT--
-1999/2 = 4 weeks
-2010/2 = 4 weeks
-2021/2 = 4 weeks
-2027/2 = 4 weeks
-1937/2 = 4 weeks
-1943/2 = 4 weeks
-1802/2 = 4 weeks
-1813/2 = 4 weeks
-1819/2 = 4 weeks
-1830/2 = 4 weeks
-1841/2 = 4 weeks
-1847/2 = 4 weeks
-1858/2 = 4 weeks
-1869/2 = 4 weeks
-1875/2 = 4 weeks
-1886/2 = 4 weeks
-1897/2 = 4 weeks
-1909/2 = 4 weeks
-1915/2 = 4 weeks
-1926/2 = 4 weeks
+++ /dev/null
---TEST--
-Bug #727: Date_Calc::weeksInMonth() wrong result
-Tests for weeksInMonth, february with 4 weeks
-Sunday as 1st day of week
---FILE--
-<?php
-/**
- * Test for: Date_Calc
- * Parts tested: Date_Calc::weeksInMonth()
- */
-
-/**
- * Sunday as 1st day of week
- */
-define('DATE_CALC_BEGIN_WEEKDAY', 0);
-
-require_once "Date/Calc.php";
-
-$tests = array(
- array(2009, 2), array(2015, 2), array(2026, 2), array(2037, 2),
- array(1931, 2), array(1942, 2), array(1801, 2), array(1807, 2),
- array(1818, 2), array(1829, 2), array(1835, 2), array(1846, 2),
- array(1857, 2), array(1863, 2), array(1874, 2), array(1885, 2),
- array(1891, 2), array(1903, 2), array(1914, 2), array(1925, 2)
-);
-
-foreach ($tests as $date) {
- list($year, $month) = $date;
- echo $year . '/' . $month . ' = ' . Date_Calc::weeksInMonth($month, $year) . ' weeks' . "\n";
-}
-?>
---EXPECT--
-2009/2 = 4 weeks
-2015/2 = 4 weeks
-2026/2 = 4 weeks
-2037/2 = 4 weeks
-1931/2 = 4 weeks
-1942/2 = 4 weeks
-1801/2 = 4 weeks
-1807/2 = 4 weeks
-1818/2 = 4 weeks
-1829/2 = 4 weeks
-1835/2 = 4 weeks
-1846/2 = 4 weeks
-1857/2 = 4 weeks
-1863/2 = 4 weeks
-1874/2 = 4 weeks
-1885/2 = 4 weeks
-1891/2 = 4 weeks
-1903/2 = 4 weeks
-1914/2 = 4 weeks
-1925/2 = 4 weeks
+++ /dev/null
---TEST--
-Bug #727: Date_Calc::weeksInMonth() wrong result
-Tests for weeksInMonth "random"
-Sunday as 1st day of week
---FILE--
-<?php
-/**
- * Test for: Date_Calc
- * Parts tested: Date_Calc::weeksInMonth()
- */
-
-/**
- * Sunday as 1st day of week
- */
-define('DATE_CALC_BEGIN_WEEKDAY', 0);
-
-require_once "Date/Calc.php";
-
-$tests = array(
- array(1999, 12), array(2000, 11), array(2001, 11), array(2002, 12),
- array(2003, 12), array(2004, 12), array(2005, 12), array(2006, 11),
- array(2007, 11), array(2008, 12), array(2009, 12), array(2010, 12),
- array(2011, 12), array(2012, 11), array(2013, 12), array(2014, 12),
- array(2015, 12), array(2016, 12), array(2017, 11), array(2018, 11),
- array(2019, 12), array(2020, 12), array(2021, 12), array(2022, 12),
- array(2023, 11), array(2024, 12), array(2025, 12), array(2026, 12),
- array(2027, 12), array(2028, 11), array(2029, 11), array(2030, 12),
- array(2031, 12), array(2032, 12), array(2033, 12), array(2034, 11),
- array(2035, 11), array(2036, 12), array(2037, 12), array(1930, 12),
- array(1931, 12), array(1932, 12), array(1933, 11), array(1934, 11),
- array(1935, 12), array(1936, 12), array(1937, 12), array(1938, 12),
- array(1939, 11), array(1940, 12), array(1941, 12), array(1942, 12),
- array(1943, 12), array(1944, 11), array(1945, 11), array(1946, 12),
- array(1947, 12), array(1948, 12), array(1949, 12), array(1800, 12),
- array(1801, 12), array(1802, 12), array(1803, 12), array(1804, 11),
- array(1805, 12), array(1806, 12), array(1807, 12), array(1808, 12),
- array(1809, 11), array(1810, 11), array(1811, 12), array(1812, 12),
- array(1813, 12), array(1814, 12), array(1815, 11), array(1816, 12),
- array(1817, 12), array(1818, 12), array(1819, 12), array(1820, 11),
- array(1821, 11), array(1822, 12), array(1823, 12), array(1824, 12),
- array(1825, 12), array(1826, 11), array(1827, 11), array(1828, 12),
- array(1829, 12), array(1830, 12), array(1831, 12), array(1832, 11),
- array(1833, 12), array(1834, 12), array(1835, 12), array(1836, 12),
- array(1837, 11), array(1838, 11), array(1839, 12), array(1840, 12),
- array(1841, 12), array(1842, 12), array(1843, 11), array(1844, 12),
- array(1845, 12), array(1846, 12), array(1847, 12), array(1848, 11),
- array(1849, 11), array(1850, 12), array(1851, 12), array(1852, 12),
- array(1853, 12), array(1854, 11), array(1855, 11), array(1856, 12),
- array(1857, 12), array(1858, 12), array(1859, 12), array(1860, 11),
- array(1861, 12), array(1862, 12), array(1863, 12), array(1864, 12),
- array(1865, 11), array(1866, 11), array(1867, 12), array(1868, 12),
- array(1869, 12), array(1870, 12), array(1871, 11), array(1872, 12),
- array(1873, 12), array(1874, 12), array(1875, 12), array(1876, 11),
- array(1877, 11), array(1878, 12), array(1879, 12), array(1880, 12),
- array(1881, 12), array(1882, 11), array(1883, 11), array(1884, 12),
- array(1885, 12), array(1886, 12), array(1887, 12), array(1888, 11),
- array(1889, 12), array(1890, 12), array(1891, 12), array(1892, 12),
- array(1893, 11), array(1894, 11), array(1895, 12), array(1896, 12),
- array(1897, 12), array(1898, 12), array(1899, 11), array(1900, 11),
- array(1901, 12), array(1902, 12), array(1903, 12), array(1904, 12),
- array(1905, 11), array(1906, 11), array(1907, 12), array(1908, 12),
- array(1909, 12), array(1910, 12), array(1911, 11), array(1912, 12),
- array(1913, 12), array(1914, 12), array(1915, 12), array(1916, 11),
- array(1917, 11), array(1918, 12), array(1919, 12), array(1920, 12),
- array(1921, 12), array(1922, 11), array(1923, 11), array(1924, 12),
- array(1925, 12), array(1926, 12), array(1927, 12), array(1928, 11),
- array(1929, 12), array(1999, 10), array(2000, 12), array(2001, 12),
- array(2002, 6), array(2003, 11), array(2004, 10), array(2005, 10),
- array(2006, 12), array(2007, 12), array(2008, 11), array(2009, 8),
- array(2010, 10), array(2011, 10), array(2012, 12), array(2013, 6),
- array(2014, 11), array(2015, 8), array(2016, 10), array(2017, 12),
- array(2018, 12), array(2019, 6), array(2020, 8), array(2021, 10),
- array(2022, 10), array(2023, 12), array(2024, 6), array(2025, 11),
- array(2026, 8), array(2027, 10), array(2028, 12), array(2029, 12),
- array(2030, 6), array(2031, 11), array(2032, 10), array(2033, 10),
- array(2034, 12), array(2035, 12), array(2036, 11), array(2037, 8),
- array(1930, 11), array(1931, 8), array(1932, 10), array(1933, 12),
- array(1934, 12), array(1935, 6), array(1936, 8), array(1937, 10),
- array(1938, 10), array(1939, 12), array(1940, 6), array(1941, 11),
- array(1942, 8), array(1943, 10), array(1944, 12), array(1945, 12),
- array(1946, 6), array(1947, 11), array(1948, 10), array(1949, 10),
- array(1800, 11), array(1801, 8), array(1802, 10), array(1803, 10),
- array(1804, 12), array(1805, 6), array(1806, 11), array(1807, 8),
- array(1808, 10), array(1809, 12), array(1810, 12), array(1811, 6),
- array(1812, 8), array(1813, 10), array(1814, 10), array(1815, 12),
- array(1816, 6), array(1817, 11), array(1818, 8), array(1819, 10),
- array(1820, 12), array(1821, 12), array(1822, 6), array(1823, 11),
- array(1824, 10), array(1825, 10), array(1826, 12), array(1827, 12),
- array(1828, 11), array(1829, 8), array(1830, 10), array(1831, 10),
- array(1832, 12), array(1833, 6), array(1834, 11), array(1835, 8),
- array(1836, 10), array(1837, 12), array(1838, 12), array(1839, 6),
- array(1840, 8), array(1841, 10), array(1842, 10), array(1843, 12),
- array(1844, 6), array(1845, 11), array(1846, 8), array(1847, 10),
- array(1848, 12), array(1849, 12), array(1850, 6), array(1851, 11),
- array(1852, 10), array(1853, 10), array(1854, 12), array(1855, 12),
- array(1856, 11), array(1857, 8), array(1858, 10), array(1859, 10),
- array(1860, 12), array(1861, 6), array(1862, 11), array(1863, 8),
- array(1864, 10), array(1865, 12), array(1866, 12), array(1867, 6),
- array(1868, 8), array(1869, 10), array(1870, 10), array(1871, 12),
- array(1872, 6), array(1873, 11), array(1874, 8), array(1875, 10),
- array(1876, 12), array(1877, 12), array(1878, 6), array(1879, 11),
- array(1880, 10), array(1881, 10), array(1882, 12), array(1883, 12),
- array(1884, 11), array(1885, 8), array(1886, 10), array(1887, 10),
- array(1888, 12), array(1889, 6), array(1890, 11), array(1891, 8),
- array(1892, 10), array(1893, 12), array(1894, 12), array(1895, 6),
- array(1896, 8), array(1897, 10), array(1898, 10), array(1899, 12),
- array(1900, 12), array(1901, 6), array(1902, 11), array(1903, 8),
- array(1904, 10), array(1905, 12), array(1906, 12), array(1907, 6),
- array(1908, 8), array(1909, 10), array(1910, 10), array(1911, 12),
- array(1912, 6), array(1913, 11), array(1914, 8), array(1915, 10),
- array(1916, 12), array(1917, 12), array(1918, 6), array(1919, 11),
- array(1920, 10), array(1921, 10), array(1922, 12), array(1923, 12),
- array(1924, 11), array(1925, 8), array(1926, 10), array(1927, 10),
- array(1928, 12), array(1929, 6)
-);
-
-foreach ($tests as $date) {
- list($year, $month) = $date;
- echo $year . '/' . $month . ' = ' . Date_Calc::weeksInMonth($month, $year) . ' weeks' . "\n";
-}
-?>
---EXPECT--
-1999/12 = 5 weeks
-2000/11 = 5 weeks
-2001/11 = 5 weeks
-2002/12 = 5 weeks
-2003/12 = 5 weeks
-2004/12 = 5 weeks
-2005/12 = 5 weeks
-2006/11 = 5 weeks
-2007/11 = 5 weeks
-2008/12 = 5 weeks
-2009/12 = 5 weeks
-2010/12 = 5 weeks
-2011/12 = 5 weeks
-2012/11 = 5 weeks
-2013/12 = 5 weeks
-2014/12 = 5 weeks
-2015/12 = 5 weeks
-2016/12 = 5 weeks
-2017/11 = 5 weeks
-2018/11 = 5 weeks
-2019/12 = 5 weeks
-2020/12 = 5 weeks
-2021/12 = 5 weeks
-2022/12 = 5 weeks
-2023/11 = 5 weeks
-2024/12 = 5 weeks
-2025/12 = 5 weeks
-2026/12 = 5 weeks
-2027/12 = 5 weeks
-2028/11 = 5 weeks
-2029/11 = 5 weeks
-2030/12 = 5 weeks
-2031/12 = 5 weeks
-2032/12 = 5 weeks
-2033/12 = 5 weeks
-2034/11 = 5 weeks
-2035/11 = 5 weeks
-2036/12 = 5 weeks
-2037/12 = 5 weeks
-1930/12 = 5 weeks
-1931/12 = 5 weeks
-1932/12 = 5 weeks
-1933/11 = 5 weeks
-1934/11 = 5 weeks
-1935/12 = 5 weeks
-1936/12 = 5 weeks
-1937/12 = 5 weeks
-1938/12 = 5 weeks
-1939/11 = 5 weeks
-1940/12 = 5 weeks
-1941/12 = 5 weeks
-1942/12 = 5 weeks
-1943/12 = 5 weeks
-1944/11 = 5 weeks
-1945/11 = 5 weeks
-1946/12 = 5 weeks
-1947/12 = 5 weeks
-1948/12 = 5 weeks
-1949/12 = 5 weeks
-1800/12 = 5 weeks
-1801/12 = 5 weeks
-1802/12 = 5 weeks
-1803/12 = 5 weeks
-1804/11 = 5 weeks
-1805/12 = 5 weeks
-1806/12 = 5 weeks
-1807/12 = 5 weeks
-1808/12 = 5 weeks
-1809/11 = 5 weeks
-1810/11 = 5 weeks
-1811/12 = 5 weeks
-1812/12 = 5 weeks
-1813/12 = 5 weeks
-1814/12 = 5 weeks
-1815/11 = 5 weeks
-1816/12 = 5 weeks
-1817/12 = 5 weeks
-1818/12 = 5 weeks
-1819/12 = 5 weeks
-1820/11 = 5 weeks
-1821/11 = 5 weeks
-1822/12 = 5 weeks
-1823/12 = 5 weeks
-1824/12 = 5 weeks
-1825/12 = 5 weeks
-1826/11 = 5 weeks
-1827/11 = 5 weeks
-1828/12 = 5 weeks
-1829/12 = 5 weeks
-1830/12 = 5 weeks
-1831/12 = 5 weeks
-1832/11 = 5 weeks
-1833/12 = 5 weeks
-1834/12 = 5 weeks
-1835/12 = 5 weeks
-1836/12 = 5 weeks
-1837/11 = 5 weeks
-1838/11 = 5 weeks
-1839/12 = 5 weeks
-1840/12 = 5 weeks
-1841/12 = 5 weeks
-1842/12 = 5 weeks
-1843/11 = 5 weeks
-1844/12 = 5 weeks
-1845/12 = 5 weeks
-1846/12 = 5 weeks
-1847/12 = 5 weeks
-1848/11 = 5 weeks
-1849/11 = 5 weeks
-1850/12 = 5 weeks
-1851/12 = 5 weeks
-1852/12 = 5 weeks
-1853/12 = 5 weeks
-1854/11 = 5 weeks
-1855/11 = 5 weeks
-1856/12 = 5 weeks
-1857/12 = 5 weeks
-1858/12 = 5 weeks
-1859/12 = 5 weeks
-1860/11 = 5 weeks
-1861/12 = 5 weeks
-1862/12 = 5 weeks
-1863/12 = 5 weeks
-1864/12 = 5 weeks
-1865/11 = 5 weeks
-1866/11 = 5 weeks
-1867/12 = 5 weeks
-1868/12 = 5 weeks
-1869/12 = 5 weeks
-1870/12 = 5 weeks
-1871/11 = 5 weeks
-1872/12 = 5 weeks
-1873/12 = 5 weeks
-1874/12 = 5 weeks
-1875/12 = 5 weeks
-1876/11 = 5 weeks
-1877/11 = 5 weeks
-1878/12 = 5 weeks
-1879/12 = 5 weeks
-1880/12 = 5 weeks
-1881/12 = 5 weeks
-1882/11 = 5 weeks
-1883/11 = 5 weeks
-1884/12 = 5 weeks
-1885/12 = 5 weeks
-1886/12 = 5 weeks
-1887/12 = 5 weeks
-1888/11 = 5 weeks
-1889/12 = 5 weeks
-1890/12 = 5 weeks
-1891/12 = 5 weeks
-1892/12 = 5 weeks
-1893/11 = 5 weeks
-1894/11 = 5 weeks
-1895/12 = 5 weeks
-1896/12 = 5 weeks
-1897/12 = 5 weeks
-1898/12 = 5 weeks
-1899/11 = 5 weeks
-1900/11 = 5 weeks
-1901/12 = 5 weeks
-1902/12 = 5 weeks
-1903/12 = 5 weeks
-1904/12 = 5 weeks
-1905/11 = 5 weeks
-1906/11 = 5 weeks
-1907/12 = 5 weeks
-1908/12 = 5 weeks
-1909/12 = 5 weeks
-1910/12 = 5 weeks
-1911/11 = 5 weeks
-1912/12 = 5 weeks
-1913/12 = 5 weeks
-1914/12 = 5 weeks
-1915/12 = 5 weeks
-1916/11 = 5 weeks
-1917/11 = 5 weeks
-1918/12 = 5 weeks
-1919/12 = 5 weeks
-1920/12 = 5 weeks
-1921/12 = 5 weeks
-1922/11 = 5 weeks
-1923/11 = 5 weeks
-1924/12 = 5 weeks
-1925/12 = 5 weeks
-1926/12 = 5 weeks
-1927/12 = 5 weeks
-1928/11 = 5 weeks
-1929/12 = 5 weeks
-1999/10 = 6 weeks
-2000/12 = 6 weeks
-2001/12 = 6 weeks
-2002/6 = 6 weeks
-2003/11 = 6 weeks
-2004/10 = 6 weeks
-2005/10 = 6 weeks
-2006/12 = 6 weeks
-2007/12 = 6 weeks
-2008/11 = 6 weeks
-2009/8 = 6 weeks
-2010/10 = 6 weeks
-2011/10 = 6 weeks
-2012/12 = 6 weeks
-2013/6 = 6 weeks
-2014/11 = 6 weeks
-2015/8 = 6 weeks
-2016/10 = 6 weeks
-2017/12 = 6 weeks
-2018/12 = 6 weeks
-2019/6 = 6 weeks
-2020/8 = 6 weeks
-2021/10 = 6 weeks
-2022/10 = 6 weeks
-2023/12 = 6 weeks
-2024/6 = 6 weeks
-2025/11 = 6 weeks
-2026/8 = 6 weeks
-2027/10 = 6 weeks
-2028/12 = 6 weeks
-2029/12 = 6 weeks
-2030/6 = 6 weeks
-2031/11 = 6 weeks
-2032/10 = 6 weeks
-2033/10 = 6 weeks
-2034/12 = 6 weeks
-2035/12 = 6 weeks
-2036/11 = 6 weeks
-2037/8 = 6 weeks
-1930/11 = 6 weeks
-1931/8 = 6 weeks
-1932/10 = 6 weeks
-1933/12 = 6 weeks
-1934/12 = 6 weeks
-1935/6 = 6 weeks
-1936/8 = 6 weeks
-1937/10 = 6 weeks
-1938/10 = 6 weeks
-1939/12 = 6 weeks
-1940/6 = 6 weeks
-1941/11 = 6 weeks
-1942/8 = 6 weeks
-1943/10 = 6 weeks
-1944/12 = 6 weeks
-1945/12 = 6 weeks
-1946/6 = 6 weeks
-1947/11 = 6 weeks
-1948/10 = 6 weeks
-1949/10 = 6 weeks
-1800/11 = 6 weeks
-1801/8 = 6 weeks
-1802/10 = 6 weeks
-1803/10 = 6 weeks
-1804/12 = 6 weeks
-1805/6 = 6 weeks
-1806/11 = 6 weeks
-1807/8 = 6 weeks
-1808/10 = 6 weeks
-1809/12 = 6 weeks
-1810/12 = 6 weeks
-1811/6 = 6 weeks
-1812/8 = 6 weeks
-1813/10 = 6 weeks
-1814/10 = 6 weeks
-1815/12 = 6 weeks
-1816/6 = 6 weeks
-1817/11 = 6 weeks
-1818/8 = 6 weeks
-1819/10 = 6 weeks
-1820/12 = 6 weeks
-1821/12 = 6 weeks
-1822/6 = 6 weeks
-1823/11 = 6 weeks
-1824/10 = 6 weeks
-1825/10 = 6 weeks
-1826/12 = 6 weeks
-1827/12 = 6 weeks
-1828/11 = 6 weeks
-1829/8 = 6 weeks
-1830/10 = 6 weeks
-1831/10 = 6 weeks
-1832/12 = 6 weeks
-1833/6 = 6 weeks
-1834/11 = 6 weeks
-1835/8 = 6 weeks
-1836/10 = 6 weeks
-1837/12 = 6 weeks
-1838/12 = 6 weeks
-1839/6 = 6 weeks
-1840/8 = 6 weeks
-1841/10 = 6 weeks
-1842/10 = 6 weeks
-1843/12 = 6 weeks
-1844/6 = 6 weeks
-1845/11 = 6 weeks
-1846/8 = 6 weeks
-1847/10 = 6 weeks
-1848/12 = 6 weeks
-1849/12 = 6 weeks
-1850/6 = 6 weeks
-1851/11 = 6 weeks
-1852/10 = 6 weeks
-1853/10 = 6 weeks
-1854/12 = 6 weeks
-1855/12 = 6 weeks
-1856/11 = 6 weeks
-1857/8 = 6 weeks
-1858/10 = 6 weeks
-1859/10 = 6 weeks
-1860/12 = 6 weeks
-1861/6 = 6 weeks
-1862/11 = 6 weeks
-1863/8 = 6 weeks
-1864/10 = 6 weeks
-1865/12 = 6 weeks
-1866/12 = 6 weeks
-1867/6 = 6 weeks
-1868/8 = 6 weeks
-1869/10 = 6 weeks
-1870/10 = 6 weeks
-1871/12 = 6 weeks
-1872/6 = 6 weeks
-1873/11 = 6 weeks
-1874/8 = 6 weeks
-1875/10 = 6 weeks
-1876/12 = 6 weeks
-1877/12 = 6 weeks
-1878/6 = 6 weeks
-1879/11 = 6 weeks
-1880/10 = 6 weeks
-1881/10 = 6 weeks
-1882/12 = 6 weeks
-1883/12 = 6 weeks
-1884/11 = 6 weeks
-1885/8 = 6 weeks
-1886/10 = 6 weeks
-1887/10 = 6 weeks
-1888/12 = 6 weeks
-1889/6 = 6 weeks
-1890/11 = 6 weeks
-1891/8 = 6 weeks
-1892/10 = 6 weeks
-1893/12 = 6 weeks
-1894/12 = 6 weeks
-1895/6 = 6 weeks
-1896/8 = 6 weeks
-1897/10 = 6 weeks
-1898/10 = 6 weeks
-1899/12 = 6 weeks
-1900/12 = 6 weeks
-1901/6 = 6 weeks
-1902/11 = 6 weeks
-1903/8 = 6 weeks
-1904/10 = 6 weeks
-1905/12 = 6 weeks
-1906/12 = 6 weeks
-1907/6 = 6 weeks
-1908/8 = 6 weeks
-1909/10 = 6 weeks
-1910/10 = 6 weeks
-1911/12 = 6 weeks
-1912/6 = 6 weeks
-1913/11 = 6 weeks
-1914/8 = 6 weeks
-1915/10 = 6 weeks
-1916/12 = 6 weeks
-1917/12 = 6 weeks
-1918/6 = 6 weeks
-1919/11 = 6 weeks
-1920/10 = 6 weeks
-1921/10 = 6 weeks
-1922/12 = 6 weeks
-1923/12 = 6 weeks
-1924/11 = 6 weeks
-1925/8 = 6 weeks
-1926/10 = 6 weeks
-1927/10 = 6 weeks
-1928/12 = 6 weeks
-1929/6 = 6 weeks
+++ /dev/null
---TEST--
-Bug #727: Date_Calc::weeksInMonth() wrong result
-Tests for weeksInMonth "random"
-Monday as 1st day of week
---FILE--
-<?php
-/**
- * Test for: Date_Calc
- * Parts tested: Date_Calc::weeksInMonth()
- */
-
-/**
- * Monday as 1st day of week
- */
-define('DATE_CALC_BEGIN_WEEKDAY', 1);
-
-require_once "Date/Calc.php";
-
-$tests = array(
- array(1999, 8), array(2000, 10), array(2001, 12), array(2002, 12),
- array(2003, 6), array(2004, 8), array(2005, 10), array(2006, 10),
- array(2007, 12), array(2008, 6), array(2009, 11), array(2010, 8),
- array(2011, 10), array(2012, 12), array(2013, 12), array(2014, 6),
- array(2015, 11), array(2016, 10), array(2017, 10), array(2018, 12),
- array(2019, 12), array(2020, 11), array(2021, 8), array(2022, 10),
- array(2023, 10), array(2024, 12), array(2025, 6), array(2026, 11),
- array(2027, 8), array(2028, 10), array(2029, 12), array(2030, 12),
- array(2031, 6), array(2032, 8), array(2033, 10), array(2034, 10),
- array(2035, 12), array(2036, 6), array(2037, 11), array(1930, 6),
- array(1931, 11), array(1932, 10), array(1933, 10), array(1934, 12),
- array(1935, 12), array(1936, 11), array(1937, 8), array(1938, 10),
- array(1939, 10), array(1940, 12), array(1941, 6), array(1942, 11),
- array(1943, 8), array(1944, 10), array(1945, 12), array(1946, 12),
- array(1947, 6), array(1948, 8), array(1949, 10), array(1800, 6),
- array(1801, 11), array(1802, 8), array(1803, 10), array(1804, 12),
- array(1805, 12), array(1806, 6), array(1807, 11), array(1808, 10),
- array(1809, 10), array(1810, 12), array(1811, 12), array(1812, 11),
- array(1813, 8), array(1814, 10), array(1815, 10), array(1816, 12),
- array(1817, 6), array(1818, 11), array(1819, 8), array(1820, 10),
- array(1821, 12), array(1822, 12), array(1823, 6), array(1824, 8),
- array(1825, 10), array(1826, 10), array(1827, 12), array(1828, 6),
- array(1829, 11), array(1830, 8), array(1831, 10), array(1832, 12),
- array(1833, 12), array(1834, 6), array(1835, 11), array(1836, 10),
- array(1837, 10), array(1838, 12), array(1839, 12), array(1840, 11),
- array(1841, 8), array(1842, 10), array(1843, 10), array(1844, 12),
- array(1845, 6), array(1846, 11), array(1847, 8), array(1848, 10),
- array(1849, 12), array(1850, 12), array(1851, 6), array(1852, 8),
- array(1853, 10), array(1854, 10), array(1855, 12), array(1856, 6),
- array(1857, 11), array(1858, 8), array(1859, 10), array(1860, 12),
- array(1861, 12), array(1862, 6), array(1863, 11), array(1864, 10),
- array(1865, 10), array(1866, 12), array(1867, 12), array(1868, 11),
- array(1869, 8), array(1870, 10), array(1871, 10), array(1872, 12),
- array(1873, 6), array(1874, 11), array(1875, 8), array(1876, 10),
- array(1877, 12), array(1878, 12), array(1879, 6), array(1880, 8),
- array(1881, 10), array(1882, 10), array(1883, 12), array(1884, 6),
- array(1885, 11), array(1886, 8), array(1887, 10), array(1888, 12),
- array(1889, 12), array(1890, 6), array(1891, 11), array(1892, 10),
- array(1893, 10), array(1894, 12), array(1895, 12), array(1896, 11),
- array(1897, 8), array(1898, 10), array(1899, 10), array(1900, 12),
- array(1901, 12), array(1902, 6), array(1903, 11), array(1904, 10),
- array(1905, 10), array(1906, 12), array(1907, 12), array(1908, 11),
- array(1909, 8), array(1910, 10), array(1911, 10), array(1912, 12),
- array(1913, 6), array(1914, 11), array(1915, 8), array(1916, 10),
- array(1917, 12), array(1918, 12), array(1919, 6), array(1920, 8),
- array(1921, 10), array(1922, 10), array(1923, 12), array(1924, 6),
- array(1925, 11), array(1926, 8), array(1927, 10), array(1928, 12),
- array(1929, 12), array(1999, 12), array(2000, 12), array(2001, 11),
- array(2002, 11), array(2003, 12), array(2004, 12), array(2005, 12),
- array(2006, 12), array(2007, 11), array(2008, 12), array(2009, 12),
- array(2010, 12), array(2011, 12), array(2012, 11), array(2013, 11),
- array(2014, 12), array(2015, 12), array(2016, 12), array(2017, 12),
- array(2018, 11), array(2019, 11), array(2020, 12), array(2021, 12),
- array(2022, 12), array(2023, 12), array(2024, 11), array(2025, 12),
- array(2026, 12), array(2027, 12), array(2028, 12), array(2029, 11),
- array(2030, 11), array(2031, 12), array(2032, 12), array(2033, 12),
- array(2034, 12), array(2035, 11), array(2036, 12), array(2037, 12),
- array(1930, 12), array(1931, 12), array(1932, 12), array(1933, 12),
- array(1934, 11), array(1935, 11), array(1936, 12), array(1937, 12),
- array(1938, 12), array(1939, 12), array(1940, 11), array(1941, 12),
- array(1942, 12), array(1943, 12), array(1944, 12), array(1945, 11),
- array(1946, 11), array(1947, 12), array(1948, 12), array(1949, 12),
- array(1800, 12), array(1801, 12), array(1802, 12), array(1803, 12),
- array(1804, 11), array(1805, 11), array(1806, 12), array(1807, 12),
- array(1808, 12), array(1809, 12), array(1810, 11), array(1811, 11),
- array(1812, 12), array(1813, 12), array(1814, 12), array(1815, 12),
- array(1816, 11), array(1817, 12), array(1818, 12), array(1819, 12),
- array(1820, 12), array(1821, 11), array(1822, 11), array(1823, 12),
- array(1824, 12), array(1825, 12), array(1826, 12), array(1827, 11),
- array(1828, 12), array(1829, 12), array(1830, 12), array(1831, 12),
- array(1832, 11), array(1833, 11), array(1834, 12), array(1835, 12),
- array(1836, 12), array(1837, 12), array(1838, 11), array(1839, 11),
- array(1840, 12), array(1841, 12), array(1842, 12), array(1843, 12),
- array(1844, 11), array(1845, 12), array(1846, 12), array(1847, 12),
- array(1848, 12), array(1849, 11), array(1850, 11), array(1851, 12),
- array(1852, 12), array(1853, 12), array(1854, 12), array(1855, 11),
- array(1856, 12), array(1857, 12), array(1858, 12), array(1859, 12),
- array(1860, 11), array(1861, 11), array(1862, 12), array(1863, 12),
- array(1864, 12), array(1865, 12), array(1866, 11), array(1867, 11),
- array(1868, 12), array(1869, 12), array(1870, 12), array(1871, 12),
- array(1872, 11), array(1873, 12), array(1874, 12), array(1875, 12),
- array(1876, 12), array(1877, 11), array(1878, 11), array(1879, 12),
- array(1880, 12), array(1881, 12), array(1882, 12), array(1883, 11),
- array(1884, 12), array(1885, 12), array(1886, 12), array(1887, 12),
- array(1888, 11), array(1889, 11), array(1890, 12), array(1891, 12),
- array(1892, 12), array(1893, 12), array(1894, 11), array(1895, 11),
- array(1896, 12), array(1897, 12), array(1898, 12), array(1899, 12),
- array(1900, 11), array(1901, 11), array(1902, 12), array(1903, 12),
- array(1904, 12), array(1905, 12), array(1906, 11), array(1907, 11),
- array(1908, 12), array(1909, 12), array(1910, 12), array(1911, 12),
- array(1912, 11), array(1913, 12), array(1914, 12), array(1915, 12),
- array(1916, 12), array(1917, 11), array(1918, 11), array(1919, 12),
- array(1920, 12), array(1921, 12), array(1922, 12), array(1923, 11),
- array(1924, 12), array(1925, 12), array(1926, 12), array(1927, 12),
- array(1928, 11), array(1929, 11)
-);
-
-foreach ($tests as $date) {
- list($year, $month) = $date;
- echo $year . '/' . $month . ' = ' . Date_Calc::weeksInMonth($month, $year) . ' weeks' . "\n";
-}
-?>
---EXPECT--
-1999/8 = 6 weeks
-2000/10 = 6 weeks
-2001/12 = 6 weeks
-2002/12 = 6 weeks
-2003/6 = 6 weeks
-2004/8 = 6 weeks
-2005/10 = 6 weeks
-2006/10 = 6 weeks
-2007/12 = 6 weeks
-2008/6 = 6 weeks
-2009/11 = 6 weeks
-2010/8 = 6 weeks
-2011/10 = 6 weeks
-2012/12 = 6 weeks
-2013/12 = 6 weeks
-2014/6 = 6 weeks
-2015/11 = 6 weeks
-2016/10 = 6 weeks
-2017/10 = 6 weeks
-2018/12 = 6 weeks
-2019/12 = 6 weeks
-2020/11 = 6 weeks
-2021/8 = 6 weeks
-2022/10 = 6 weeks
-2023/10 = 6 weeks
-2024/12 = 6 weeks
-2025/6 = 6 weeks
-2026/11 = 6 weeks
-2027/8 = 6 weeks
-2028/10 = 6 weeks
-2029/12 = 6 weeks
-2030/12 = 6 weeks
-2031/6 = 6 weeks
-2032/8 = 6 weeks
-2033/10 = 6 weeks
-2034/10 = 6 weeks
-2035/12 = 6 weeks
-2036/6 = 6 weeks
-2037/11 = 6 weeks
-1930/6 = 6 weeks
-1931/11 = 6 weeks
-1932/10 = 6 weeks
-1933/10 = 6 weeks
-1934/12 = 6 weeks
-1935/12 = 6 weeks
-1936/11 = 6 weeks
-1937/8 = 6 weeks
-1938/10 = 6 weeks
-1939/10 = 6 weeks
-1940/12 = 6 weeks
-1941/6 = 6 weeks
-1942/11 = 6 weeks
-1943/8 = 6 weeks
-1944/10 = 6 weeks
-1945/12 = 6 weeks
-1946/12 = 6 weeks
-1947/6 = 6 weeks
-1948/8 = 6 weeks
-1949/10 = 6 weeks
-1800/6 = 6 weeks
-1801/11 = 6 weeks
-1802/8 = 6 weeks
-1803/10 = 6 weeks
-1804/12 = 6 weeks
-1805/12 = 6 weeks
-1806/6 = 6 weeks
-1807/11 = 6 weeks
-1808/10 = 6 weeks
-1809/10 = 6 weeks
-1810/12 = 6 weeks
-1811/12 = 6 weeks
-1812/11 = 6 weeks
-1813/8 = 6 weeks
-1814/10 = 6 weeks
-1815/10 = 6 weeks
-1816/12 = 6 weeks
-1817/6 = 6 weeks
-1818/11 = 6 weeks
-1819/8 = 6 weeks
-1820/10 = 6 weeks
-1821/12 = 6 weeks
-1822/12 = 6 weeks
-1823/6 = 6 weeks
-1824/8 = 6 weeks
-1825/10 = 6 weeks
-1826/10 = 6 weeks
-1827/12 = 6 weeks
-1828/6 = 6 weeks
-1829/11 = 6 weeks
-1830/8 = 6 weeks
-1831/10 = 6 weeks
-1832/12 = 6 weeks
-1833/12 = 6 weeks
-1834/6 = 6 weeks
-1835/11 = 6 weeks
-1836/10 = 6 weeks
-1837/10 = 6 weeks
-1838/12 = 6 weeks
-1839/12 = 6 weeks
-1840/11 = 6 weeks
-1841/8 = 6 weeks
-1842/10 = 6 weeks
-1843/10 = 6 weeks
-1844/12 = 6 weeks
-1845/6 = 6 weeks
-1846/11 = 6 weeks
-1847/8 = 6 weeks
-1848/10 = 6 weeks
-1849/12 = 6 weeks
-1850/12 = 6 weeks
-1851/6 = 6 weeks
-1852/8 = 6 weeks
-1853/10 = 6 weeks
-1854/10 = 6 weeks
-1855/12 = 6 weeks
-1856/6 = 6 weeks
-1857/11 = 6 weeks
-1858/8 = 6 weeks
-1859/10 = 6 weeks
-1860/12 = 6 weeks
-1861/12 = 6 weeks
-1862/6 = 6 weeks
-1863/11 = 6 weeks
-1864/10 = 6 weeks
-1865/10 = 6 weeks
-1866/12 = 6 weeks
-1867/12 = 6 weeks
-1868/11 = 6 weeks
-1869/8 = 6 weeks
-1870/10 = 6 weeks
-1871/10 = 6 weeks
-1872/12 = 6 weeks
-1873/6 = 6 weeks
-1874/11 = 6 weeks
-1875/8 = 6 weeks
-1876/10 = 6 weeks
-1877/12 = 6 weeks
-1878/12 = 6 weeks
-1879/6 = 6 weeks
-1880/8 = 6 weeks
-1881/10 = 6 weeks
-1882/10 = 6 weeks
-1883/12 = 6 weeks
-1884/6 = 6 weeks
-1885/11 = 6 weeks
-1886/8 = 6 weeks
-1887/10 = 6 weeks
-1888/12 = 6 weeks
-1889/12 = 6 weeks
-1890/6 = 6 weeks
-1891/11 = 6 weeks
-1892/10 = 6 weeks
-1893/10 = 6 weeks
-1894/12 = 6 weeks
-1895/12 = 6 weeks
-1896/11 = 6 weeks
-1897/8 = 6 weeks
-1898/10 = 6 weeks
-1899/10 = 6 weeks
-1900/12 = 6 weeks
-1901/12 = 6 weeks
-1902/6 = 6 weeks
-1903/11 = 6 weeks
-1904/10 = 6 weeks
-1905/10 = 6 weeks
-1906/12 = 6 weeks
-1907/12 = 6 weeks
-1908/11 = 6 weeks
-1909/8 = 6 weeks
-1910/10 = 6 weeks
-1911/10 = 6 weeks
-1912/12 = 6 weeks
-1913/6 = 6 weeks
-1914/11 = 6 weeks
-1915/8 = 6 weeks
-1916/10 = 6 weeks
-1917/12 = 6 weeks
-1918/12 = 6 weeks
-1919/6 = 6 weeks
-1920/8 = 6 weeks
-1921/10 = 6 weeks
-1922/10 = 6 weeks
-1923/12 = 6 weeks
-1924/6 = 6 weeks
-1925/11 = 6 weeks
-1926/8 = 6 weeks
-1927/10 = 6 weeks
-1928/12 = 6 weeks
-1929/12 = 6 weeks
-1999/12 = 5 weeks
-2000/12 = 5 weeks
-2001/11 = 5 weeks
-2002/11 = 5 weeks
-2003/12 = 5 weeks
-2004/12 = 5 weeks
-2005/12 = 5 weeks
-2006/12 = 5 weeks
-2007/11 = 5 weeks
-2008/12 = 5 weeks
-2009/12 = 5 weeks
-2010/12 = 5 weeks
-2011/12 = 5 weeks
-2012/11 = 5 weeks
-2013/11 = 5 weeks
-2014/12 = 5 weeks
-2015/12 = 5 weeks
-2016/12 = 5 weeks
-2017/12 = 5 weeks
-2018/11 = 5 weeks
-2019/11 = 5 weeks
-2020/12 = 5 weeks
-2021/12 = 5 weeks
-2022/12 = 5 weeks
-2023/12 = 5 weeks
-2024/11 = 5 weeks
-2025/12 = 5 weeks
-2026/12 = 5 weeks
-2027/12 = 5 weeks
-2028/12 = 5 weeks
-2029/11 = 5 weeks
-2030/11 = 5 weeks
-2031/12 = 5 weeks
-2032/12 = 5 weeks
-2033/12 = 5 weeks
-2034/12 = 5 weeks
-2035/11 = 5 weeks
-2036/12 = 5 weeks
-2037/12 = 5 weeks
-1930/12 = 5 weeks
-1931/12 = 5 weeks
-1932/12 = 5 weeks
-1933/12 = 5 weeks
-1934/11 = 5 weeks
-1935/11 = 5 weeks
-1936/12 = 5 weeks
-1937/12 = 5 weeks
-1938/12 = 5 weeks
-1939/12 = 5 weeks
-1940/11 = 5 weeks
-1941/12 = 5 weeks
-1942/12 = 5 weeks
-1943/12 = 5 weeks
-1944/12 = 5 weeks
-1945/11 = 5 weeks
-1946/11 = 5 weeks
-1947/12 = 5 weeks
-1948/12 = 5 weeks
-1949/12 = 5 weeks
-1800/12 = 5 weeks
-1801/12 = 5 weeks
-1802/12 = 5 weeks
-1803/12 = 5 weeks
-1804/11 = 5 weeks
-1805/11 = 5 weeks
-1806/12 = 5 weeks
-1807/12 = 5 weeks
-1808/12 = 5 weeks
-1809/12 = 5 weeks
-1810/11 = 5 weeks
-1811/11 = 5 weeks
-1812/12 = 5 weeks
-1813/12 = 5 weeks
-1814/12 = 5 weeks
-1815/12 = 5 weeks
-1816/11 = 5 weeks
-1817/12 = 5 weeks
-1818/12 = 5 weeks
-1819/12 = 5 weeks
-1820/12 = 5 weeks
-1821/11 = 5 weeks
-1822/11 = 5 weeks
-1823/12 = 5 weeks
-1824/12 = 5 weeks
-1825/12 = 5 weeks
-1826/12 = 5 weeks
-1827/11 = 5 weeks
-1828/12 = 5 weeks
-1829/12 = 5 weeks
-1830/12 = 5 weeks
-1831/12 = 5 weeks
-1832/11 = 5 weeks
-1833/11 = 5 weeks
-1834/12 = 5 weeks
-1835/12 = 5 weeks
-1836/12 = 5 weeks
-1837/12 = 5 weeks
-1838/11 = 5 weeks
-1839/11 = 5 weeks
-1840/12 = 5 weeks
-1841/12 = 5 weeks
-1842/12 = 5 weeks
-1843/12 = 5 weeks
-1844/11 = 5 weeks
-1845/12 = 5 weeks
-1846/12 = 5 weeks
-1847/12 = 5 weeks
-1848/12 = 5 weeks
-1849/11 = 5 weeks
-1850/11 = 5 weeks
-1851/12 = 5 weeks
-1852/12 = 5 weeks
-1853/12 = 5 weeks
-1854/12 = 5 weeks
-1855/11 = 5 weeks
-1856/12 = 5 weeks
-1857/12 = 5 weeks
-1858/12 = 5 weeks
-1859/12 = 5 weeks
-1860/11 = 5 weeks
-1861/11 = 5 weeks
-1862/12 = 5 weeks
-1863/12 = 5 weeks
-1864/12 = 5 weeks
-1865/12 = 5 weeks
-1866/11 = 5 weeks
-1867/11 = 5 weeks
-1868/12 = 5 weeks
-1869/12 = 5 weeks
-1870/12 = 5 weeks
-1871/12 = 5 weeks
-1872/11 = 5 weeks
-1873/12 = 5 weeks
-1874/12 = 5 weeks
-1875/12 = 5 weeks
-1876/12 = 5 weeks
-1877/11 = 5 weeks
-1878/11 = 5 weeks
-1879/12 = 5 weeks
-1880/12 = 5 weeks
-1881/12 = 5 weeks
-1882/12 = 5 weeks
-1883/11 = 5 weeks
-1884/12 = 5 weeks
-1885/12 = 5 weeks
-1886/12 = 5 weeks
-1887/12 = 5 weeks
-1888/11 = 5 weeks
-1889/11 = 5 weeks
-1890/12 = 5 weeks
-1891/12 = 5 weeks
-1892/12 = 5 weeks
-1893/12 = 5 weeks
-1894/11 = 5 weeks
-1895/11 = 5 weeks
-1896/12 = 5 weeks
-1897/12 = 5 weeks
-1898/12 = 5 weeks
-1899/12 = 5 weeks
-1900/11 = 5 weeks
-1901/11 = 5 weeks
-1902/12 = 5 weeks
-1903/12 = 5 weeks
-1904/12 = 5 weeks
-1905/12 = 5 weeks
-1906/11 = 5 weeks
-1907/11 = 5 weeks
-1908/12 = 5 weeks
-1909/12 = 5 weeks
-1910/12 = 5 weeks
-1911/12 = 5 weeks
-1912/11 = 5 weeks
-1913/12 = 5 weeks
-1914/12 = 5 weeks
-1915/12 = 5 weeks
-1916/12 = 5 weeks
-1917/11 = 5 weeks
-1918/11 = 5 weeks
-1919/12 = 5 weeks
-1920/12 = 5 weeks
-1921/12 = 5 weeks
-1922/12 = 5 weeks
-1923/11 = 5 weeks
-1924/12 = 5 weeks
-1925/12 = 5 weeks
-1926/12 = 5 weeks
-1927/12 = 5 weeks
-1928/11 = 5 weeks
-1929/11 = 5 weeks
+++ /dev/null
---TEST--
-Bug #8518: Date::copy() doest not copy the parts of a second.
---FILE--
-<?php
-/**
- * Test for: Date
- * Parts tested: Date::copy()
- * $Id$
- */
-
-require_once 'Date.php';
-
-$date = new Date('2006-11-08 10:19:25.9942');
-$date->setTZbyID("UTC");
-
-$tmp = new Date;
-$tmp->copy($date);
-echo $tmp->format('%Y-%m-%d %H:%M:%s%O'."\n");
-?>
---EXPECT--
-2006-11-08 10:19:25.994200+00:00
+++ /dev/null
---TEST--
-Bug #8912: putenv() causes crashes in DateTimeZone::inDaylightTime() under windows
---FILE--
-<?php
-/**
- * Test for: Date_TimeZone
- * Parts tested: Date_TimeZone::inDaylightTime()
- */
-
-require_once 'Date.php';
-
-$states = array(
- 'Australia/Adelaide',
- 'Australia/Canberra',
- 'Australia/Darwin',
- 'Australia/Brisbane',
- 'Australia/Hobart',
- 'Australia/Melbourne',
- 'Australia/Perth',
- 'Australia/Sydney'
-);
-
-$originalTimezone = new Date_TimeZone('Australia/Adelaide');
-
-$d = new Date("2007-08-31 11:59:59Z");
-$hn_time = $d->getTime();
-foreach ($states as $state) {
- $new_date = new Date($hn_time);
- print 'Original Time (Australia/Adelaide): ' . $new_date->formatLikeSQL("TZH:TZM") . " " . $new_date->getTime() . "\n";
- $timezone = new Date_TimeZone($state);
- $new_date->convertTZ($timezone);
- print $state . ': ' . ($hn_localtime = $new_date->getTime()) . "\n";
- print 'Difference: ' . ($hn_localtime - $hn_time) . "\n";
- $new_date->setTZ($originalTimezone);
- print $state . ': ' . ($hn_localtime = $new_date->getTime()) . "\n";
- print 'Difference: ' . ($hn_localtime - $hn_time) . "\n";
- print "\n";
-}
-?>
---EXPECT--
-Original Time (Australia/Adelaide): 01:00 1188561599
-Australia/Adelaide: 1188561599
-Difference: 0
-Australia/Adelaide: 1188561599
-Difference: 0
-
-Original Time (Australia/Adelaide): 01:00 1188561599
-Australia/Canberra: 1188561599
-Difference: 0
-Australia/Canberra: 1188563399
-Difference: 1800
-
-Original Time (Australia/Adelaide): 01:00 1188561599
-Australia/Darwin: 1188561599
-Difference: 0
-Australia/Darwin: 1188561599
-Difference: 0
-
-Original Time (Australia/Adelaide): 01:00 1188561599
-Australia/Brisbane: 1188561599
-Difference: 0
-Australia/Brisbane: 1188563399
-Difference: 1800
-
-Original Time (Australia/Adelaide): 01:00 1188561599
-Australia/Hobart: 1188561599
-Difference: 0
-Australia/Hobart: 1188563399
-Difference: 1800
-
-Original Time (Australia/Adelaide): 01:00 1188561599
-Australia/Melbourne: 1188561599
-Difference: 0
-Australia/Melbourne: 1188563399
-Difference: 1800
-
-Original Time (Australia/Adelaide): 01:00 1188561599
-Australia/Perth: 1188561599
-Difference: 0
-Australia/Perth: 1188556199
-Difference: -5400
-
-Original Time (Australia/Adelaide): 01:00 1188561599
-Australia/Sydney: 1188561599
-Difference: 0
-Australia/Sydney: 1188563399
-Difference: 1800
-
+++ /dev/null
---TEST--
-Bug #9213: Date_Calc doesn't like including Date.php
---FILE--
-<?php
-/**
- * Test for: Date_Calc
- * Parts tested: DATE_CALC_FORMAT constant
- * $Id$
- */
-
-require_once 'Date.php'; //Uh oh! I break things
-require_once 'Date/Calc.php';
-
-$calc = new Date_Calc();
-print $calc->beginOfWeek(1, 6, 2006) . "\n";
-print $calc->beginOfWeek(1, 6, 2006) . "\n";
-print $calc->beginOfNextWeek(1, 6, 2006) . "\n";
-?>
---EXPECT--
-20060529
-20060529
-20060605
+++ /dev/null
---TEST--
-Bug #9414: Date::addSeconds() fails to work properly with negative numbers
---FILE--
-<?php
-/**
- * Test for: Date
- * Parts tested: Date::addSeconds()
- */
-
-require_once 'Date.php';
-
-$date = new Date('2006-11-21');
-
-print "Date is now: " . $date->format("%Y-%m-%d %H:%M") . "\n";
-
-$date->addSeconds(-1 * 86400 * 7); # subtract 1 week (negative value)
-print 'After subtracting a week\'s worth of seconds, date is: ' . $date->format("%Y-%m-%d %H:%M") . "\n";
-
-$date->subtractSeconds(-1 * 86400 * 7); # add 1 week (negative value)
-print 'After subtracting a week\'s worth of seconds, date is: ' . $date->format("%Y-%m-%d %H:%M") . "\n";
-
-?>
---EXPECT--
-Date is now: 2006-11-21 00:00
-After subtracting a week's worth of seconds, date is: 2006-11-14 00:00
-After subtracting a week's worth of seconds, date is: 2006-11-21 00:00
+++ /dev/null
---TEST--
-Bug #9568:
-Date_Calc::beginOfMonthBySpan() and Date_Calc::endOfMonthBySpan() -
-December was always shifted up one year
---FILE--
-<?php
-/**
- * Test for: Date_Calc
- * Parts tested: Date_Calc::beginOfMonthBySpan()
- */
-
-require_once 'Date/Calc.php';
-
-$DateCalc = new Date_Calc();
-
-$month = 1; // January
-$year = 2006; // Year
-$sequence = 25; // Number of sequence
-
-$out = '';
-for ($months = 1; $months <= $sequence; $months++) {
- $date = $DateCalc->beginOfMonthBySpan(-$months, $month, $year, '%d.%m.%Y');
- $date_ex = explode('.', $date);
- $out = sprintf('%d - %s.%s.%s', $months, $date_ex[0], $date_ex[1], $date_ex[2]);
-
- if ($date_ex[1] == 12) {
- $out .= ' **';
- }
-
- echo $out . "\n";
-}
-
-echo "\n";
-
-$out = '';
-for ($months = 1; $months <= $sequence; $months++) {
- $date = $DateCalc->endOfMonthBySpan(-$months, $month, $year, '%d.%m.%Y');
- $date_ex = explode('.', $date);
- $out = sprintf('%d - %s.%s.%s', $months, $date_ex[0], $date_ex[1], $date_ex[2]);
-
- if ($date_ex[1] == 12) {
- $out .= ' **';
- }
-
- echo $out . "\n";
-}
-?>
---EXPECT--
-1 - 01.12.2005 **
-2 - 01.11.2005
-3 - 01.10.2005
-4 - 01.09.2005
-5 - 01.08.2005
-6 - 01.07.2005
-7 - 01.06.2005
-8 - 01.05.2005
-9 - 01.04.2005
-10 - 01.03.2005
-11 - 01.02.2005
-12 - 01.01.2005
-13 - 01.12.2004 **
-14 - 01.11.2004
-15 - 01.10.2004
-16 - 01.09.2004
-17 - 01.08.2004
-18 - 01.07.2004
-19 - 01.06.2004
-20 - 01.05.2004
-21 - 01.04.2004
-22 - 01.03.2004
-23 - 01.02.2004
-24 - 01.01.2004
-25 - 01.12.2003 **
-
-1 - 31.12.2005 **
-2 - 30.11.2005
-3 - 31.10.2005
-4 - 30.09.2005
-5 - 31.08.2005
-6 - 31.07.2005
-7 - 30.06.2005
-8 - 31.05.2005
-9 - 30.04.2005
-10 - 31.03.2005
-11 - 28.02.2005
-12 - 31.01.2005
-13 - 31.12.2004 **
-14 - 30.11.2004
-15 - 31.10.2004
-16 - 30.09.2004
-17 - 31.08.2004
-18 - 31.07.2004
-19 - 30.06.2004
-20 - 31.05.2004
-21 - 30.04.2004
-22 - 31.03.2004
-23 - 29.02.2004
-24 - 31.01.2004
-25 - 31.12.2003 **
+++ /dev/null
---TEST--
-Bug #967: Date_TimeZone uses a bad global variable
---FILE--
-<?php
-/**
- * Test for: Date_TimeZone
- * Parts tested: Date_TimeZone::setDefault() and Date_TimeZone::getDefault()
- */
-
-require_once 'Date/TimeZone.php';
-
-// Sets default timezone via a global variable.
-$_DATE_TIMEZONE_DEFAULT = 'Pacific/Chatham';
-$tz = Date_TimeZone::getDefault();
-echo 'Date_TimeZone::$id = ' . $tz->id . "\n";
-
-// Sets default timezone via Date_TimeZone::setDefault().
-Date_TimeZone::setDefault('CST');
-$default = 'EST';
-$tz = Date_TimeZone::getDefault();
-echo 'Date_TimeZone::$id = ' . $tz->id . "\n";
-echo '$GLOBALS[\'_DATE_TIMEZONE_DEFAULT\'] = ' . $_DATE_TIMEZONE_DEFAULT . "\n";
-?>
---EXPECT--
-Date_TimeZone::$id = Pacific/Chatham
-Date_TimeZone::$id = CST
-$GLOBALS['_DATE_TIMEZONE_DEFAULT'] = CST
+++ /dev/null
---TEST--
-Bug #9801: Date::compare() modify params on PHP5
---FILE--
-<?php
-/**
- * Test for: Date class
- * Parts tested: Date::compare()
- */
-
-require_once 'Date.php';
-
-// $GLOBALS['_DATE_TIMEZONE_DEFAULT'] = 'Canada/Eastern';
-
-$d1 = new Date();
-$d2 = new Date();
-$d1->setTZbyID('Canada/Eastern');
-$d2->setTZbyID('Canada/Eastern');
-
-echo 'Timezone (before): ' . $d1->tz->getId() . "\n";
-
-Date::compare($d1, $d2);
-
-echo 'Timezone (after): ' . $d1->tz->getId() . "\n";
-?>
---EXPECT--
-Timezone (before): Canada/Eastern
-Timezone (after): Canada/Eastern
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc class
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date_Calc. Otherwise, use the local development
- * copy of Date_Calc.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 1997-2005 Daniel Convissor <danielc@php.net>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author Daniel Convissor <danielc@php.net>
- * @copyright Copyright (c) 1997-2005 Daniel Convissor <danielc@php.net>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Date
- * @since File available since Release 1.5
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-/**
- * Get the needed class
- */
-require_once 'Date/Calc.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect != $actual) {
- echo "$test_name failed. Expect: $expect. Actual: $actual\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-
-compare('20001122', Date_Calc::dateFormat(22, 11, 2000, '%Y%m%d'), 'dateFormat');
-compare('20001122', Date_Calc::dateFormat('22', '11', '2000', '%Y%m%d'), 'dateFormat str');
-
-compare('2001', Date_Calc::defaultCentury('1'), 'defaultCentury 1 str');
-compare('2001', Date_Calc::defaultCentury(1), 'defaultCentury 1');
-compare('1960', Date_Calc::defaultCentury(60), 'defaultCentury 2');
-compare('2010', Date_Calc::defaultCentury(10), 'defaultCentury 3');
-
-compare(2451871, Date_Calc::dateToDays('22', '11', '2000'), 'dateToDays str');
-compare(2451871, Date_Calc::dateToDays(22, 11, 2000), 'dateToDays');
-compare('20001122', Date_Calc::daysToDate(2451871), 'daysToDate');
-
-compare('2000-47-3', Date_Calc::gregorianToISO('22', '11', '2000'), 'gregorianToISO str');
-compare('2000-47-3', Date_Calc::gregorianToISO(22, 11, 2000), 'gregorianToISO');
-compare(2451716.56767, Date_Calc::dateSeason('SUMMERSOLSTICE', 2000), 'dateSeason');
-
-compare(date('Ymd'), Date_Calc::dateNow(), 'dateNow');
-compare(date('Y'), Date_Calc::getYear(), 'getYear');
-compare(date('m'), Date_Calc::getMonth(), 'getMonth');
-compare(date('d'), Date_Calc::getDay(), 'getDay');
-
-compare(327, Date_Calc::dayOfYear(22, 11, 2000), 'dayOfYear');
-compare('November', Date_Calc::getMonthFullname(11), 'getMonthFullname');
-compare('Nov', Date_Calc::getMonthAbbrname(11), 'getMonthAbbrname');
-compare('Saturday', Date_Calc::getWeekdayFullname(1, 1, 2005), 'getWeekdayFullname');
-compare('Sat', Date_Calc::getWeekdayAbbrname(1, 1, 2005), 'getWeekdayAbbrname');
-compare(11, Date_Calc::getMonthFromFullName('November'), 'getMonthFromFullName');
-
-compare(327, Date_Calc::dayOfYear('22', '11', '2000'), 'dayOfYear str');
-compare('November', Date_Calc::getMonthFullname('11'), 'getMonthFullname str');
-compare('Nov', Date_Calc::getMonthAbbrname('11'), 'getMonthAbbrname str');
-compare('Saturday', Date_Calc::getWeekdayFullname('01', '01', '2005'), 'getWeekdayFullname str');
-compare('Sat', Date_Calc::getWeekdayAbbrname('01', '01', '2005'), 'getWeekdayAbbrname str');
-
-$exp = array(
- 'January',
- 'February',
- 'March',
- 'April',
- 'May',
- 'June',
- 'July',
- 'August',
- 'September',
- 'October',
- 'November',
- 'December'
-);
-compare($exp, Date_Calc::getMonthNames(), 'getMonthNames');
-
-$exp = array(
- 'Monday',
- 'Tuesday',
- 'Wednesday',
- 'Thursday',
- 'Friday',
- 'Saturday',
- 'Sunday'
-);
-compare($exp, Date_Calc::getWeekDays(), 'getWeekDays');
-
-compare(3, Date_Calc::dayOfWeek(22, 11, 2000), 'dayOfWeek');
-compare(47, Date_Calc::weekOfYear(22, 11, 2000), 'weekOfYear');
-compare(4, Date_Calc::quarterOfYear(22, 11, 2000), 'quarterOfYear');
-
-compare(3, Date_Calc::dayOfWeek('22', '11', '2000'), 'dayOfWeek str');
-compare(47, Date_Calc::weekOfYear('22', '11', '2000'), 'weekOfYear str');
-compare(4, Date_Calc::quarterOfYear('22', '11', '2000'), 'quarterOfYear str');
-
-compare(28, Date_Calc::daysInMonth(2, 1900), 'daysInMonth 1');
-compare(29, Date_Calc::daysInMonth(2, 1996), 'daysInMonth 2');
-compare(29, Date_Calc::daysInMonth(2, 2000), 'daysInMonth 3');
-compare(28, Date_Calc::daysInMonth(2, 2001), 'daysInMonth 4');
-compare(30, Date_Calc::daysInMonth(11, 2000), 'daysInMonth 5');
-
-compare(28, Date_Calc::daysInMonth('02', 1900), 'daysInMonth 1 str');
-compare(29, Date_Calc::daysInMonth('02', 1996), 'daysInMonth 2 str');
-compare(29, Date_Calc::daysInMonth('02', 2000), 'daysInMonth 3 str');
-compare(28, Date_Calc::daysInMonth('02', 2001), 'daysInMonth 4 str');
-compare(30, Date_Calc::daysInMonth('11', '2000'), 'daysInMonth 5 str');
-
-compare(5, Date_Calc::weeksInMonth(11, 2000), 'weeksInMonth');
-compare(5, Date_Calc::weeksInMonth('11', '2000'), 'weeksInMonth str');
-
-
-$exp = array(
- '19000226',
- '19000227',
- '19000228',
- '19000301',
- '19000302',
- '19000303',
- '19000304',
-);
-compare($exp, Date_Calc::getCalendarWeek(27, 2, 1900), 'getCalendarWeek 1');
-
-$exp = array(
- '20000228',
- '20000229',
- '20000301',
- '20000302',
- '20000303',
- '20000304',
- '20000305',
-);
-compare($exp, Date_Calc::getCalendarWeek(28, 2, 2000), 'getCalendarWeek 2');
-
-$exp = array(
- '20001127',
- '20001128',
- '20001129',
- '20001130',
- '20001201',
- '20001202',
- '20001203'
-);
-compare($exp, Date_Calc::getCalendarWeek(27, 11, 2000), 'getCalendarWeek 3');
-compare($exp, Date_Calc::getCalendarWeek('27', '11', '2000'), 'getCalendarWeek 3 str');
-
-$exp = array(
- array(
- '20001030',
- '20001031',
- '20001101',
- '20001102',
- '20001103',
- '20001104',
- ),
- array(
- '20001105',
- '20001106',
- '20001107',
- '20001108',
- '20001109',
- '20001110',
- '20001111',
- ),
- array(
- '20001112',
- '20001113',
- '20001114',
- '20001115',
- '20001116',
- '20001117',
- '20001118',
- ),
- array(
- '20001119',
- '20001121',
- '20001122',
- '20001123',
- '20001124',
- '20001125',
- '20001126',
- ),
- array(
- '20001127',
- '20001128',
- '20001129',
- '20001130',
- '20001201',
- '20001202',
- '20001203'
- )
-);
-compare($exp, Date_Calc::getCalendarMonth(11, 2000), 'getCalendarMonth');
-compare($exp, Date_Calc::getCalendarMonth('11', '2000'), 'getCalendarMonth str');
-
-// I don't feel like dealing with this right now...
-//compare('', Date_Calc::getCalendarYear(2000), 'getCalendarYear');
-
-compare('20001121', Date_Calc::prevDay(22, 11, 2000), 'prevDay');
-compare('20001123', Date_Calc::nextDay(22, 11, 2000), 'nextDay');
-compare('20001121', Date_Calc::prevDay(22, 11, 2000), 'prevDay str');
-compare('20001123', Date_Calc::nextDay('22', '11', '2000'), 'nextDay str');
-
-compare('20001117', Date_Calc::prevWeekday('19', '11', '2000'), 'prevWeekday 1 str');
-compare('20001117', Date_Calc::prevWeekday(19, 11, 2000), 'prevWeekday 1');
-compare('20001121', Date_Calc::prevWeekday(22, 11, 2000), 'prevWeekday 2');
-compare('20001123', Date_Calc::nextWeekday(22, 11, 2000), 'nextWeekday 1');
-compare('20001127', Date_Calc::nextWeekday(24, 11, 2000), 'nextWeekday 2');
-compare('20001127', Date_Calc::nextWeekday('24', '11', '2000'), 'nextWeekday 2 str');
-
-compare('20001121', Date_Calc::prevDayOfWeek('2', '22', '11', '2000'), 'prevDayOfWeek 1 str');
-compare('20001121', Date_Calc::prevDayOfWeek(2, 22, 11, 2000), 'prevDayOfWeek 1');
-compare('20001115', Date_Calc::prevDayOfWeek(3, 22, 11, 2000), 'prevDayOfWeek 2');
-compare('20001122', Date_Calc::prevDayOfWeek(3, 22, 11, 2000, '%Y%m%d', true), 'prevDayOfWeek 3');
-compare('20001122', Date_Calc::nextDayOfWeek(3, 22, 11, 2000, '%Y%m%d', true), 'nextDayOfWeek 1');
-compare('20001129', Date_Calc::nextDayOfWeek(3, 22, 11, 2000), 'nextDayOfWeek 2');
-compare('20001123', Date_Calc::nextDayOfWeek(4, 22, 11, 2000), 'nextDayOfWeek 3');
-compare('20001123', Date_Calc::nextDayOfWeek('4', '22', '11', '2000'), 'nextDayOfWeek 3 str');
-
-compare('20001121', Date_Calc::prevDayOfWeekOnOrBefore('2', '22', '11', '2000'), 'prevDayOfWeekOnOrBefore 1 str');
-compare('20001121', Date_Calc::prevDayOfWeekOnOrBefore(2, 22, 11, 2000), 'prevDayOfWeekOnOrBefore 1');
-compare('20001122', Date_Calc::prevDayOfWeekOnOrBefore(3, 22, 11, 2000), 'prevDayOfWeekOnOrBefore 2');
-compare('20001122', Date_Calc::nextDayOfWeekOnOrAfter(3, 22, 11, 2000), 'nextDayOfWeekOnOrAfter 1');
-compare('20001123', Date_Calc::nextDayOfWeekOnOrAfter(4, 22, 11, 2000), 'nextDayOfWeekOnOrAfter 2');
-compare('20001123', Date_Calc::nextDayOfWeekOnOrAfter('4', '22', '11', '2000'), 'nextDayOfWeekOnOrAfter 2 str');
-
-compare('20001120', Date_Calc::beginOfWeek('22', '11', '2000'), 'beginOfWeek str');
-compare('20001120', Date_Calc::beginOfWeek(22, 11, 2000), 'beginOfWeek');
-compare('20001126', Date_Calc::endOfWeek(22, 11, 2000), 'endOfWeek');
-compare('20001126', Date_Calc::endOfWeek('22', '11', '2000'), 'endOfWeek str');
-
-compare('20001113', Date_Calc::beginOfPrevWeek(22, 11, 2000), 'beginOfPrevWeek');
-compare('20001127', Date_Calc::beginOfNextWeek(22, 11, 2000), 'beginOfNextWeek');
-compare('20001113', Date_Calc::beginOfPrevWeek('22', '11', '2000'), 'beginOfPrevWeek str');
-compare('20001127', Date_Calc::beginOfNextWeek('22', '11', '2000'), 'beginOfNextWeek str');
-
-compare('20001101', Date_Calc::beginOfMonth(11, 2000), 'beginOfMonth');
-compare('20001101', Date_Calc::beginOfMonth('11', '2000'), 'beginOfMonth str');
-
-compare('20001001', Date_Calc::beginOfPrevMonth(22, 11, 2000), 'beginOfPrevMonth');
-compare('20001031', Date_Calc::endOfPrevMonth(22, 11, 2000), 'endOfPrevMonth');
-compare('20001001', Date_Calc::beginOfPrevMonth('22', '11', '2000'), 'beginOfPrevMonth str');
-compare('20001031', Date_Calc::endOfPrevMonth('22', '11', '2000'), 'endOfPrevMonth str');
-
-compare('20001201', Date_Calc::beginOfNextMonth(22, 11, 2000), 'beginOfNextMonth');
-compare('20001231', Date_Calc::endOfNextMonth(22, 11, 2000), 'endOfNextMonth');
-compare('20001201', Date_Calc::beginOfNextMonth('22', '11', '2000'), 'beginOfNextMonth str');
-compare('20001231', Date_Calc::endOfNextMonth('22', '11', '2000'), 'endOfNextMonth str');
-
-compare('19991001', Date_Calc::beginOfMonthBySpan(-13, 11, 2000), 'beginOfMonthBySpan 1');
-compare('20001001', Date_Calc::beginOfMonthBySpan(-1, 11, 2000), 'beginOfMonthBySpan 2');
-compare('20001101', Date_Calc::beginOfMonthBySpan(0, 11, 2000), 'beginOfMonthBySpan 3');
-compare('20001201', Date_Calc::beginOfMonthBySpan(1, 11, 2000), 'beginOfMonthBySpan 4');
-compare('20011201', Date_Calc::beginOfMonthBySpan(13, 11, 2000), 'beginOfMonthBySpan 5');
-
-compare('19990101', Date_Calc::beginOfMonthBySpan('-13', '02', '2000'), 'beginOfMonthBySpan 6 str');
-compare('19990101', Date_Calc::beginOfMonthBySpan(-13, 2, 2000), 'beginOfMonthBySpan 6');
-compare('20000101', Date_Calc::beginOfMonthBySpan(-1, 2, 2000), 'beginOfMonthBySpan 7');
-compare('20000201', Date_Calc::beginOfMonthBySpan(0, 2, 2000), 'beginOfMonthBySpan 8');
-compare('20000301', Date_Calc::beginOfMonthBySpan(1, 2, 2000), 'beginOfMonthBySpan 9');
-compare('20010301', Date_Calc::beginOfMonthBySpan(13, 2, 2000), 'beginOfMonthBySpan 10');
-compare('20010301', Date_Calc::beginOfMonthBySpan('13', '02', '2000'), 'beginOfMonthBySpan 10 str');
-
-compare('19991031', Date_Calc::endOfMonthBySpan(-13, 11, 2000), 'endOfMonthBySpan 1');
-compare('20001031', Date_Calc::endOfMonthBySpan(-1, 11, 2000), 'endOfMonthBySpan 2');
-compare('20001130', Date_Calc::endOfMonthBySpan(0, 11, 2000), 'endOfMonthBySpan 3');
-compare('20001231', Date_Calc::endOfMonthBySpan(1, 11, 2000), 'endOfMonthBySpan 4');
-compare('20011231', Date_Calc::endOfMonthBySpan(13, 11, 2000), 'endOfMonthBySpan 5');
-
-compare('19990131', Date_Calc::endOfMonthBySpan('-13', '02', '2000'), 'endOfMonthBySpan 6 str');
-compare('19990131', Date_Calc::endOfMonthBySpan(-13, 2, 2000), 'endOfMonthBySpan 6');
-compare('20000131', Date_Calc::endOfMonthBySpan(-1, 2, 2000), 'endOfMonthBySpan 7');
-compare('20000229', Date_Calc::endOfMonthBySpan(0, 2, 2000), 'endOfMonthBySpan 8');
-compare('20000331', Date_Calc::endOfMonthBySpan(1, 2, 2000), 'endOfMonthBySpan 9');
-compare('20010331', Date_Calc::endOfMonthBySpan(13, 2, 2000), 'endOfMonthBySpan 10');
-compare('20010331', Date_Calc::endOfMonthBySpan('13', '02', '2000'), 'endOfMonthBySpan 10 str');
-
-compare(3, Date_Calc::firstOfMonthWeekday(11, 2000), 'firstOfMonthWeekday');
-compare(3, Date_Calc::firstOfMonthWeekday('11', '2000'), 'firstOfMonthWeekday str');
-
-compare('20050101', Date_Calc::NWeekdayOfMonth(1, 6, 1, 2005), 'NWeekdayOfMonth 161');
-compare('20050102', Date_Calc::NWeekdayOfMonth(1, 0, 1, 2005), 'NWeekdayOfMonth 101');
-compare('20050103', Date_Calc::NWeekdayOfMonth(1, 1, 1, 2005), 'NWeekdayOfMonth 111');
-compare('20050104', Date_Calc::NWeekdayOfMonth(1, 2, 1, 2005), 'NWeekdayOfMonth 121');
-compare('20050105', Date_Calc::NWeekdayOfMonth(1, 3, 1, 2005), 'NWeekdayOfMonth 131');
-compare('20050106', Date_Calc::NWeekdayOfMonth(1, 4, 1, 2005), 'NWeekdayOfMonth 141');
-compare('20050107', Date_Calc::NWeekdayOfMonth(1, 5, 1, 2005), 'NWeekdayOfMonth 151');
-
-compare('20050108', Date_Calc::NWeekdayOfMonth('2', '6', '01', '2005'), 'NWeekdayOfMonth 261');
-compare('20050109', Date_Calc::NWeekdayOfMonth('2', '0', '01', '2005'), 'NWeekdayOfMonth 201');
-compare('20050110', Date_Calc::NWeekdayOfMonth('2', '1', '01', '2005'), 'NWeekdayOfMonth 211');
-compare('20050111', Date_Calc::NWeekdayOfMonth('2', '2', '01', '2005'), 'NWeekdayOfMonth 221');
-compare('20050112', Date_Calc::NWeekdayOfMonth('2', '3', '01', '2005'), 'NWeekdayOfMonth 231');
-compare('20050113', Date_Calc::NWeekdayOfMonth('2', '4', '01', '2005'), 'NWeekdayOfMonth 241');
-compare('20050114', Date_Calc::NWeekdayOfMonth('2', '5', '01', '2005'), 'NWeekdayOfMonth 251');
-
-compare('20050131', Date_Calc::NWeekdayOfMonth('last', 1, 1, 2005), 'NWeekdayOfMonth l11');
-compare('20050130', Date_Calc::NWeekdayOfMonth('last', 0, 1, 2005), 'NWeekdayOfMonth l01');
-compare('20050129', Date_Calc::NWeekdayOfMonth('last', 6, 1, 2005), 'NWeekdayOfMonth l61');
-compare('20050128', Date_Calc::NWeekdayOfMonth('last', 5, 1, 2005), 'NWeekdayOfMonth l51');
-compare('20050127', Date_Calc::NWeekdayOfMonth('last', 4, 1, 2005), 'NWeekdayOfMonth l41');
-compare('20050126', Date_Calc::NWeekdayOfMonth('last', 3, 1, 2005), 'NWeekdayOfMonth l31');
-compare('20050125', Date_Calc::NWeekdayOfMonth('last', 2, 1, 2005), 'NWeekdayOfMonth l21');
-
-compare('20050331', Date_Calc::NWeekdayOfMonth('last', 4, 3, 2005), 'NWeekdayOfMonth l43');
-compare('20050330', Date_Calc::NWeekdayOfMonth('last', 3, 3, 2005), 'NWeekdayOfMonth l33');
-compare('20050329', Date_Calc::NWeekdayOfMonth('last', 2, 3, 2005), 'NWeekdayOfMonth l23');
-compare('20050328', Date_Calc::NWeekdayOfMonth('last', 1, 3, 2005), 'NWeekdayOfMonth l13');
-compare('20050327', Date_Calc::NWeekdayOfMonth('last', 0, 3, 2005), 'NWeekdayOfMonth l03');
-compare('20050326', Date_Calc::NWeekdayOfMonth('last', 6, 3, 2005), 'NWeekdayOfMonth l63');
-compare('20050325', Date_Calc::NWeekdayOfMonth('last', 5, 3, 2005), 'NWeekdayOfMonth l53');
-
-
-compare(false, Date_Calc::isValidDate(29, 2, 1900), 'isValidDate 1');
-compare(true, Date_Calc::isValidDate(29, 2, 2000), 'isValidDate 2');
-compare(true, Date_Calc::isValidDate('29', '02', '2000'), 'isValidDate 2 str');
-
-compare(false, Date_Calc::isLeapYear(1900), 'isLeapYear 1');
-compare(true, Date_Calc::isLeapYear(1996), 'isLeapYear 2');
-compare(true, Date_Calc::isLeapYear(2000), 'isLeapYear 3');
-compare(false, Date_Calc::isLeapYear(2001), 'isLeapYear 4');
-compare(false, Date_Calc::isLeapYear('2001'), 'isLeapYear 4 str');
-
-compare(false, Date_Calc::isFutureDate('22', '11', '2000'), 'isFutureDate 1 str');
-compare(false, Date_Calc::isFutureDate(22, 11, 2000), 'isFutureDate 1');
-compare(true, Date_Calc::isFutureDate(22, 11, date('Y') + 1), 'isFutureDate 2');
-
-compare(false, Date_Calc::isPastDate(22, 11, date('Y') + 1), 'isPastDate 1');
-compare(true, Date_Calc::isPastDate(22, 11, 2000), 'isPastDate 2');
-compare(true, Date_Calc::isPastDate('22', '11', '2000'), 'isPastDate 2 str');
-
-compare(10, Date_Calc::dateDiff(22, 11, 2000, 12, 11, 2000), 'dateDiff 1');
-compare(10, Date_Calc::dateDiff(12, 11, 2000, 22, 11, 2000), 'dateDiff 2');
-compare(61, Date_Calc::dateDiff(22, 11, 2000, 22, 1, 2001), 'dateDiff 3');
-compare(61, Date_Calc::dateDiff('22', '11', '2000', '22', '01', '2001'), 'dateDiff 3 str');
-
-compare(-1, Date_Calc::compareDates(12, 11, 2000, 22, 11, 2000), 'compareDates 1');
-compare(0, Date_Calc::compareDates(22, 11, 2000, 22, 11, 2000), 'compareDates 2');
-compare(1, Date_Calc::compareDates(22, 11, 2000, 12, 11, 2000), 'compareDates 3');
-compare(1, Date_Calc::compareDates('22', '11', '2000', '12', '11', '2000'), 'compareDates 3 str');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc::addSeconds() function
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-
-$date = new Date(
- "1972-07-01 00:59:58.987654",
- true
-); // count leap seconds
-$date->setTZbyID("Europe/London");
-
-$datetest = new Date($date);
-$datetest->addSeconds(1, true);
-compare("01/07/1972 00.59.59.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1");
-$datetest = new Date($date);
-$datetest->addSeconds(2, true);
-compare("01/07/1972 00.59.60.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "2"); // leap second
-$datetest = new Date($date);
-$datetest->addSeconds(3, true);
-compare("01/07/1972 01.00.00.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3");
-$datetest = new Date($date);
-$datetest->addSeconds(4, true);
-compare("01/07/1972 01.00.01.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "4");
-$datetest = new Date($date);
-$datetest->addSeconds(5, true);
-compare("01/07/1972 01.00.02.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "5");
-$datetest = new Date($date);
-$datetest->addSeconds(6, true);
-compare("01/07/1972 01.00.03.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "6");
-$datetest = new Date($date);
-$datetest->addSeconds(7, true);
-compare("01/07/1972 01.00.04.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7");
-$datetest = new Date($date);
-$datetest->addSeconds(8, true);
-compare("01/07/1972 01.00.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "8");
-$datetest = new Date($date);
-$datetest->addSeconds(9, true);
-compare("01/07/1972 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "9");
-$datetest = new Date($date);
-$datetest->addSeconds(10, true);
-compare("01/07/1972 01.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "10");
-$datetest = new Date($date);
-$datetest->addSeconds(60, true);
-compare("01/07/1972 01.00.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "60");
-$datetest = new Date($date);
-$datetest->addSeconds(3599, true);
-compare("01/07/1972 01.59.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3599");
-$datetest = new Date($date);
-$datetest->addSeconds(3600, true);
-compare("01/07/1972 01.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3600");
-$datetest = new Date($date);
-$datetest->addSeconds(3601, true);
-compare("01/07/1972 01.59.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3601");
-$datetest = new Date($date);
-$datetest->addSeconds(7199, true);
-compare("01/07/1972 02.59.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7199");
-$datetest = new Date($date);
-$datetest->addSeconds(7200, true);
-compare("01/07/1972 02.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7200");
-$datetest = new Date($date);
-$datetest->addSeconds(7201, true);
-compare("01/07/1972 02.59.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7201");
-$datetest = new Date($date);
-$datetest->addSeconds(86400, true);
-compare("02/07/1972 00.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "86400");
-$datetest = new Date($date);
-$datetest->addSeconds(864000, true);
-compare("11/07/1972 00.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "864000");
-$datetest = new Date($date);
-$datetest->addSeconds(8640000, true);
-compare("09/10/1972 00.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "8640000");
-$datetest = new Date($date);
-$datetest->addSeconds(31622400, true);
-compare("02/07/1973 00.59.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "31622400"); // 2 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(63244800, true);
-compare("03/07/1974 00.59.55.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "63244800"); // 3 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(94867200, true);
-compare("04/07/1975 00.59.54.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "94867200"); // 4 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(126489600, true);
-compare("04/07/1976 00.59.53.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "126489600"); // etc.
-$datetest = new Date($date);
-$datetest->addSeconds(158112000, true);
-compare("05/07/1977 00.59.52.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "158112000");
-$datetest = new Date($date);
-$datetest->addSeconds(189734400, true);
-compare("06/07/1978 00.59.51.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "189734400");
-$datetest = new Date($date);
-$datetest->addSeconds(221356800, true);
-compare("07/07/1979 00.59.50.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "221356800");
-$datetest = new Date($date);
-$datetest->addSeconds(252979200, true);
-compare("07/07/1980 00.59.49.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "252979200");
-$datetest = new Date($date);
-$datetest->addSeconds(284601600, true);
-compare("08/07/1981 00.59.48.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "284601600"); // leap second in June 1981
-$datetest = new Date($date);
-$datetest->addSeconds(316224000, true);
-compare("09/07/1982 00.59.47.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "316224000");
-$datetest = new Date($date);
-$datetest->addSeconds(347846400, true);
-compare("10/07/1983 00.59.46.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "347846400");
-$datetest = new Date($date);
-$datetest->addSeconds(379468800, true);
-compare("10/07/1984 00.59.46.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "379468800"); // no leap second in 1984
-$datetest = new Date($date);
-$datetest->addSeconds(411091200, true);
-compare("11/07/1985 00.59.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "411091200"); // leap second in June 1985
-$datetest = new Date($date);
-$datetest->addSeconds(442713600, true);
-compare("12/07/1986 00.59.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "442713600"); // no leap second in 1986
-$datetest = new Date($date);
-$datetest->addSeconds(474336000, true);
-compare("13/07/1987 00.59.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "474336000");
-$datetest = new Date($date);
-$datetest->addSeconds(505958400, true);
-compare("13/07/1988 00.59.44.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "505958400"); // leap second in Dec 1987
-$datetest = new Date($date);
-$datetest->addSeconds(537580800, true);
-compare("14/07/1989 00.59.44.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "537580800");
-$datetest = new Date($date);
-$datetest->addSeconds(569203200, true);
-compare("15/07/1990 00.59.43.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "569203200");
-$datetest = new Date($date);
-$datetest->addSeconds(600825600, true);
-compare("16/07/1991 00.59.42.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "600825600");
-$datetest = new Date($date);
-$datetest->addSeconds(632448000, true);
-compare("16/07/1992 00.59.41.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "632448000");
-$datetest = new Date($date);
-$datetest->addSeconds(664070400, true);
-compare("17/07/1993 00.59.40.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "664070400");
-$datetest = new Date($date);
-$datetest->addSeconds(695692800, true);
-compare("18/07/1994 00.59.39.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "695692800");
-$datetest = new Date($date);
-$datetest->addSeconds(727315200, true);
-compare("19/07/1995 00.59.39.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "727315200");
-$datetest = new Date($date);
-$datetest->addSeconds(758937600, true);
-compare("19/07/1996 00.59.38.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "758937600");
-$datetest = new Date($date);
-$datetest->addSeconds(790560000, true);
-compare("20/07/1997 00.59.37.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "790560000");
-$datetest = new Date($date);
-$datetest->addSeconds(822182400, true);
-compare("21/07/1998 00.59.37.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "822182400");
-$datetest = new Date($date);
-$datetest->addSeconds(853804800, true);
-compare("22/07/1999 00.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "853804800");
-$datetest = new Date($date);
-$datetest->addSeconds(885427200, true);
-compare("22/07/2000 00.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "885427200");
-$datetest = new Date($date);
-$datetest->addSeconds(917049600, true);
-compare("23/07/2001 00.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "917049600");
-$datetest = new Date($date);
-$datetest->addSeconds(948672000, true);
-compare("24/07/2002 00.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "948672000");
-$datetest = new Date($date);
-$datetest->addSeconds(980294400, true);
-compare("25/07/2003 00.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "980294400");
-$datetest = new Date($date);
-$datetest->addSeconds(1011916800, true);
-compare("25/07/2004 00.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1011916800");
-$datetest = new Date($date);
-$datetest->addSeconds(1043539200, true);
-compare("26/07/2005 00.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1043539200");
-$datetest = new Date($date);
-$datetest->addSeconds(1075161600, true);
-compare("27/07/2006 00.59.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1075161600"); // 23rd leap second in Dec 2005
-$datetest = new Date($date);
-$datetest->addSeconds(1106784000, true);
-compare("28/07/2007 00.59.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1106784000");
-$datetest = new Date($date);
-$datetest->addSeconds(1138406400, true);
-compare("28/07/2008 00.59.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1138406400");
-$datetest = new Date($date);
-$datetest->addSeconds(1170028800, true);
-compare("29/07/2009 00.59.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1170028800");
-
-
-$date->setDate("2006-01-01 00:00:05.987654");
-
-$datetest = new Date($date);
-$datetest->addSeconds(-1, true);
-compare("01/01/2006 00.00.04.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1");
-$datetest = new Date($date);
-$datetest->addSeconds(-2, true);
-compare("01/01/2006 00.00.03.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-2");
-$datetest = new Date($date);
-$datetest->addSeconds(-3, true);
-compare("01/01/2006 00.00.02.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3");
-$datetest = new Date($date);
-$datetest->addSeconds(-4, true);
-compare("01/01/2006 00.00.01.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-4");
-$datetest = new Date($date);
-$datetest->addSeconds(-5, true);
-compare("01/01/2006 00.00.00.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-5");
-$datetest = new Date($date);
-$datetest->addSeconds(-6, true);
-compare("31/12/2005 23.59.60.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-6"); // leap second
-$datetest = new Date($date);
-$datetest->addSeconds(-7, true);
-compare("31/12/2005 23.59.59.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7");
-$datetest = new Date($date);
-$datetest->addSeconds(-8, true);
-compare("31/12/2005 23.59.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-8");
-$datetest = new Date($date);
-$datetest->addSeconds(-9, true);
-compare("31/12/2005 23.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-9");
-$datetest = new Date($date);
-$datetest->addSeconds(-10, true);
-compare("31/12/2005 23.59.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-10");
-$datetest = new Date($date);
-$datetest->addSeconds(-60, true);
-compare("31/12/2005 23.59.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-60");
-$datetest = new Date($date);
-$datetest->addSeconds(-3599, true);
-compare("31/12/2005 23.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3599");
-$datetest = new Date($date);
-$datetest->addSeconds(-3600, true);
-compare("31/12/2005 23.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3600");
-$datetest = new Date($date);
-$datetest->addSeconds(-3601, true);
-compare("31/12/2005 23.00.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3601");
-$datetest = new Date($date);
-$datetest->addSeconds(-7199, true);
-compare("31/12/2005 22.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7199");
-$datetest = new Date($date);
-$datetest->addSeconds(-7200, true);
-compare("31/12/2005 22.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7200");
-$datetest = new Date($date);
-$datetest->addSeconds(-7201, true);
-compare("31/12/2005 22.00.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7201");
-$datetest = new Date($date);
-$datetest->addSeconds(-86400, true);
-compare("31/12/2005 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-86400");
-$datetest = new Date($date);
-$datetest->addSeconds(-864000, true);
-compare("22/12/2005 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-864000");
-$datetest = new Date($date);
-$datetest->addSeconds(-8640000, true);
-compare("23/09/2005 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-8640000");
-$datetest = new Date($date);
-$datetest->addSeconds(-31622400, true);
-compare("31/12/2004 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-31622400");
-$datetest = new Date($date);
-$datetest->addSeconds(-63244800, true);
-compare("31/12/2003 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-63244800");
-$datetest = new Date($date);
-$datetest->addSeconds(-94867200, true);
-compare("30/12/2002 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-94867200");
-$datetest = new Date($date);
-$datetest->addSeconds(-126489600, true);
-compare("29/12/2001 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-126489600");
-$datetest = new Date($date);
-$datetest->addSeconds(-158112000, true);
-compare("28/12/2000 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-158112000");
-$datetest = new Date($date);
-$datetest->addSeconds(-189734400, true);
-compare("28/12/1999 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-189734400");
-$datetest = new Date($date);
-$datetest->addSeconds(-221356800, true);
-compare("27/12/1998 00.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-221356800"); // 2 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(-252979200, true);
-compare("26/12/1997 00.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-252979200");
-$datetest = new Date($date);
-$datetest->addSeconds(-284601600, true);
-compare("25/12/1996 00.00.08.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-284601600"); // leap second in June 1997
-$datetest = new Date($date);
-$datetest->addSeconds(-316224000, true);
-compare("25/12/1995 00.00.09.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-316224000"); // leap second in Dec 1995
-$datetest = new Date($date);
-$datetest->addSeconds(-347846400, true);
-compare("24/12/1994 00.00.09.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-347846400");
-$datetest = new Date($date);
-$datetest->addSeconds(-379468800, true);
-compare("23/12/1993 00.00.10.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-379468800"); // leap second in June 1994
-$datetest = new Date($date);
-$datetest->addSeconds(-411091200, true);
-compare("22/12/1992 00.00.11.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-411091200"); // leap second in June 1993
-$datetest = new Date($date);
-$datetest->addSeconds(-442713600, true);
-compare("22/12/1991 00.00.12.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-442713600"); // leap second in June 1992
-$datetest = new Date($date);
-$datetest->addSeconds(-474336000, true);
-compare("21/12/1990 00.00.13.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-474336000"); // leap second in Dec 1990
-$datetest = new Date($date);
-$datetest->addSeconds(-505958400, true);
-compare("20/12/1989 00.00.14.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-505958400"); // leap second in Dec 1989
-$datetest = new Date($date);
-$datetest->addSeconds(-537580800, true);
-compare("19/12/1988 00.00.14.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-537580800");
-$datetest = new Date($date);
-$datetest->addSeconds(-569203200, true);
-compare("19/12/1987 00.00.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-569203200"); // leap second in Dec 1987
-$datetest = new Date($date);
-$datetest->addSeconds(-600825600, true);
-compare("18/12/1986 00.00.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-600825600");
-$datetest = new Date($date);
-$datetest->addSeconds(-632448000, true);
-compare("17/12/1985 00.00.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-632448000");
-$datetest = new Date($date);
-$datetest->addSeconds(-664070400, true);
-compare("16/12/1984 00.00.16.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-664070400"); // leap second in June 1985
-$datetest = new Date($date);
-$datetest->addSeconds(-695692800, true);
-compare("16/12/1983 00.00.16.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-695692800");
-$datetest = new Date($date);
-$datetest->addSeconds(-727315200, true);
-compare("15/12/1982 00.00.17.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-727315200");
-$datetest = new Date($date);
-$datetest->addSeconds(-758937600, true);
-compare("14/12/1981 00.00.18.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-758937600");
-$datetest = new Date($date);
-$datetest->addSeconds(-790560000, true);
-compare("13/12/1980 00.00.19.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-790560000");
-$datetest = new Date($date);
-$datetest->addSeconds(-822182400, true);
-compare("13/12/1979 00.00.20.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-822182400");
-$datetest = new Date($date);
-$datetest->addSeconds(-853804800, true);
-compare("12/12/1978 00.00.21.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-853804800");
-$datetest = new Date($date);
-$datetest->addSeconds(-885427200, true);
-compare("11/12/1977 00.00.22.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-885427200");
-$datetest = new Date($date);
-$datetest->addSeconds(-917049600, true);
-compare("10/12/1976 00.00.23.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-917049600");
-$datetest = new Date($date);
-$datetest->addSeconds(-948672000, true);
-compare("10/12/1975 00.00.24.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-948672000");
-$datetest = new Date($date);
-$datetest->addSeconds(-980294400, true);
-compare("09/12/1974 00.00.25.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-980294400");
-$datetest = new Date($date);
-$datetest->addSeconds(-1011916800, true);
-compare("08/12/1973 00.00.26.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1011916800");
-$datetest = new Date($date);
-$datetest->addSeconds(-1043539200, true);
-compare("07/12/1972 00.00.27.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1043539200");
-$datetest = new Date($date);
-$datetest->addSeconds(-1075161600, true);
-compare("07/12/1971 00.00.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1075161600"); // 23 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(-1106784000, true);
-compare("06/12/1970 00.00.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1106784000");
-$datetest = new Date($date);
-$datetest->addSeconds(-1138406400, true);
-compare("05/12/1969 00.00.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1138406400");
-$datetest = new Date($date);
-$datetest->addSeconds(-1170028800, true);
-compare("04/12/1968 00.00.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1170028800");
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc::addSeconds() function
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-
-$date = new Date(
- "1972-07-01 05:29:58.987654",
- true
-); // count leap seconds
-$date->setTZbyID("Asia/Calcutta");
-
-$datetest = new Date($date);
-$datetest->addSeconds(1, true);
-compare("01/07/1972 05.29.59.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1");
-$datetest = new Date($date);
-$datetest->addSeconds(2, true);
-compare("01/07/1972 05.29.60.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "2"); // leap second
-$datetest = new Date($date);
-$datetest->addSeconds(3, true);
-compare("01/07/1972 05.30.00.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3");
-$datetest = new Date($date);
-$datetest->addSeconds(4, true);
-compare("01/07/1972 05.30.01.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "4");
-$datetest = new Date($date);
-$datetest->addSeconds(5, true);
-compare("01/07/1972 05.30.02.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "5");
-$datetest = new Date($date);
-$datetest->addSeconds(6, true);
-compare("01/07/1972 05.30.03.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "6");
-$datetest = new Date($date);
-$datetest->addSeconds(7, true);
-compare("01/07/1972 05.30.04.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7");
-$datetest = new Date($date);
-$datetest->addSeconds(8, true);
-compare("01/07/1972 05.30.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "8");
-$datetest = new Date($date);
-$datetest->addSeconds(9, true);
-compare("01/07/1972 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "9");
-$datetest = new Date($date);
-$datetest->addSeconds(10, true);
-compare("01/07/1972 05.30.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "10");
-$datetest = new Date($date);
-$datetest->addSeconds(60, true);
-compare("01/07/1972 05.30.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "60");
-$datetest = new Date($date);
-$datetest->addSeconds(3599, true);
-compare("01/07/1972 06.29.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3599");
-$datetest = new Date($date);
-$datetest->addSeconds(3600, true);
-compare("01/07/1972 06.29.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3600");
-$datetest = new Date($date);
-$datetest->addSeconds(3601, true);
-compare("01/07/1972 06.29.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3601");
-$datetest = new Date($date);
-$datetest->addSeconds(7199, true);
-compare("01/07/1972 07.29.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7199");
-$datetest = new Date($date);
-$datetest->addSeconds(7200, true);
-compare("01/07/1972 07.29.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7200");
-$datetest = new Date($date);
-$datetest->addSeconds(7201, true);
-compare("01/07/1972 07.29.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7201");
-$datetest = new Date($date);
-$datetest->addSeconds(86400, true);
-compare("02/07/1972 05.29.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "86400");
-$datetest = new Date($date);
-$datetest->addSeconds(864000, true);
-compare("11/07/1972 05.29.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "864000");
-$datetest = new Date($date);
-$datetest->addSeconds(8640000, true);
-compare("09/10/1972 05.29.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "8640000");
-$datetest = new Date($date);
-$datetest->addSeconds(31622400, true);
-compare("02/07/1973 05.29.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "31622400"); // 2 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(63244800, true);
-compare("03/07/1974 05.29.55.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "63244800"); // 3 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(94867200, true);
-compare("04/07/1975 05.29.54.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "94867200"); // 4 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(126489600, true);
-compare("04/07/1976 05.29.53.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "126489600"); // etc.
-$datetest = new Date($date);
-$datetest->addSeconds(158112000, true);
-compare("05/07/1977 05.29.52.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "158112000");
-$datetest = new Date($date);
-$datetest->addSeconds(189734400, true);
-compare("06/07/1978 05.29.51.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "189734400");
-$datetest = new Date($date);
-$datetest->addSeconds(221356800, true);
-compare("07/07/1979 05.29.50.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "221356800");
-$datetest = new Date($date);
-$datetest->addSeconds(252979200, true);
-compare("07/07/1980 05.29.49.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "252979200");
-$datetest = new Date($date);
-$datetest->addSeconds(284601600, true);
-compare("08/07/1981 05.29.48.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "284601600"); // leap second in June 1981
-$datetest = new Date($date);
-$datetest->addSeconds(316224000, true);
-compare("09/07/1982 05.29.47.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "316224000");
-$datetest = new Date($date);
-$datetest->addSeconds(347846400, true);
-compare("10/07/1983 05.29.46.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "347846400");
-$datetest = new Date($date);
-$datetest->addSeconds(379468800, true);
-compare("10/07/1984 05.29.46.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "379468800"); // no leap second in 1984
-$datetest = new Date($date);
-$datetest->addSeconds(411091200, true);
-compare("11/07/1985 05.29.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "411091200"); // leap second in June 1985
-$datetest = new Date($date);
-$datetest->addSeconds(442713600, true);
-compare("12/07/1986 05.29.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "442713600"); // no leap second in 1986
-$datetest = new Date($date);
-$datetest->addSeconds(474336000, true);
-compare("13/07/1987 05.29.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "474336000");
-$datetest = new Date($date);
-$datetest->addSeconds(505958400, true);
-compare("13/07/1988 05.29.44.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "505958400"); // leap second in Dec 1987
-$datetest = new Date($date);
-$datetest->addSeconds(537580800, true);
-compare("14/07/1989 05.29.44.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "537580800");
-$datetest = new Date($date);
-$datetest->addSeconds(569203200, true);
-compare("15/07/1990 05.29.43.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "569203200");
-$datetest = new Date($date);
-$datetest->addSeconds(600825600, true);
-compare("16/07/1991 05.29.42.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "600825600");
-$datetest = new Date($date);
-$datetest->addSeconds(632448000, true);
-compare("16/07/1992 05.29.41.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "632448000");
-$datetest = new Date($date);
-$datetest->addSeconds(664070400, true);
-compare("17/07/1993 05.29.40.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "664070400");
-$datetest = new Date($date);
-$datetest->addSeconds(695692800, true);
-compare("18/07/1994 05.29.39.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "695692800");
-$datetest = new Date($date);
-$datetest->addSeconds(727315200, true);
-compare("19/07/1995 05.29.39.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "727315200");
-$datetest = new Date($date);
-$datetest->addSeconds(758937600, true);
-compare("19/07/1996 05.29.38.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "758937600");
-$datetest = new Date($date);
-$datetest->addSeconds(790560000, true);
-compare("20/07/1997 05.29.37.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "790560000");
-$datetest = new Date($date);
-$datetest->addSeconds(822182400, true);
-compare("21/07/1998 05.29.37.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "822182400");
-$datetest = new Date($date);
-$datetest->addSeconds(853804800, true);
-compare("22/07/1999 05.29.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "853804800");
-$datetest = new Date($date);
-$datetest->addSeconds(885427200, true);
-compare("22/07/2000 05.29.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "885427200");
-$datetest = new Date($date);
-$datetest->addSeconds(917049600, true);
-compare("23/07/2001 05.29.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "917049600");
-$datetest = new Date($date);
-$datetest->addSeconds(948672000, true);
-compare("24/07/2002 05.29.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "948672000");
-$datetest = new Date($date);
-$datetest->addSeconds(980294400, true);
-compare("25/07/2003 05.29.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "980294400");
-$datetest = new Date($date);
-$datetest->addSeconds(1011916800, true);
-compare("25/07/2004 05.29.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1011916800");
-$datetest = new Date($date);
-$datetest->addSeconds(1043539200, true);
-compare("26/07/2005 05.29.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1043539200");
-$datetest = new Date($date);
-$datetest->addSeconds(1075161600, true);
-compare("27/07/2006 05.29.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1075161600"); // 23rd leap second in Dec 2005
-$datetest = new Date($date);
-$datetest->addSeconds(1106784000, true);
-compare("28/07/2007 05.29.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1106784000");
-$datetest = new Date($date);
-$datetest->addSeconds(1138406400, true);
-compare("28/07/2008 05.29.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1138406400");
-$datetest = new Date($date);
-$datetest->addSeconds(1170028800, true);
-compare("29/07/2009 05.29.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1170028800");
-
-
-$date->setDate("2006-01-01 05:30:05.987654");
-
-$datetest = new Date($date);
-$datetest->addSeconds(-1, true);
-compare("01/01/2006 05.30.04.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1");
-$datetest = new Date($date);
-$datetest->addSeconds(-2, true);
-compare("01/01/2006 05.30.03.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-2");
-$datetest = new Date($date);
-$datetest->addSeconds(-3, true);
-compare("01/01/2006 05.30.02.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3");
-$datetest = new Date($date);
-$datetest->addSeconds(-4, true);
-compare("01/01/2006 05.30.01.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-4");
-$datetest = new Date($date);
-$datetest->addSeconds(-5, true);
-compare("01/01/2006 05.30.00.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-5");
-$datetest = new Date($date);
-$datetest->addSeconds(-6, true);
-compare("01/01/2006 05.29.60.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-6"); // leap second
-$datetest = new Date($date);
-$datetest->addSeconds(-7, true);
-compare("01/01/2006 05.29.59.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7");
-$datetest = new Date($date);
-$datetest->addSeconds(-8, true);
-compare("01/01/2006 05.29.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-8");
-$datetest = new Date($date);
-$datetest->addSeconds(-9, true);
-compare("01/01/2006 05.29.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-9");
-$datetest = new Date($date);
-$datetest->addSeconds(-10, true);
-compare("01/01/2006 05.29.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-10");
-$datetest = new Date($date);
-$datetest->addSeconds(-60, true);
-compare("01/01/2006 05.29.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-60");
-$datetest = new Date($date);
-$datetest->addSeconds(-3599, true);
-compare("01/01/2006 04.30.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3599");
-$datetest = new Date($date);
-$datetest->addSeconds(-3600, true);
-compare("01/01/2006 04.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3600");
-$datetest = new Date($date);
-$datetest->addSeconds(-3601, true);
-compare("01/01/2006 04.30.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3601");
-$datetest = new Date($date);
-$datetest->addSeconds(-7199, true);
-compare("01/01/2006 03.30.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7199");
-$datetest = new Date($date);
-$datetest->addSeconds(-7200, true);
-compare("01/01/2006 03.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7200");
-$datetest = new Date($date);
-$datetest->addSeconds(-7201, true);
-compare("01/01/2006 03.30.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7201");
-$datetest = new Date($date);
-$datetest->addSeconds(-86400, true);
-compare("31/12/2005 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-86400");
-$datetest = new Date($date);
-$datetest->addSeconds(-864000, true);
-compare("22/12/2005 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-864000");
-$datetest = new Date($date);
-$datetest->addSeconds(-8640000, true);
-compare("23/09/2005 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-8640000");
-$datetest = new Date($date);
-$datetest->addSeconds(-31622400, true);
-compare("31/12/2004 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-31622400");
-$datetest = new Date($date);
-$datetest->addSeconds(-63244800, true);
-compare("31/12/2003 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-63244800");
-$datetest = new Date($date);
-$datetest->addSeconds(-94867200, true);
-compare("30/12/2002 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-94867200");
-$datetest = new Date($date);
-$datetest->addSeconds(-126489600, true);
-compare("29/12/2001 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-126489600");
-$datetest = new Date($date);
-$datetest->addSeconds(-158112000, true);
-compare("28/12/2000 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-158112000");
-$datetest = new Date($date);
-$datetest->addSeconds(-189734400, true);
-compare("28/12/1999 05.30.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-189734400");
-$datetest = new Date($date);
-$datetest->addSeconds(-221356800, true);
-compare("27/12/1998 05.30.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-221356800"); // 2 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(-252979200, true);
-compare("26/12/1997 05.30.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-252979200");
-$datetest = new Date($date);
-$datetest->addSeconds(-284601600, true);
-compare("25/12/1996 05.30.08.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-284601600"); // leap second in June 1997
-$datetest = new Date($date);
-$datetest->addSeconds(-316224000, true);
-compare("25/12/1995 05.30.09.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-316224000"); // leap second in Dec 1995
-$datetest = new Date($date);
-$datetest->addSeconds(-347846400, true);
-compare("24/12/1994 05.30.09.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-347846400");
-$datetest = new Date($date);
-$datetest->addSeconds(-379468800, true);
-compare("23/12/1993 05.30.10.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-379468800"); // leap second in June 1994
-$datetest = new Date($date);
-$datetest->addSeconds(-411091200, true);
-compare("22/12/1992 05.30.11.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-411091200"); // leap second in June 1993
-$datetest = new Date($date);
-$datetest->addSeconds(-442713600, true);
-compare("22/12/1991 05.30.12.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-442713600"); // leap second in June 1992
-$datetest = new Date($date);
-$datetest->addSeconds(-474336000, true);
-compare("21/12/1990 05.30.13.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-474336000"); // leap second in Dec 1990
-$datetest = new Date($date);
-$datetest->addSeconds(-505958400, true);
-compare("20/12/1989 05.30.14.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-505958400"); // leap second in Dec 1989
-$datetest = new Date($date);
-$datetest->addSeconds(-537580800, true);
-compare("19/12/1988 05.30.14.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-537580800");
-$datetest = new Date($date);
-$datetest->addSeconds(-569203200, true);
-compare("19/12/1987 05.30.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-569203200"); // leap second in Dec 1987
-$datetest = new Date($date);
-$datetest->addSeconds(-600825600, true);
-compare("18/12/1986 05.30.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-600825600");
-$datetest = new Date($date);
-$datetest->addSeconds(-632448000, true);
-compare("17/12/1985 05.30.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-632448000");
-$datetest = new Date($date);
-$datetest->addSeconds(-664070400, true);
-compare("16/12/1984 05.30.16.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-664070400"); // leap second in June 1985
-$datetest = new Date($date);
-$datetest->addSeconds(-695692800, true);
-compare("16/12/1983 05.30.16.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-695692800");
-$datetest = new Date($date);
-$datetest->addSeconds(-727315200, true);
-compare("15/12/1982 05.30.17.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-727315200");
-$datetest = new Date($date);
-$datetest->addSeconds(-758937600, true);
-compare("14/12/1981 05.30.18.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-758937600");
-$datetest = new Date($date);
-$datetest->addSeconds(-790560000, true);
-compare("13/12/1980 05.30.19.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-790560000");
-$datetest = new Date($date);
-$datetest->addSeconds(-822182400, true);
-compare("13/12/1979 05.30.20.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-822182400");
-$datetest = new Date($date);
-$datetest->addSeconds(-853804800, true);
-compare("12/12/1978 05.30.21.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-853804800");
-$datetest = new Date($date);
-$datetest->addSeconds(-885427200, true);
-compare("11/12/1977 05.30.22.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-885427200");
-$datetest = new Date($date);
-$datetest->addSeconds(-917049600, true);
-compare("10/12/1976 05.30.23.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-917049600");
-$datetest = new Date($date);
-$datetest->addSeconds(-948672000, true);
-compare("10/12/1975 05.30.24.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-948672000");
-$datetest = new Date($date);
-$datetest->addSeconds(-980294400, true);
-compare("09/12/1974 05.30.25.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-980294400");
-$datetest = new Date($date);
-$datetest->addSeconds(-1011916800, true);
-compare("08/12/1973 05.30.26.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1011916800");
-$datetest = new Date($date);
-$datetest->addSeconds(-1043539200, true);
-compare("07/12/1972 05.30.27.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1043539200");
-$datetest = new Date($date);
-$datetest->addSeconds(-1075161600, true);
-compare("07/12/1971 05.30.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1075161600"); // 23 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(-1106784000, true);
-compare("06/12/1970 05.30.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1106784000");
-$datetest = new Date($date);
-$datetest->addSeconds(-1138406400, true);
-compare("05/12/1969 05.30.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1138406400");
-$datetest = new Date($date);
-$datetest->addSeconds(-1170028800, true);
-compare("04/12/1968 05.30.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1170028800");
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc::addSeconds() function
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-
-$date = new Date(
- "1972-07-01 01:59:58.987654",
- true
-); // count leap seconds
-$date->setTZbyID("Europe/Paris");
-
-$datetest = new Date($date);
-$datetest->addSeconds(1, true);
-compare("01/07/1972 01.59.59.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1");
-$datetest = new Date($date);
-$datetest->addSeconds(2, true);
-compare("01/07/1972 01.59.60.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "2"); // leap second
-$datetest = new Date($date);
-$datetest->addSeconds(3, true);
-compare("01/07/1972 02.00.00.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3");
-$datetest = new Date($date);
-$datetest->addSeconds(4, true);
-compare("01/07/1972 02.00.01.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "4");
-$datetest = new Date($date);
-$datetest->addSeconds(5, true);
-compare("01/07/1972 02.00.02.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "5");
-$datetest = new Date($date);
-$datetest->addSeconds(6, true);
-compare("01/07/1972 02.00.03.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "6");
-$datetest = new Date($date);
-$datetest->addSeconds(7, true);
-compare("01/07/1972 02.00.04.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7");
-$datetest = new Date($date);
-$datetest->addSeconds(8, true);
-compare("01/07/1972 02.00.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "8");
-$datetest = new Date($date);
-$datetest->addSeconds(9, true);
-compare("01/07/1972 02.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "9");
-$datetest = new Date($date);
-$datetest->addSeconds(10, true);
-compare("01/07/1972 02.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "10");
-$datetest = new Date($date);
-$datetest->addSeconds(60, true);
-compare("01/07/1972 02.00.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "60");
-$datetest = new Date($date);
-$datetest->addSeconds(3599, true);
-compare("01/07/1972 02.59.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3599");
-$datetest = new Date($date);
-$datetest->addSeconds(3600, true);
-compare("01/07/1972 02.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3600");
-$datetest = new Date($date);
-$datetest->addSeconds(3601, true);
-compare("01/07/1972 02.59.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "3601");
-$datetest = new Date($date);
-$datetest->addSeconds(7199, true);
-compare("01/07/1972 03.59.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7199");
-$datetest = new Date($date);
-$datetest->addSeconds(7200, true);
-compare("01/07/1972 03.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7200");
-$datetest = new Date($date);
-$datetest->addSeconds(7201, true);
-compare("01/07/1972 03.59.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "7201");
-$datetest = new Date($date);
-$datetest->addSeconds(86400, true);
-compare("02/07/1972 01.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "86400");
-$datetest = new Date($date);
-$datetest->addSeconds(864000, true);
-compare("11/07/1972 01.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "864000");
-$datetest = new Date($date);
-$datetest->addSeconds(8640000, true);
-compare("09/10/1972 01.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "8640000");
-$datetest = new Date($date);
-$datetest->addSeconds(31622400, true);
-compare("02/07/1973 01.59.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "31622400"); // 2 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(63244800, true);
-compare("03/07/1974 01.59.55.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "63244800"); // 3 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(94867200, true);
-compare("04/07/1975 01.59.54.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "94867200"); // 4 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(126489600, true);
-compare("04/07/1976 01.59.53.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "126489600"); // etc.
-$datetest = new Date($date);
-$datetest->addSeconds(158112000, true);
-compare("05/07/1977 01.59.52.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "158112000");
-$datetest = new Date($date);
-$datetest->addSeconds(189734400, true);
-compare("06/07/1978 01.59.51.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "189734400");
-$datetest = new Date($date);
-$datetest->addSeconds(221356800, true);
-compare("07/07/1979 01.59.50.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "221356800");
-$datetest = new Date($date);
-$datetest->addSeconds(252979200, true);
-compare("07/07/1980 01.59.49.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "252979200");
-$datetest = new Date($date);
-$datetest->addSeconds(284601600, true);
-compare("08/07/1981 01.59.48.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "284601600"); // leap second in June 1981
-$datetest = new Date($date);
-$datetest->addSeconds(316224000, true);
-compare("09/07/1982 01.59.47.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "316224000");
-$datetest = new Date($date);
-$datetest->addSeconds(347846400, true);
-compare("10/07/1983 01.59.46.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "347846400");
-$datetest = new Date($date);
-$datetest->addSeconds(379468800, true);
-compare("10/07/1984 01.59.46.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "379468800"); // no leap second in 1984
-$datetest = new Date($date);
-$datetest->addSeconds(411091200, true);
-compare("11/07/1985 01.59.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "411091200"); // leap second in June 1985
-$datetest = new Date($date);
-$datetest->addSeconds(442713600, true);
-compare("12/07/1986 01.59.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "442713600"); // no leap second in 1986
-$datetest = new Date($date);
-$datetest->addSeconds(474336000, true);
-compare("13/07/1987 01.59.45.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "474336000");
-$datetest = new Date($date);
-$datetest->addSeconds(505958400, true);
-compare("13/07/1988 01.59.44.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "505958400"); // leap second in Dec 1987
-$datetest = new Date($date);
-$datetest->addSeconds(537580800, true);
-compare("14/07/1989 01.59.44.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "537580800");
-$datetest = new Date($date);
-$datetest->addSeconds(569203200, true);
-compare("15/07/1990 01.59.43.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "569203200");
-$datetest = new Date($date);
-$datetest->addSeconds(600825600, true);
-compare("16/07/1991 01.59.42.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "600825600");
-$datetest = new Date($date);
-$datetest->addSeconds(632448000, true);
-compare("16/07/1992 01.59.41.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "632448000");
-$datetest = new Date($date);
-$datetest->addSeconds(664070400, true);
-compare("17/07/1993 01.59.40.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "664070400");
-$datetest = new Date($date);
-$datetest->addSeconds(695692800, true);
-compare("18/07/1994 01.59.39.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "695692800");
-$datetest = new Date($date);
-$datetest->addSeconds(727315200, true);
-compare("19/07/1995 01.59.39.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "727315200");
-$datetest = new Date($date);
-$datetest->addSeconds(758937600, true);
-compare("19/07/1996 01.59.38.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "758937600");
-$datetest = new Date($date);
-$datetest->addSeconds(790560000, true);
-compare("20/07/1997 01.59.37.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "790560000");
-$datetest = new Date($date);
-$datetest->addSeconds(822182400, true);
-compare("21/07/1998 01.59.37.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "822182400");
-$datetest = new Date($date);
-$datetest->addSeconds(853804800, true);
-compare("22/07/1999 01.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "853804800");
-$datetest = new Date($date);
-$datetest->addSeconds(885427200, true);
-compare("22/07/2000 01.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "885427200");
-$datetest = new Date($date);
-$datetest->addSeconds(917049600, true);
-compare("23/07/2001 01.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "917049600");
-$datetest = new Date($date);
-$datetest->addSeconds(948672000, true);
-compare("24/07/2002 01.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "948672000");
-$datetest = new Date($date);
-$datetest->addSeconds(980294400, true);
-compare("25/07/2003 01.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "980294400");
-$datetest = new Date($date);
-$datetest->addSeconds(1011916800, true);
-compare("25/07/2004 01.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1011916800");
-$datetest = new Date($date);
-$datetest->addSeconds(1043539200, true);
-compare("26/07/2005 01.59.36.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1043539200");
-$datetest = new Date($date);
-$datetest->addSeconds(1075161600, true);
-compare("27/07/2006 01.59.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1075161600"); // 23rd leap second in Dec 2005
-$datetest = new Date($date);
-$datetest->addSeconds(1106784000, true);
-compare("28/07/2007 01.59.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1106784000");
-$datetest = new Date($date);
-$datetest->addSeconds(1138406400, true);
-compare("28/07/2008 01.59.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1138406400");
-$datetest = new Date($date);
-$datetest->addSeconds(1170028800, true);
-compare("29/07/2009 01.59.35.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "1170028800");
-
-
-$date->setDate("2006-01-01 01:00:05.987654");
-
-$datetest = new Date($date);
-$datetest->addSeconds(-1, true);
-compare("01/01/2006 01.00.04.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1");
-$datetest = new Date($date);
-$datetest->addSeconds(-2, true);
-compare("01/01/2006 01.00.03.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-2");
-$datetest = new Date($date);
-$datetest->addSeconds(-3, true);
-compare("01/01/2006 01.00.02.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3");
-$datetest = new Date($date);
-$datetest->addSeconds(-4, true);
-compare("01/01/2006 01.00.01.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-4");
-$datetest = new Date($date);
-$datetest->addSeconds(-5, true);
-compare("01/01/2006 01.00.00.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-5");
-$datetest = new Date($date);
-$datetest->addSeconds(-6, true);
-compare("01/01/2006 00.59.60.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-6"); // leap second
-$datetest = new Date($date);
-$datetest->addSeconds(-7, true);
-compare("01/01/2006 00.59.59.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7");
-$datetest = new Date($date);
-$datetest->addSeconds(-8, true);
-compare("01/01/2006 00.59.58.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-8");
-$datetest = new Date($date);
-$datetest->addSeconds(-9, true);
-compare("01/01/2006 00.59.57.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-9");
-$datetest = new Date($date);
-$datetest->addSeconds(-10, true);
-compare("01/01/2006 00.59.56.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-10");
-$datetest = new Date($date);
-$datetest->addSeconds(-60, true);
-compare("01/01/2006 00.59.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-60");
-$datetest = new Date($date);
-$datetest->addSeconds(-3599, true);
-compare("01/01/2006 00.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3599");
-$datetest = new Date($date);
-$datetest->addSeconds(-3600, true);
-compare("01/01/2006 00.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3600");
-$datetest = new Date($date);
-$datetest->addSeconds(-3601, true);
-compare("01/01/2006 00.00.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-3601");
-$datetest = new Date($date);
-$datetest->addSeconds(-7199, true);
-compare("31/12/2005 23.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7199");
-$datetest = new Date($date);
-$datetest->addSeconds(-7200, true);
-compare("31/12/2005 23.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7200");
-$datetest = new Date($date);
-$datetest->addSeconds(-7201, true);
-compare("31/12/2005 23.00.05.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-7201");
-$datetest = new Date($date);
-$datetest->addSeconds(-86400, true);
-compare("31/12/2005 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-86400");
-$datetest = new Date($date);
-$datetest->addSeconds(-864000, true);
-compare("22/12/2005 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-864000");
-$datetest = new Date($date);
-$datetest->addSeconds(-8640000, true);
-compare("23/09/2005 02.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-8640000");
-$datetest = new Date($date);
-$datetest->addSeconds(-31622400, true);
-compare("31/12/2004 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-31622400");
-$datetest = new Date($date);
-$datetest->addSeconds(-63244800, true);
-compare("31/12/2003 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-63244800");
-$datetest = new Date($date);
-$datetest->addSeconds(-94867200, true);
-compare("30/12/2002 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-94867200");
-$datetest = new Date($date);
-$datetest->addSeconds(-126489600, true);
-compare("29/12/2001 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-126489600");
-$datetest = new Date($date);
-$datetest->addSeconds(-158112000, true);
-compare("28/12/2000 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-158112000");
-$datetest = new Date($date);
-$datetest->addSeconds(-189734400, true);
-compare("28/12/1999 01.00.06.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-189734400");
-$datetest = new Date($date);
-$datetest->addSeconds(-221356800, true);
-compare("27/12/1998 01.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-221356800"); // 2 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(-252979200, true);
-compare("26/12/1997 01.00.07.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-252979200");
-$datetest = new Date($date);
-$datetest->addSeconds(-284601600, true);
-compare("25/12/1996 01.00.08.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-284601600"); // leap second in June 1997
-$datetest = new Date($date);
-$datetest->addSeconds(-316224000, true);
-compare("25/12/1995 01.00.09.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-316224000"); // leap second in Dec 1995
-$datetest = new Date($date);
-$datetest->addSeconds(-347846400, true);
-compare("24/12/1994 01.00.09.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-347846400");
-$datetest = new Date($date);
-$datetest->addSeconds(-379468800, true);
-compare("23/12/1993 01.00.10.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-379468800"); // leap second in June 1994
-$datetest = new Date($date);
-$datetest->addSeconds(-411091200, true);
-compare("22/12/1992 01.00.11.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-411091200"); // leap second in June 1993
-$datetest = new Date($date);
-$datetest->addSeconds(-442713600, true);
-compare("22/12/1991 01.00.12.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-442713600"); // leap second in June 1992
-$datetest = new Date($date);
-$datetest->addSeconds(-474336000, true);
-compare("21/12/1990 01.00.13.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-474336000"); // leap second in Dec 1990
-$datetest = new Date($date);
-$datetest->addSeconds(-505958400, true);
-compare("20/12/1989 01.00.14.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-505958400"); // leap second in Dec 1989
-$datetest = new Date($date);
-$datetest->addSeconds(-537580800, true);
-compare("19/12/1988 01.00.14.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-537580800");
-$datetest = new Date($date);
-$datetest->addSeconds(-569203200, true);
-compare("19/12/1987 01.00.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-569203200"); // leap second in Dec 1987
-$datetest = new Date($date);
-$datetest->addSeconds(-600825600, true);
-compare("18/12/1986 01.00.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-600825600");
-$datetest = new Date($date);
-$datetest->addSeconds(-632448000, true);
-compare("17/12/1985 01.00.15.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-632448000");
-$datetest = new Date($date);
-$datetest->addSeconds(-664070400, true);
-compare("16/12/1984 01.00.16.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-664070400"); // leap second in June 1985
-$datetest = new Date($date);
-$datetest->addSeconds(-695692800, true);
-compare("16/12/1983 01.00.16.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-695692800");
-$datetest = new Date($date);
-$datetest->addSeconds(-727315200, true);
-compare("15/12/1982 01.00.17.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-727315200");
-$datetest = new Date($date);
-$datetest->addSeconds(-758937600, true);
-compare("14/12/1981 01.00.18.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-758937600");
-$datetest = new Date($date);
-$datetest->addSeconds(-790560000, true);
-compare("13/12/1980 01.00.19.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-790560000");
-$datetest = new Date($date);
-$datetest->addSeconds(-822182400, true);
-compare("13/12/1979 01.00.20.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-822182400");
-$datetest = new Date($date);
-$datetest->addSeconds(-853804800, true);
-compare("12/12/1978 01.00.21.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-853804800");
-$datetest = new Date($date);
-$datetest->addSeconds(-885427200, true);
-compare("11/12/1977 01.00.22.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-885427200");
-$datetest = new Date($date);
-$datetest->addSeconds(-917049600, true);
-compare("10/12/1976 01.00.23.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-917049600");
-$datetest = new Date($date);
-$datetest->addSeconds(-948672000, true);
-compare("10/12/1975 01.00.24.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-948672000");
-$datetest = new Date($date);
-$datetest->addSeconds(-980294400, true);
-compare("09/12/1974 01.00.25.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-980294400");
-$datetest = new Date($date);
-$datetest->addSeconds(-1011916800, true);
-compare("08/12/1973 01.00.26.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1011916800");
-$datetest = new Date($date);
-$datetest->addSeconds(-1043539200, true);
-compare("07/12/1972 01.00.27.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1043539200");
-$datetest = new Date($date);
-$datetest->addSeconds(-1075161600, true);
-compare("07/12/1971 01.00.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1075161600"); // 23 leap seconds
-$datetest = new Date($date);
-$datetest->addSeconds(-1106784000, true);
-compare("06/12/1970 01.00.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1106784000");
-$datetest = new Date($date);
-$datetest->addSeconds(-1138406400, true);
-compare("05/12/1969 01.00.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1138406400");
-$datetest = new Date($date);
-$datetest->addSeconds(-1170028800, true);
-compare("04/12/1968 01.00.28.98765", $datetest->formatLikeSQL("DD/MM/YYYY HH.MI.SS.FFFFF"), "-1170028800");
+++ /dev/null
-<?php
-require_once "Date/Calc.php";
-
-/**
- * Test dates from 1970 to 2029
- * Data from: http://www.merlyn.demon.co.uk/wknotest.txt
- * [N.B. this link is now broken, although the web-site still exists]
- * Others usefull datas available from:
- * http://www.merlyn.demon.co.uk/#dat
- */
-
-// 'wknotest.txt' is missing and no longer available on the web, and so this
-// test is disabled for this reason (it was copyright anyway).
-//
-$failed_test_data = false;
-// $wkno = file('wknotest.txt');
-// $cnt = sizeof($wkno);
-// for( $i=0;$i<$cnt;$i++ ){
-// $parts = explode(':',$wkno[$i]);
-// $weeksno[$parts[0]] = str_replace("\n",'',$parts[1]);
-// }
-// unset($wkno);
-// foreach($weeksno as $date=>$iso){
-// $year = substr($date,0,4);
-// $month = substr($date,4,2);
-// $day = substr($date,6);
-// $iso9601 = Date_Calc::gregorianToISO($day,$month,$year);
-// if($iso9601!=$iso){
-// $failed_test_data = true;
-// echo $date . '(' . $iso . ') =>' . $year.'-'.$month.'-'.$day .'=>' . $iso9601 . " : failed\n";
-// }
-// }
-
-/**
- * Bugs #19788
- */
-$failed_test_19788 = false;
-$pass1 = array(1998, 2, 1) == Date_Calc::isoWeekDate(5, 1, 1998) ? true : false;
-$pass2 = array(1998, 2, 2) == Date_Calc::isoWeekDate(6, 1, 1998) ? true : false;
-$pass3 = array(2004, 2, 1) == Date_Calc::isoWeekDate(5, 1, 2004) ? true : false;
-$pass4 = array(2004, 2, 2) == Date_Calc::isoWeekDate(6, 1, 2004) ? true : false;
-if (!($pass1 && $pass2 && $pass3 && $pass4)) {
- $failed_test_19788 = true;
-}
-
-if ($failed_test_19788 || $failed_test_data) {
- echo "Bug #19788: failed\n";
-} else {
- echo "Bug #19788: OK\n";
-}
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-//
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2005 Leandro Lucarella |
-// +----------------------------------------------------------------------+
-// | This source file is subject to the New BSD license, That is bundled |
-// | with this package in the file LICENSE, and is available through |
-// | the world-wide-web at |
-// | http://www.opensource.org/licenses/bsd-license.php |
-// | If you did not receive a copy of the new BSDlicense and are unable |
-// | to obtain it through the world-wide-web, please send a note to |
-// | pear-dev@lists.php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Author: Leandro Lucarella <llucax@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id$
-//
-
-
-require_once 'Date.php';
-require_once 'Date/Span.php';
-
-$date = new Date();
-$tmp = new Date($date);
-
-printf("Actual date: %s\n", $date->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('0:00:00:05'));
-printf("Subtracting 5 seconds: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('0:00:20:00'));
-printf("Subtracting 20 minutes: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('0:10:00:00'));
-printf("Subtracting 10 hours: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('3:00:00:00'));
-printf("Subtracting 3 days: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->subtractSpan(new Date_Span('3:10:20:05'));
-printf("Subtracting 3 days, 10 hours, 20 minutes and 5 seconds: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->addSpan(new Date_Span('0:00:00:05'));
-printf("Adding 5 seconds: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->addSpan(new Date_Span('0:00:20:00'));
-printf("Adding 20 minutes: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->addSpan(new Date_Span('0:10:00:00'));
-printf("Adding 10 hours: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->addSpan(new Date_Span('3:00:00:00'));
-printf("Adding 3 days: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
-
-$tmp->copy($date);
-$tmp->addSpan(new Date_Span('3:10:20:05'));
-printf("Adding 3 days, 10 hours, 20 minutes and 5 seconds: %s\n", $tmp->getDate(DATE_FORMAT_ISO));
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date::formatLikeStrftime(), Date::formatLikeSQL(),
- * and Date::formatLikeDate()
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("2007-11-29T23:13:46.09002");
-$date->setTZbyID("Europe/Amsterdam");
-
-compare('Thu', $date->formatLikeStrftime('%a'), '%a');
-compare('Thursday', $date->formatLikeStrftime('%A'), '%A');
-compare('Nov', $date->formatLikeStrftime('%b'), '%b');
-compare('November', $date->formatLikeStrftime('%B'), '%B');
-compare('20', $date->formatLikeStrftime('%C'), '%C');
-compare('29', $date->formatLikeStrftime('%d'), '%d');
-compare('11/29/2007', $date->formatLikeStrftime('%D'), '%D');
-compare('29', $date->formatLikeStrftime('%e'), '%e');
-compare('2454434', $date->formatLikeStrftime('%E'), '%E');
-compare('07', $date->formatLikeStrftime('%g'), '%g');
-compare('2007', $date->formatLikeStrftime('%G'), '%G');
-compare('23', $date->formatLikeStrftime('%h'), '%h');
-compare('23', $date->formatLikeStrftime('%H'), '%H');
-compare('11', $date->formatLikeStrftime('%i'), '%i');
-compare('11', $date->formatLikeStrftime('%I'), '%I');
-compare('333', $date->formatLikeStrftime('%j'), '%j');
-compare('11', $date->formatLikeStrftime('%m'), '%m');
-compare('13', $date->formatLikeStrftime('%M'), '%M');
-compare("\n", $date->formatLikeStrftime('%n'), '%n');
-compare('+01:00', $date->formatLikeStrftime('%o'), '%o');
-compare('+01:00', $date->formatLikeStrftime('%O'), '%O');
-compare('pm', $date->formatLikeStrftime('%p'), '%p');
-compare('PM', $date->formatLikeStrftime('%P'), '%P');
-compare('11:13:46 PM', $date->formatLikeStrftime('%r'), '%r');
-compare('23:13', $date->formatLikeStrftime('%R'), '%R');
-compare('46.090020', $date->formatLikeStrftime('%s'), '%s');
-compare('46', $date->formatLikeStrftime('%S'), '%S');
-compare("\t", $date->formatLikeStrftime('%t'), '%t');
-compare('23:13:46', $date->formatLikeStrftime('%T'), '%T');
-compare('4', $date->formatLikeStrftime('%u'), '%u');
-compare('47', $date->formatLikeStrftime('%U'), '%U');
-compare('48', $date->formatLikeStrftime('%V'), '%V');
-compare('4', $date->formatLikeStrftime('%w'), '%w');
-compare('48', $date->formatLikeStrftime('%W'), '%W');
-compare('07', $date->formatLikeStrftime('%y'), '%y');
-compare('2007', $date->formatLikeStrftime('%Y'), '%Y');
-compare('CET', $date->formatLikeStrftime('%Z'), '%Z');
-compare('%', $date->formatLikeStrftime('%%'), '%%');
-
-// Invalid character:
-//
-compare('x', $date->formatLikeStrftime('x'), 'x');
-
-compare(' �!�$%^&*()_+{}:@~<>?[];\'#,./-=`\\|', $date->formatLikeSQL(' �!�$%^&*()_+{}:@~<>?[];\'#,./-=`\\|'), ' �!�$%^&*()_+{}:@~<>?[];\'#,./-=`\\|');
-
-compare('text " \\', $date->formatLikeSQL('"text \" \\\\"'), '"text \" \\\\"');
-
-compare('AD', $date->formatLikeSQL('AD'), 'AD');
-compare('A.D.', $date->formatLikeSQL('A.D.'), 'A.D.');
-compare('ad', $date->formatLikeSQL('ad'), 'ad');
-compare('a.d.', $date->formatLikeSQL('a.d.'), 'a.d.');
-
-compare('PM', $date->formatLikeSQL('AM'), 'AM');
-compare('P.M.', $date->formatLikeSQL('A.M.'), 'A.M.');
-compare('pm', $date->formatLikeSQL('am'), 'am');
-compare('p.m.', $date->formatLikeSQL('a.m.'), 'a.m.');
-
-compare('AD', $date->formatLikeSQL('BC'), 'BC');
-compare('A.D.', $date->formatLikeSQL('B.C.'), 'B.C.');
-compare('ad', $date->formatLikeSQL('bc'), 'bc');
-compare('a.d.', $date->formatLikeSQL('b.c.'), 'b.c.');
-
-compare('0', $date->formatLikeSQL('C'), 'C');
-compare('20', $date->formatLikeSQL('CC'), 'CC');
-compare('020', $date->formatLikeSQL('CCC'), 'CCC');
-compare('0020', $date->formatLikeSQL('CCCC'), 'CCCC');
-compare(' 0', $date->formatLikeSQL('SC'), 'SC');
-compare(' 20', $date->formatLikeSQL('SCC'), 'SCC');
-compare(' 020', $date->formatLikeSQL('SCCC'), 'SCCC');
-compare(' 0020', $date->formatLikeSQL('SCCCC'), 'SCCCC');
-compare('0', $date->formatLikeSQL('NPC'), 'NPC');
-compare('20', $date->formatLikeSQL('NPCC'), 'NPCC');
-compare('20', $date->formatLikeSQL('NPCCC'), 'NPCCC');
-compare('20', $date->formatLikeSQL('NPCCCC'), 'NPCCCC');
-compare('0', $date->formatLikeSQL('NPSC'), 'NPSC');
-compare('20', $date->formatLikeSQL('NPSCC'), 'NPSCC');
-compare('20', $date->formatLikeSQL('NPSCCC'), 'NPSCCC');
-compare('20', $date->formatLikeSQL('NPSCCCC'), 'NPSCCCC');
-
-compare('CE ', $date->formatLikeSQL('BCE'), 'BCE');
-compare('C.E. ', $date->formatLikeSQL('B.C.E.'), 'B.C.E.');
-compare('ce ', $date->formatLikeSQL('bce'), 'bce');
-compare('c.e. ', $date->formatLikeSQL('b.c.e.'), 'b.c.e.');
-compare('CE', $date->formatLikeSQL('NPBCE'), 'NPBCE');
-compare('C.E.', $date->formatLikeSQL('NPB.C.E.'), 'NPB.C.E.');
-compare('ce', $date->formatLikeSQL('NPbce'), 'NPbce');
-compare('c.e.', $date->formatLikeSQL('NPb.c.e.'), 'NPb.c.e.');
-
-compare('4', $date->formatLikeSQL('D'), 'D');
-compare('4TH', $date->formatLikeSQL('DTH'), 'DTH');
-compare('4th', $date->formatLikeSQL('Dth'), 'Dth');
-compare('FOUR', $date->formatLikeSQL('DSP'), 'DSP');
-compare('FOURTH', $date->formatLikeSQL('DSPTH'), 'DSPTH');
-compare('FOURTH', $date->formatLikeSQL('DTHSP'), 'DTHSP');
-compare('four', $date->formatLikeSQL('Dsp'), 'Dsp');
-compare('fourth', $date->formatLikeSQL('Dspth'), 'Dspth');
-compare('fourth', $date->formatLikeSQL('Dthsp'), 'Dthsp');
-
-compare('THURSDAY ', $date->formatLikeSQL('DAY'), 'DAY');
-compare('Thursday ', $date->formatLikeSQL('Day'), 'Day');
-compare('thursday ', $date->formatLikeSQL('day'), 'day');
-compare('THURSDAY', $date->formatLikeSQL('NPDAY'), 'NPDAY');
-compare('Thursday', $date->formatLikeSQL('NPDay'), 'NPDay');
-compare('thursday', $date->formatLikeSQL('NPday'), 'NPday');
-
-compare('29', $date->formatLikeSQL('DD'), 'DD');
-compare('29TH', $date->formatLikeSQL('DDTH'), 'DDTH');
-compare('29th', $date->formatLikeSQL('DDth'), 'DDth');
-compare('TWENTY-NINE', $date->formatLikeSQL('DDSP'), 'DDSP');
-compare('TWENTY-NINTH', $date->formatLikeSQL('DDSPTH'), 'DDSPTH');
-compare('TWENTY-NINTH', $date->formatLikeSQL('DDTHSP'), 'DDTHSP');
-compare('twenty-nine', $date->formatLikeSQL('DDsp'), 'DDsp');
-compare('twenty-ninth', $date->formatLikeSQL('DDspth'), 'DDspth');
-compare('twenty-ninth', $date->formatLikeSQL('DDthsp'), 'DDthsp');
-
-compare('333', $date->formatLikeSQL('DDD'), 'DDD');
-compare('333RD', $date->formatLikeSQL('DDDTH'), 'DDDTH');
-compare('333rd', $date->formatLikeSQL('DDDth'), 'DDDth');
-compare('THREE HUNDRED THIRTY-THREE', $date->formatLikeSQL('DDDSP'), 'DDDSP');
-compare('THREE HUNDRED THIRTY-THIRD', $date->formatLikeSQL('DDDSPTH'), 'DDDSPTH');
-compare('THREE HUNDRED THIRTY-THIRD', $date->formatLikeSQL('DDDTHSP'), 'DDDTHSP');
-compare('three hundred thirty-three', $date->formatLikeSQL('DDDsp'), 'DDDsp');
-compare('three hundred thirty-third', $date->formatLikeSQL('DDDspth'), 'DDDspth');
-compare('three hundred thirty-third', $date->formatLikeSQL('DDDthsp'), 'DDDthsp');
-
-compare('THU', $date->formatLikeSQL('DY'), 'DY');
-compare('Thu', $date->formatLikeSQL('Dy'), 'Dy');
-compare('thu', $date->formatLikeSQL('dy'), 'dy');
-
-compare('0', $date->formatLikeSQL('F'), 'F');
-compare('09', $date->formatLikeSQL('FF'), 'FF');
-compare('090', $date->formatLikeSQL('FFF'), 'FFF');
-compare('0900', $date->formatLikeSQL('FFFF'), 'FFFF');
-compare('09002', $date->formatLikeSQL('FFFFF'), 'FFFFF');
-compare('090020', $date->formatLikeSQL('FFFFFF'), 'FFFFFF');
-compare('0900200', $date->formatLikeSQL('FFFFFFF'), 'FFFFFFF');
-compare('09002000', $date->formatLikeSQL('FFFFFFFF'), 'FFFFFFFF');
-compare('090020000', $date->formatLikeSQL('FFFFFFFFF'), 'FFFFFFFFF');
-compare('0900200000', $date->formatLikeSQL('FFFFFFFFFF'), 'FFFFFFFFFF');
-compare('0', $date->formatLikeSQL('F1'), 'F1');
-compare('09', $date->formatLikeSQL('F2'), 'F2');
-compare('090', $date->formatLikeSQL('F3'), 'F3');
-compare('0900', $date->formatLikeSQL('F4'), 'F4');
-compare('09002', $date->formatLikeSQL('F5'), 'F5');
-compare('090020', $date->formatLikeSQL('F6'), 'F6');
-compare('0900200', $date->formatLikeSQL('F7'), 'F7');
-compare('09002000', $date->formatLikeSQL('F8'), 'F8');
-compare('090020000', $date->formatLikeSQL('F9'), 'F9');
-compare('0900200000', $date->formatLikeSQL('F10'), 'F10');
-compare('09002000000', $date->formatLikeSQL('F11'), 'F11');
-compare('090020000000', $date->formatLikeSQL('F12'), 'F12');
-compare('0900200000000', $date->formatLikeSQL('F13'), 'F13');
-compare('09002000000000', $date->formatLikeSQL('F14'), 'F14');
-compare('09002' . str_repeat("0", 39), $date->formatLikeSQL('F44'), 'F44');
-
-compare('23', $date->formatLikeSQL('HH'), 'HH');
-compare('11', $date->formatLikeSQL('HH12'), 'HH12');
-compare('23', $date->formatLikeSQL('HH24'), 'HH24');
-
-compare('4', $date->formatLikeSQL('ID'), 'ID');
-
-compare('48', $date->formatLikeSQL('IW'), 'IW');
-
-compare('7', $date->formatLikeSQL('I'), 'I');
-compare('07', $date->formatLikeSQL('IY'), 'IY');
-compare('007', $date->formatLikeSQL('IYY'), 'IYY');
-compare('2007', $date->formatLikeSQL('IYYY'), 'IYYY');
-compare('02007', $date->formatLikeSQL('IYYYY'), 'IYYYY');
-compare('002007', $date->formatLikeSQL('IYYYYY'), 'IYYYYY');
-compare('7', $date->formatLikeSQL('NPSI'), 'NPSI');
-compare('7', $date->formatLikeSQL('NPSIY'), 'NPSIY');
-compare('7', $date->formatLikeSQL('NPSIYY'), 'NPSIYY');
-compare('2007', $date->formatLikeSQL('NPSIYYY'), 'NPSIYYY');
-compare('2007', $date->formatLikeSQL('NPSIYYYY'), 'NPSIYYYY');
-compare('2007', $date->formatLikeSQL('NPSIYYYYY'), 'NPSIYYYYY');
-compare(' 7', $date->formatLikeSQL('SI'), 'SI');
-compare(' 07', $date->formatLikeSQL('SIY'), 'SIY');
-compare(' 007', $date->formatLikeSQL('SIYY'), 'SIYY');
-compare(' 2007', $date->formatLikeSQL('SIYYY'), 'SIYYY');
-compare(' 02007', $date->formatLikeSQL('SIYYYY'), 'SIYYYY');
-compare(' 002007', $date->formatLikeSQL('SIYYYYY'), 'SIYYYYY');
-compare('7', $date->formatLikeSQL('NPIYY'), 'NPIYY');
-compare('2007', $date->formatLikeSQL('NPIYYYYY'), 'NPIYYYYY');
-compare('TWO THOUSAND SEVEN', $date->formatLikeSQL('NPIYYYYYSP'), 'NPIYYYYYSP');
-compare('two thousand seventh', $date->formatLikeSQL('NPIYYYYYTHsp'), 'NPIYYYYYTHsp');
-
-compare('2454434', $date->formatLikeSQL('J'), 'J');
-compare('Two Million Four Hundred Fifty-four Thousand Four Hundred Thirty-four', $date->formatLikeSQL('JSp'), 'JSp');
-compare('Two Million Four Hundred Fifty-four Thousand Four Hundred Thirty-fourth', $date->formatLikeSQL('JSpth'), 'JSpth');
-
-compare('13', $date->formatLikeSQL('MI'), 'MI');
-compare('thirteen', $date->formatLikeSQL('MIsP'), 'MIsP');
-compare('13th', $date->formatLikeSQL('MItH'), 'MItH');
-compare('13TH', $date->formatLikeSQL('MITh'), 'MITh');
-compare('thirteenth', $date->formatLikeSQL('MIsPTH'), 'MIsPTH');
-compare('Thirteenth', $date->formatLikeSQL('MISpth'), 'MISpth');
-compare('THIRTEENTH', $date->formatLikeSQL('MISPth'), 'MISPth');
-
-compare('11', $date->formatLikeSQL('MM'), 'MM');
-compare('11', $date->formatLikeSQL('MM'), 'MM');
-compare('ELEVEN', $date->formatLikeSQL('MMSP'), 'MMSP');
-compare('ELEVENTH', $date->formatLikeSQL('MMSPTH'), 'MMSPTH');
-compare('ELEVENTH', $date->formatLikeSQL('MMTHSP'), 'MMTHSP');
-compare('Eleven', $date->formatLikeSQL('MMSp'), 'MMSp');
-compare('Eleventh', $date->formatLikeSQL('MMSpTH'), 'MMSpTH');
-compare('Eleventh', $date->formatLikeSQL('MMTHSp'), 'MMTHSp');
-compare('eleven', $date->formatLikeSQL('MMsp'), 'MMsp');
-compare('eleventh', $date->formatLikeSQL('MMspTH'), 'MMspTH');
-compare('eleventh', $date->formatLikeSQL('MMTHsp'), 'MMTHsp');
-
-compare('NOV', $date->formatLikeSQL('MON'), 'MON');
-compare('Nov', $date->formatLikeSQL('Mon'), 'Mon');
-compare('nov', $date->formatLikeSQL('mon'), 'mon');
-
-compare('NOVEMBER ', $date->formatLikeSQL('MONTH'), 'MONTH');
-compare('November ', $date->formatLikeSQL('Month'), 'Month');
-compare('november ', $date->formatLikeSQL('month'), 'month');
-compare('NOVEMBER', $date->formatLikeSQL('NPMONTH'), 'NPMONTH');
-compare('November', $date->formatLikeSQL('NPMonth'), 'NPMonth');
-compare('november', $date->formatLikeSQL('NPmonth'), 'NPmonth');
-
-compare('PM', $date->formatLikeSQL('PM'), 'PM');
-compare('P.M.', $date->formatLikeSQL('P.M.'), 'P.M.');
-compare('pm', $date->formatLikeSQL('pm'), 'pm');
-compare('p.m.', $date->formatLikeSQL('p.m.'), 'p.m.');
-
-compare('4', $date->formatLikeSQL('Q'), 'Q');
-compare('FOUR', $date->formatLikeSQL('QSP'), 'QSP');
-compare('fourth', $date->formatLikeSQL('QTHsp'), 'QTHsp');
-
-compare(' xi', $date->formatLikeSQL('rm'), 'rm');
-compare(' XI', $date->formatLikeSQL('RM'), 'RM');
-compare('xi', $date->formatLikeSQL('NPrm'), 'NPrm');
-compare('XI', $date->formatLikeSQL('NPRM'), 'NPRM');
-
-compare('46', $date->formatLikeSQL('SS'), 'SS');
-
-compare('83626', $date->formatLikeSQL('SSSSS'), 'SSSSS');
-
-compare('CET', $date->formatLikeSQL('TZC'), 'TZC');
-compare('01', $date->formatLikeSQL('TZH'), 'TZH');
-compare('+01', $date->formatLikeSQL('STZH'), 'STZH');
-compare('1', $date->formatLikeSQL('NPTZH'), 'NPTZH');
-compare('+1', $date->formatLikeSQL('NPSTZH'), 'NPSTZH');
-compare('+One', $date->formatLikeSQL('NPSTZHSp'), 'NPSTZHSp');
-compare('+First', $date->formatLikeSQL('NPSTZHSpth'), 'NPSTZHSpth');
-compare('0', $date->formatLikeSQL('TZI'), 'TZI');
-compare('00', $date->formatLikeSQL('TZM'), 'TZM');
-compare('0', $date->formatLikeSQL('NPTZM'), 'NPTZM');
-compare('Central European Time', $date->formatLikeSQL('TZN'), 'TZN');
-compare('+01:00', $date->formatLikeSQL('TZO'), 'TZO');
-compare('+01:00', $date->formatLikeSQL('NPTZO'), 'NPTZO');
-compare('03600', $date->formatLikeSQL('TZS'), 'TZS');
-compare(' 03600', $date->formatLikeSQL('STZS'), 'STZS');
-compare('3600', $date->formatLikeSQL('NPTZS'), 'NPTZS');
-compare('3600', $date->formatLikeSQL('NPSTZS'), 'NPSTZS');
-compare('THREE THOUSAND SIX HUNDRED', $date->formatLikeSQL('TZSSP'), 'TZSSP');
-compare('THREE THOUSAND SIX HUNDRED', $date->formatLikeSQL('NPSTZSSP'), 'NPSTZSSP');
-compare('Europe/Amsterdam', $date->formatLikeSQL('TZR'), 'TZR');
-
-$date2 = new Date($date);
-$date2->setTZbyID("America/Chicago");
-
-compare('CST', $date2->formatLikeSQL('TZC'), 'TZC (2)');
-compare('06', $date2->formatLikeSQL('TZH'), 'TZH (2)');
-compare('-06', $date2->formatLikeSQL('STZH'), 'STZH (2)');
-compare('6', $date2->formatLikeSQL('NPTZH'), 'NPTZH (2)');
-compare('-6', $date2->formatLikeSQL('NPSTZH'), 'NPSTZH (2)');
-compare('-six', $date2->formatLikeSQL('NPSTZHsp'), 'NPSTZHsp (2)');
-compare('-sixth', $date2->formatLikeSQL('NPSTZHspth'), 'NPSTZHspth (2)');
-compare('0', $date2->formatLikeSQL('TZI'), 'TZI (2)');
-compare('00', $date2->formatLikeSQL('TZM'), 'TZM (2)');
-compare('0', $date2->formatLikeSQL('NPTZM'), 'NPTZM (2)');
-compare('Central Standard Time', $date2->formatLikeSQL('TZN'), 'TZN (2)');
-compare('-06:00', $date2->formatLikeSQL('TZO'), 'TZO (2)');
-compare('-06:00', $date2->formatLikeSQL('NPTZO'), 'NPTZO (2)');
-compare('21600', $date2->formatLikeSQL('TZS'), 'TZS (2)');
-compare('-21600', $date2->formatLikeSQL('STZS'), 'STZS (2)');
-compare('21600', $date2->formatLikeSQL('NPTZS'), 'NPTZS (2)');
-compare('-21600', $date2->formatLikeSQL('NPSTZS'), 'NPSTZS (2)');
-compare('TWENTY-ONE THOUSAND SIX HUNDRED', $date2->formatLikeSQL('TZSSP'), 'TZSSP (2)');
-compare('MINUS TWENTY-ONE THOUSAND SIX HUNDRED', $date2->formatLikeSQL('NPSTZSSP'), 'NPSTZSSP (2)');
-compare('America/Chicago', $date2->formatLikeSQL('TZR'), 'TZR (2)');
-
-$date3 = new Date($date);
-$date3->setTZbyID("UTC");
-
-compare('UTC', $date3->formatLikeSQL('TZC'), 'TZC (formatLikeDate)');
-compare('00', $date3->formatLikeSQL('TZH'), 'TZH (formatLikeDate)');
-compare('+00', $date3->formatLikeSQL('STZH'), 'STZH (formatLikeDate)');
-compare('0', $date3->formatLikeSQL('NPTZH'), 'NPTZH (formatLikeDate)');
-compare('+0', $date3->formatLikeSQL('NPSTZH'), 'NPSTZH (formatLikeDate)');
-compare('ZERO', $date3->formatLikeSQL('NPTZHSP'), 'NPTZHSP (formatLikeDate)');
-compare('+ZEROTH', $date3->formatLikeSQL('NPSTZHSPTH'), 'NPSTZHSPTH (formatLikeDate)');
-compare('0', $date3->formatLikeSQL('TZI'), 'TZI (formatLikeDate)');
-compare('00', $date3->formatLikeSQL('TZM'), 'TZM (formatLikeDate)');
-compare('0', $date3->formatLikeSQL('NPTZM'), 'NPTZM (formatLikeDate)');
-compare('Coordinated Universal Time', $date3->formatLikeSQL('TZN'), 'TZN (formatLikeDate)');
-compare('00000', $date3->formatLikeSQL('TZS'), 'TZS (formatLikeDate)');
-compare(' 00000', $date3->formatLikeSQL('STZS'), 'STZS (formatLikeDate)');
-compare('0', $date3->formatLikeSQL('NPTZS'), 'NPTZS (formatLikeDate)');
-compare('0', $date3->formatLikeSQL('NPSTZS'), 'NPSTZS (formatLikeDate)');
-compare('zero', $date3->formatLikeSQL('TZSsp'), 'NPSTZSsp (formatLikeDate)');
-compare('Zero', $date3->formatLikeSQL('NPSTZSSp'), 'NPSTZSSp (formatLikeDate)');
-compare('Z ', $date3->formatLikeSQL('TZO'), 'TZO (formatLikeDate)');
-compare('Z', $date3->formatLikeSQL('NPTZO'), 'NPTZO (formatLikeDate)');
-compare('UTC', $date3->formatLikeSQL('TZR'), 'TZR (formatLikeDate)');
-
-compare('1196374426', $date->formatLikeSQL('U'), 'U');
-
-compare('5', $date->formatLikeSQL('W'), 'W');
-compare('5', $date->formatLikeSQL('W'), 'W');
-
-// N.B. For 2007 all the week numbers match because the
-// year starts on a Monday:
-//
-compare('48', $date->formatLikeSQL('W1'), 'W1');
-compare('48', $date->formatLikeSQL('NPW1'), 'W1');
-
-compare('48', $date->formatLikeSQL('W4'), 'W4');
-compare('48', $date->formatLikeSQL('NPW4'), 'W4');
-
-compare('48', $date->formatLikeSQL('W7'), 'W7');
-compare('48', $date->formatLikeSQL('NPW7'), 'W7');
-
-compare('48', $date->formatLikeSQL('WW'), 'WW');
-compare('48', $date->formatLikeSQL('NPWW'), 'WW');
-
-compare('TWO THOUSAND SEVEN', $date->formatLikeSQL('YEAR'), 'YEAR');
-compare('Two Thousand Seven', $date->formatLikeSQL('Year'), 'Year');
-compare('two thousand seven', $date->formatLikeSQL('year'), 'year');
-compare('TWO THOUSAND SEVEN', $date->formatLikeSQL('NPSYEAR'), 'NPSYEAR');
-compare('TWO THOUSAND SEVEN', $date->formatLikeSQL('NPSYEAR'), 'NPSYEAR');
-
-compare('7', $date->formatLikeSQL('Y'), 'Y');
-compare('07', $date->formatLikeSQL('YY'), 'YY');
-compare('007', $date->formatLikeSQL('YYY'), 'YYY');
-compare('2007', $date->formatLikeSQL('YYYY'), 'YYYY');
-compare('02007', $date->formatLikeSQL('YYYYY'), 'YYYYY');
-compare('002007', $date->formatLikeSQL('YYYYYY'), 'YYYYYY');
-compare(' 7', $date->formatLikeSQL('SY'), 'SY');
-compare(' 07', $date->formatLikeSQL('SYY'), 'SYY');
-compare(' 007', $date->formatLikeSQL('SYYY'), 'SYYY');
-compare(' 2007', $date->formatLikeSQL('SYYYY'), 'SYYYY');
-compare(' 02007', $date->formatLikeSQL('SYYYYY'), 'SYYYYY');
-compare(' 002007', $date->formatLikeSQL('SYYYYYY'), 'SYYYYYY');
-compare('7', $date->formatLikeSQL('NPSY'), 'NPSY');
-compare('7', $date->formatLikeSQL('NPSYY'), 'NPSYY');
-compare('7', $date->formatLikeSQL('NPSYYY'), 'NPSYYY');
-compare('2007', $date->formatLikeSQL('NPSYYYY'), 'NPSYYYY');
-compare('2007', $date->formatLikeSQL('NPSYYYYY'), 'NPSYYYYY');
-compare('2007', $date->formatLikeSQL('NPSYYYYYY'), 'NPSYYYYYY');
-compare('TWO THOUSAND SEVEN', $date->formatLikeSQL('NPSYYYYYYSP'), 'NPSYYYYYYSP');
-compare('Two Thousand Seven', $date->formatLikeSQL('NPSYYYYYYSp'), 'NPSYYYYYYSp');
-compare('two thousand seven', $date->formatLikeSQL('NPSYYYYYYsp'), 'NPSYYYYYYsp');
-compare('TWO THOUSAND SEVENTH', $date->formatLikeSQL('NPSYYYYYYSPth'), 'NPSYYYYYYSPth');
-compare('Two Thousand Seventh', $date->formatLikeSQL('NPSYYYYYYSpth'), 'NPSYYYYYYSpth');
-compare('two thousand seventh', $date->formatLikeSQL('NPSYYYYYYthsp'), 'NPSYYYYYYthsp');
-compare('2007th', $date->formatLikeSQL('NPSYYYYYYth'), 'NPSYYYYYYth');
-compare('2007TH', $date->formatLikeSQL('NPSYYYYYYTH'), 'NPSYYYYYYTH');
-
-compare('7', $date->formatLikeSQL('Y'), 'Y');
-compare('07', $date->formatLikeSQL('YY'), 'YY');
-compare('007', $date->formatLikeSQL('YYY'), 'YYY');
-compare('2,007', $date->formatLikeSQL('Y,YYY'), 'Y,YYY');
-compare('02.007', $date->formatLikeSQL('YY.YYY'), 'YY.YYY');
-compare('002�007', $date->formatLikeSQL('YYY�YYY'), 'YYY�YYY');
-compare(' 7', $date->formatLikeSQL('SY'), 'SY');
-compare(' 07', $date->formatLikeSQL('SYY'), 'SYY');
-compare(' 007', $date->formatLikeSQL('SYYY'), 'SYYY');
-compare(' 2\'007', $date->formatLikeSQL('SY\'YYY'), 'SY\'YYY');
-compare(' 02 007', $date->formatLikeSQL('SYY YYY'), 'SYY YYY');
-
-// The semi-colon (':') is an invalid separator:
-//
-compare(' 007:007', $date->formatLikeSQL('SYYY:YYY'), 'SYYY:YYY');
-compare('2,007', $date->formatLikeSQL('NPSYYY,YYY,YYY'), 'NPSYYY,YYY,YYY');
-
-compare('29', $date->formatLikeDate('d'), 'd (formatLikeDate)');
-compare('Thu', $date->formatLikeDate('D'), 'D (formatLikeDate)');
-compare('29', $date->formatLikeDate('j'), 'j (formatLikeDate)');
-compare('Thursday', $date->formatLikeDate('l'), 'l (formatLikeDate)');
-compare('4', $date->formatLikeDate('N'), 'N (formatLikeDate)');
-compare('29th', $date->formatLikeDate('dS'), 'dS (formatLikeDate)');
-compare('4', $date->formatLikeDate('w'), 'w (formatLikeDate)');
-compare('332', $date->formatLikeDate('z'), 'z (formatLikeDate)');
-compare('48', $date->formatLikeDate('W'), 'W (formatLikeDate)');
-compare('November', $date->formatLikeDate('F'), 'F (formatLikeDate)');
-compare('11', $date->formatLikeDate('m'), 'm (formatLikeDate)');
-compare('Nov', $date->formatLikeDate('M'), 'M (formatLikeDate)');
-compare('11', $date->formatLikeDate('n'), 'n (formatLikeDate)');
-compare('30', $date->formatLikeDate('t'), 't (formatLikeDate)');
-compare('0', $date->formatLikeDate('L'), 'L (formatLikeDate)');
-compare('2007', $date->formatLikeDate('o'), 'o (formatLikeDate)');
-compare('2007', $date->formatLikeDate('Y'), 'Y (formatLikeDate)');
-compare('07', $date->formatLikeDate('y'), 'y (formatLikeDate)');
-compare("pm", $date->formatLikeDate('a'), 'a (formatLikeDate)');
-compare('PM', $date->formatLikeDate('A'), 'A (formatLikeDate)');
-compare('11', $date->formatLikeDate('g'), 'g (formatLikeDate)');
-compare('23', $date->formatLikeDate('G'), 'G (formatLikeDate)');
-compare('11', $date->formatLikeDate('h'), 'h (formatLikeDate)');
-compare('23', $date->formatLikeDate('H'), 'H (formatLikeDate)');
-compare('13', $date->formatLikeDate('i'), 'i (formatLikeDate)');
-compare('46', $date->formatLikeDate('s'), 's (formatLikeDate)');
-compare('46090', $date->formatLikeDate('u'), 'u (formatLikeDate)');
-compare("Europe/Amsterdam", $date->formatLikeDate('e'), 'e (formatLikeDate)');
-compare('0', $date->formatLikeDate('I'), 'I (formatLikeDate)');
-compare('+0100', $date->formatLikeDate('O'), 'O (formatLikeDate)');
-compare('+01:00', $date->formatLikeDate('P'), 'P (formatLikeDate)');
-compare('CET', $date->formatLikeDate('T'), 'T (formatLikeDate)');
-compare('03600', $date->formatLikeDate('Z'), 'Z (formatLikeDate)');
-compare('2007-11-29T23:13:46+01:00', $date->formatLikeDate('c'), 'c (formatLikeDate)');
-compare('Thu, 29 Nov 2007 23:13:46 +0100', $date->formatLikeDate('r'), 'r (formatLikeDate)');
-compare('1196374426', $date->formatLikeDate('U'), 'U (formatLikeDate)');
-compare('text\\', $date->formatLikeDate('\t\e\x\t\\\\'), '\\t\\e\\x\\t\\\\ (formatLikeDate)');
-compare('"', $date->formatLikeDate('"'), '" (formatLikeDate)');
-compare(' ', $date->formatLikeDate(' '), 'blank space (formatLikeDate)');
-
-compare('2007-11-29T23:13:46+01:00', $date->formatLikeDate(DATE_ATOM), 'DATE_ATOM [' . DATE_ATOM . '] (formatLikeDate)');
-compare('Thursday, 29-Nov-07 23:13:46 CET', $date->formatLikeDate(DATE_COOKIE), 'DATE_COOKIE [' . DATE_COOKIE . '] (formatLikeDate)');
-compare('2007-11-29T23:13:46+0100', $date->formatLikeDate(DATE_ISO8601), 'DATE_ISO8601 [' . DATE_ISO8601 . '] (formatLikeDate)');
-compare('Thu, 29 Nov 07 23:13:46 +0100', $date->formatLikeDate(DATE_RFC822), 'DATE_RFC822 [' . DATE_RFC822 . '] (formatLikeDate)');
-compare('Thursday, 29-Nov-07 23:13:46 CET', $date->formatLikeDate(DATE_RFC850), 'DATE_RFC850 [' . DATE_RFC850 . '] (formatLikeDate)');
-compare('Thu, 29 Nov 07 23:13:46 +0100', $date->formatLikeDate(DATE_RFC1036), 'DATE_RFC1036 [' . DATE_RFC1036 . '] (formatLikeDate)');
-compare('Thu, 29 Nov 2007 23:13:46 +0100', $date->formatLikeDate(DATE_RFC1123), 'DATE_RFC1123 [' . DATE_RFC1123 . '] (formatLikeDate)');
-compare('Thu, 29 Nov 2007 23:13:46 +0100', $date->formatLikeDate(DATE_RFC2822), 'DATE_RFC2822 [' . DATE_RFC2822 . '] (formatLikeDate)');
-compare('2007-11-29T23:13:46+01:00', $date->formatLikeDate(DATE_RFC3339), 'DATE_RFC3339 [' . DATE_RFC3339 . '] (formatLikeDate)');
-compare('Thu, 29 Nov 2007 23:13:46 +0100', $date->formatLikeDate(DATE_RSS), 'DATE_RSS [' . DATE_RSS . '] (formatLikeDate)');
-compare('2007-11-29T23:13:46+01:00', $date->formatLikeDate(DATE_W3C), 'DATE_W3C [' . DATE_W3C . '] (formatLikeDate)');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests Date_Calc::julianDay()
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-
-compare('-4713 11 24', Date_Calc::DaysToDate(0, "%Y %m %d"), '0000 (top)');
-compare(0, Date_Calc::DateToDays(24, 11, -4713), '-4713 11 24 (top)');
-compare('-0001 12 31', Date_Calc::DaysToDate(1721059, "%Y %m %d"), '1721059 (top)');
-compare(1721059, Date_Calc::DateToDays(31, 12, -1), '-0001 12 31 (top)');
-compare('0000 01 01', Date_Calc::DaysToDate(1721060, "%Y %m %d"), '1721060 (top)');
-compare(1721060, Date_Calc::DateToDays(1, 1, 0), '0000 01 01 (top)');
-compare('0000 01 02', Date_Calc::DaysToDate(1721061, "%Y %m %d"), '1721061 (top)');
-compare(1721061, Date_Calc::DateToDays(2, 1, 0), '0000 01 02 (top)');
-compare('1858 11 16', Date_Calc::DaysToDate(2400000, "%Y %m %d"), '2400000 (top)');
-compare(2400000, Date_Calc::DateToDays(16, 11, 1858), '1858 11 16 (top)');
-compare('2132 08 31', Date_Calc::DaysToDate(2500000, "%Y %m %d"), '2500000 (top)');
-compare(2500000, Date_Calc::DateToDays(31, 8, 2132), '2132 08 31 (top)');
-
-compare('-4714 11 24', $hs_date = Date_Calc::DaysToDate(-365, "%Y %m %d"), '-365');
-compare(-365, Date_Calc::DateToDays(24, 11, -4714), '-4714 11 24');
-compare('-4714 11 25', $hs_date = Date_Calc::DaysToDate(-364, "%Y %m %d"), '-364');
-compare(-364, Date_Calc::DateToDays(25, 11, -4714), '-4714 11 25');
-compare('-4714 11 26', $hs_date = Date_Calc::DaysToDate(-363, "%Y %m %d"), '-363');
-compare(-363, Date_Calc::DateToDays(26, 11, -4714), '-4714 11 26');
-compare('-4714 11 27', $hs_date = Date_Calc::DaysToDate(-362, "%Y %m %d"), '-362');
-compare(-362, Date_Calc::DateToDays(27, 11, -4714), '-4714 11 27');
-compare('-4714 11 28', $hs_date = Date_Calc::DaysToDate(-361, "%Y %m %d"), '-361');
-compare(-361, Date_Calc::DateToDays(28, 11, -4714), '-4714 11 28');
-compare('-4714 11 29', $hs_date = Date_Calc::DaysToDate(-360, "%Y %m %d"), '-360');
-compare(-360, Date_Calc::DateToDays(29, 11, -4714), '-4714 11 29');
-compare('-4714 11 30', $hs_date = Date_Calc::DaysToDate(-359, "%Y %m %d"), '-359');
-compare(-359, Date_Calc::DateToDays(30, 11, -4714), '-4714 11 30');
-compare('-4714 12 01', $hs_date = Date_Calc::DaysToDate(-358, "%Y %m %d"), '-358');
-compare(-358, Date_Calc::DateToDays(1, 12, -4714), '-4714 12 01');
-compare('-4714 12 02', $hs_date = Date_Calc::DaysToDate(-357, "%Y %m %d"), '-357');
-compare(-357, Date_Calc::DateToDays(2, 12, -4714), '-4714 12 02');
-compare('-4714 12 03', $hs_date = Date_Calc::DaysToDate(-356, "%Y %m %d"), '-356');
-compare(-356, Date_Calc::DateToDays(3, 12, -4714), '-4714 12 03');
-compare('-4714 12 04', $hs_date = Date_Calc::DaysToDate(-355, "%Y %m %d"), '-355');
-compare(-355, Date_Calc::DateToDays(4, 12, -4714), '-4714 12 04');
-compare('-4714 12 05', $hs_date = Date_Calc::DaysToDate(-354, "%Y %m %d"), '-354');
-compare(-354, Date_Calc::DateToDays(5, 12, -4714), '-4714 12 05');
-compare('-4714 12 06', $hs_date = Date_Calc::DaysToDate(-353, "%Y %m %d"), '-353');
-compare(-353, Date_Calc::DateToDays(6, 12, -4714), '-4714 12 06');
-compare('-4714 12 07', $hs_date = Date_Calc::DaysToDate(-352, "%Y %m %d"), '-352');
-compare(-352, Date_Calc::DateToDays(7, 12, -4714), '-4714 12 07');
-compare('-4714 12 08', $hs_date = Date_Calc::DaysToDate(-351, "%Y %m %d"), '-351');
-compare(-351, Date_Calc::DateToDays(8, 12, -4714), '-4714 12 08');
-compare('-4714 12 09', $hs_date = Date_Calc::DaysToDate(-350, "%Y %m %d"), '-350');
-compare(-350, Date_Calc::DateToDays(9, 12, -4714), '-4714 12 09');
-compare('-4714 12 10', $hs_date = Date_Calc::DaysToDate(-349, "%Y %m %d"), '-349');
-compare(-349, Date_Calc::DateToDays(10, 12, -4714), '-4714 12 10');
-compare('-4714 12 11', $hs_date = Date_Calc::DaysToDate(-348, "%Y %m %d"), '-348');
-compare(-348, Date_Calc::DateToDays(11, 12, -4714), '-4714 12 11');
-compare('-4714 12 12', $hs_date = Date_Calc::DaysToDate(-347, "%Y %m %d"), '-347');
-compare(-347, Date_Calc::DateToDays(12, 12, -4714), '-4714 12 12');
-compare('-4714 12 13', $hs_date = Date_Calc::DaysToDate(-346, "%Y %m %d"), '-346');
-compare(-346, Date_Calc::DateToDays(13, 12, -4714), '-4714 12 13');
-compare('-4714 12 14', $hs_date = Date_Calc::DaysToDate(-345, "%Y %m %d"), '-345');
-compare(-345, Date_Calc::DateToDays(14, 12, -4714), '-4714 12 14');
-compare('-4714 12 15', $hs_date = Date_Calc::DaysToDate(-344, "%Y %m %d"), '-344');
-compare(-344, Date_Calc::DateToDays(15, 12, -4714), '-4714 12 15');
-compare('-4714 12 16', $hs_date = Date_Calc::DaysToDate(-343, "%Y %m %d"), '-343');
-compare(-343, Date_Calc::DateToDays(16, 12, -4714), '-4714 12 16');
-compare('-4714 12 17', $hs_date = Date_Calc::DaysToDate(-342, "%Y %m %d"), '-342');
-compare(-342, Date_Calc::DateToDays(17, 12, -4714), '-4714 12 17');
-compare('-4714 12 18', $hs_date = Date_Calc::DaysToDate(-341, "%Y %m %d"), '-341');
-compare(-341, Date_Calc::DateToDays(18, 12, -4714), '-4714 12 18');
-compare('-4714 12 19', $hs_date = Date_Calc::DaysToDate(-340, "%Y %m %d"), '-340');
-compare(-340, Date_Calc::DateToDays(19, 12, -4714), '-4714 12 19');
-compare('-4714 12 20', $hs_date = Date_Calc::DaysToDate(-339, "%Y %m %d"), '-339');
-compare(-339, Date_Calc::DateToDays(20, 12, -4714), '-4714 12 20');
-compare('-4714 12 21', $hs_date = Date_Calc::DaysToDate(-338, "%Y %m %d"), '-338');
-compare(-338, Date_Calc::DateToDays(21, 12, -4714), '-4714 12 21');
-compare('-4714 12 22', $hs_date = Date_Calc::DaysToDate(-337, "%Y %m %d"), '-337');
-compare(-337, Date_Calc::DateToDays(22, 12, -4714), '-4714 12 22');
-compare('-4714 12 23', $hs_date = Date_Calc::DaysToDate(-336, "%Y %m %d"), '-336');
-compare(-336, Date_Calc::DateToDays(23, 12, -4714), '-4714 12 23');
-compare('-4714 12 24', $hs_date = Date_Calc::DaysToDate(-335, "%Y %m %d"), '-335');
-compare(-335, Date_Calc::DateToDays(24, 12, -4714), '-4714 12 24');
-compare('-4714 12 25', $hs_date = Date_Calc::DaysToDate(-334, "%Y %m %d"), '-334');
-compare(-334, Date_Calc::DateToDays(25, 12, -4714), '-4714 12 25');
-compare('-4714 12 26', $hs_date = Date_Calc::DaysToDate(-333, "%Y %m %d"), '-333');
-compare(-333, Date_Calc::DateToDays(26, 12, -4714), '-4714 12 26');
-compare('-4714 12 27', $hs_date = Date_Calc::DaysToDate(-332, "%Y %m %d"), '-332');
-compare(-332, Date_Calc::DateToDays(27, 12, -4714), '-4714 12 27');
-compare('-4714 12 28', $hs_date = Date_Calc::DaysToDate(-331, "%Y %m %d"), '-331');
-compare(-331, Date_Calc::DateToDays(28, 12, -4714), '-4714 12 28');
-compare('-4714 12 29', $hs_date = Date_Calc::DaysToDate(-330, "%Y %m %d"), '-330');
-compare(-330, Date_Calc::DateToDays(29, 12, -4714), '-4714 12 29');
-compare('-4714 12 30', $hs_date = Date_Calc::DaysToDate(-329, "%Y %m %d"), '-329');
-compare(-329, Date_Calc::DateToDays(30, 12, -4714), '-4714 12 30');
-compare('-4714 12 31', $hs_date = Date_Calc::DaysToDate(-328, "%Y %m %d"), '-328');
-compare(-328, Date_Calc::DateToDays(31, 12, -4714), '-4714 12 31');
-compare('-4713 01 01', $hs_date = Date_Calc::DaysToDate(-327, "%Y %m %d"), '-327');
-compare(-327, Date_Calc::DateToDays(1, 1, -4713), '-4713 01 01');
-compare('-4713 01 02', $hs_date = Date_Calc::DaysToDate(-326, "%Y %m %d"), '-326');
-compare(-326, Date_Calc::DateToDays(2, 1, -4713), '-4713 01 02');
-compare('-4713 01 03', $hs_date = Date_Calc::DaysToDate(-325, "%Y %m %d"), '-325');
-compare(-325, Date_Calc::DateToDays(3, 1, -4713), '-4713 01 03');
-compare('-4713 01 04', $hs_date = Date_Calc::DaysToDate(-324, "%Y %m %d"), '-324');
-compare(-324, Date_Calc::DateToDays(4, 1, -4713), '-4713 01 04');
-compare('-4713 01 05', $hs_date = Date_Calc::DaysToDate(-323, "%Y %m %d"), '-323');
-compare(-323, Date_Calc::DateToDays(5, 1, -4713), '-4713 01 05');
-compare('-4713 01 06', $hs_date = Date_Calc::DaysToDate(-322, "%Y %m %d"), '-322');
-compare(-322, Date_Calc::DateToDays(6, 1, -4713), '-4713 01 06');
-compare('-4713 01 07', $hs_date = Date_Calc::DaysToDate(-321, "%Y %m %d"), '-321');
-compare(-321, Date_Calc::DateToDays(7, 1, -4713), '-4713 01 07');
-compare('-4713 01 08', $hs_date = Date_Calc::DaysToDate(-320, "%Y %m %d"), '-320');
-compare(-320, Date_Calc::DateToDays(8, 1, -4713), '-4713 01 08');
-compare('-4713 01 09', $hs_date = Date_Calc::DaysToDate(-319, "%Y %m %d"), '-319');
-compare(-319, Date_Calc::DateToDays(9, 1, -4713), '-4713 01 09');
-compare('-4713 01 10', $hs_date = Date_Calc::DaysToDate(-318, "%Y %m %d"), '-318');
-compare(-318, Date_Calc::DateToDays(10, 1, -4713), '-4713 01 10');
-compare('-4713 01 11', $hs_date = Date_Calc::DaysToDate(-317, "%Y %m %d"), '-317');
-compare(-317, Date_Calc::DateToDays(11, 1, -4713), '-4713 01 11');
-compare('-4713 01 12', $hs_date = Date_Calc::DaysToDate(-316, "%Y %m %d"), '-316');
-compare(-316, Date_Calc::DateToDays(12, 1, -4713), '-4713 01 12');
-compare('-4713 01 13', $hs_date = Date_Calc::DaysToDate(-315, "%Y %m %d"), '-315');
-compare(-315, Date_Calc::DateToDays(13, 1, -4713), '-4713 01 13');
-compare('-4713 01 14', $hs_date = Date_Calc::DaysToDate(-314, "%Y %m %d"), '-314');
-compare(-314, Date_Calc::DateToDays(14, 1, -4713), '-4713 01 14');
-compare('-4713 01 15', $hs_date = Date_Calc::DaysToDate(-313, "%Y %m %d"), '-313');
-compare(-313, Date_Calc::DateToDays(15, 1, -4713), '-4713 01 15');
-compare('-4713 01 16', $hs_date = Date_Calc::DaysToDate(-312, "%Y %m %d"), '-312');
-compare(-312, Date_Calc::DateToDays(16, 1, -4713), '-4713 01 16');
-compare('-4713 01 17', $hs_date = Date_Calc::DaysToDate(-311, "%Y %m %d"), '-311');
-compare(-311, Date_Calc::DateToDays(17, 1, -4713), '-4713 01 17');
-compare('-4713 01 18', $hs_date = Date_Calc::DaysToDate(-310, "%Y %m %d"), '-310');
-compare(-310, Date_Calc::DateToDays(18, 1, -4713), '-4713 01 18');
-compare('-4713 01 19', $hs_date = Date_Calc::DaysToDate(-309, "%Y %m %d"), '-309');
-compare(-309, Date_Calc::DateToDays(19, 1, -4713), '-4713 01 19');
-compare('-4713 01 20', $hs_date = Date_Calc::DaysToDate(-308, "%Y %m %d"), '-308');
-compare(-308, Date_Calc::DateToDays(20, 1, -4713), '-4713 01 20');
-compare('-4713 01 21', $hs_date = Date_Calc::DaysToDate(-307, "%Y %m %d"), '-307');
-compare(-307, Date_Calc::DateToDays(21, 1, -4713), '-4713 01 21');
-compare('-4713 01 22', $hs_date = Date_Calc::DaysToDate(-306, "%Y %m %d"), '-306');
-compare(-306, Date_Calc::DateToDays(22, 1, -4713), '-4713 01 22');
-compare('-4713 01 23', $hs_date = Date_Calc::DaysToDate(-305, "%Y %m %d"), '-305');
-compare(-305, Date_Calc::DateToDays(23, 1, -4713), '-4713 01 23');
-compare('-4713 01 24', $hs_date = Date_Calc::DaysToDate(-304, "%Y %m %d"), '-304');
-compare(-304, Date_Calc::DateToDays(24, 1, -4713), '-4713 01 24');
-compare('-4713 01 25', $hs_date = Date_Calc::DaysToDate(-303, "%Y %m %d"), '-303');
-compare(-303, Date_Calc::DateToDays(25, 1, -4713), '-4713 01 25');
-compare('-4713 01 26', $hs_date = Date_Calc::DaysToDate(-302, "%Y %m %d"), '-302');
-compare(-302, Date_Calc::DateToDays(26, 1, -4713), '-4713 01 26');
-compare('-4713 01 27', $hs_date = Date_Calc::DaysToDate(-301, "%Y %m %d"), '-301');
-compare(-301, Date_Calc::DateToDays(27, 1, -4713), '-4713 01 27');
-compare('-4713 01 28', $hs_date = Date_Calc::DaysToDate(-300, "%Y %m %d"), '-300');
-compare(-300, Date_Calc::DateToDays(28, 1, -4713), '-4713 01 28');
-compare('-4713 01 29', $hs_date = Date_Calc::DaysToDate(-299, "%Y %m %d"), '-299');
-compare(-299, Date_Calc::DateToDays(29, 1, -4713), '-4713 01 29');
-compare('-4713 01 30', $hs_date = Date_Calc::DaysToDate(-298, "%Y %m %d"), '-298');
-compare(-298, Date_Calc::DateToDays(30, 1, -4713), '-4713 01 30');
-compare('-4713 01 31', $hs_date = Date_Calc::DaysToDate(-297, "%Y %m %d"), '-297');
-compare(-297, Date_Calc::DateToDays(31, 1, -4713), '-4713 01 31');
-compare('-4713 02 01', $hs_date = Date_Calc::DaysToDate(-296, "%Y %m %d"), '-296');
-compare(-296, Date_Calc::DateToDays(1, 2, -4713), '-4713 02 01');
-compare('-4713 02 02', $hs_date = Date_Calc::DaysToDate(-295, "%Y %m %d"), '-295');
-compare(-295, Date_Calc::DateToDays(2, 2, -4713), '-4713 02 02');
-compare('-4713 02 03', $hs_date = Date_Calc::DaysToDate(-294, "%Y %m %d"), '-294');
-compare(-294, Date_Calc::DateToDays(3, 2, -4713), '-4713 02 03');
-compare('-4713 02 04', $hs_date = Date_Calc::DaysToDate(-293, "%Y %m %d"), '-293');
-compare(-293, Date_Calc::DateToDays(4, 2, -4713), '-4713 02 04');
-compare('-4713 02 05', $hs_date = Date_Calc::DaysToDate(-292, "%Y %m %d"), '-292');
-compare(-292, Date_Calc::DateToDays(5, 2, -4713), '-4713 02 05');
-compare('-4713 02 06', $hs_date = Date_Calc::DaysToDate(-291, "%Y %m %d"), '-291');
-compare(-291, Date_Calc::DateToDays(6, 2, -4713), '-4713 02 06');
-compare('-4713 02 07', $hs_date = Date_Calc::DaysToDate(-290, "%Y %m %d"), '-290');
-compare(-290, Date_Calc::DateToDays(7, 2, -4713), '-4713 02 07');
-compare('-4713 02 08', $hs_date = Date_Calc::DaysToDate(-289, "%Y %m %d"), '-289');
-compare(-289, Date_Calc::DateToDays(8, 2, -4713), '-4713 02 08');
-compare('-4713 02 09', $hs_date = Date_Calc::DaysToDate(-288, "%Y %m %d"), '-288');
-compare(-288, Date_Calc::DateToDays(9, 2, -4713), '-4713 02 09');
-compare('-4713 02 10', $hs_date = Date_Calc::DaysToDate(-287, "%Y %m %d"), '-287');
-compare(-287, Date_Calc::DateToDays(10, 2, -4713), '-4713 02 10');
-compare('-4713 02 11', $hs_date = Date_Calc::DaysToDate(-286, "%Y %m %d"), '-286');
-compare(-286, Date_Calc::DateToDays(11, 2, -4713), '-4713 02 11');
-compare('-4713 02 12', $hs_date = Date_Calc::DaysToDate(-285, "%Y %m %d"), '-285');
-compare(-285, Date_Calc::DateToDays(12, 2, -4713), '-4713 02 12');
-compare('-4713 02 13', $hs_date = Date_Calc::DaysToDate(-284, "%Y %m %d"), '-284');
-compare(-284, Date_Calc::DateToDays(13, 2, -4713), '-4713 02 13');
-compare('-4713 02 14', $hs_date = Date_Calc::DaysToDate(-283, "%Y %m %d"), '-283');
-compare(-283, Date_Calc::DateToDays(14, 2, -4713), '-4713 02 14');
-compare('-4713 02 15', $hs_date = Date_Calc::DaysToDate(-282, "%Y %m %d"), '-282');
-compare(-282, Date_Calc::DateToDays(15, 2, -4713), '-4713 02 15');
-compare('-4713 02 16', $hs_date = Date_Calc::DaysToDate(-281, "%Y %m %d"), '-281');
-compare(-281, Date_Calc::DateToDays(16, 2, -4713), '-4713 02 16');
-compare('-4713 02 17', $hs_date = Date_Calc::DaysToDate(-280, "%Y %m %d"), '-280');
-compare(-280, Date_Calc::DateToDays(17, 2, -4713), '-4713 02 17');
-compare('-4713 02 18', $hs_date = Date_Calc::DaysToDate(-279, "%Y %m %d"), '-279');
-compare(-279, Date_Calc::DateToDays(18, 2, -4713), '-4713 02 18');
-compare('-4713 02 19', $hs_date = Date_Calc::DaysToDate(-278, "%Y %m %d"), '-278');
-compare(-278, Date_Calc::DateToDays(19, 2, -4713), '-4713 02 19');
-compare('-4713 02 20', $hs_date = Date_Calc::DaysToDate(-277, "%Y %m %d"), '-277');
-compare(-277, Date_Calc::DateToDays(20, 2, -4713), '-4713 02 20');
-compare('-4713 02 21', $hs_date = Date_Calc::DaysToDate(-276, "%Y %m %d"), '-276');
-compare(-276, Date_Calc::DateToDays(21, 2, -4713), '-4713 02 21');
-compare('-4713 02 22', $hs_date = Date_Calc::DaysToDate(-275, "%Y %m %d"), '-275');
-compare(-275, Date_Calc::DateToDays(22, 2, -4713), '-4713 02 22');
-compare('-4713 02 23', $hs_date = Date_Calc::DaysToDate(-274, "%Y %m %d"), '-274');
-compare(-274, Date_Calc::DateToDays(23, 2, -4713), '-4713 02 23');
-compare('-4713 02 24', $hs_date = Date_Calc::DaysToDate(-273, "%Y %m %d"), '-273');
-compare(-273, Date_Calc::DateToDays(24, 2, -4713), '-4713 02 24');
-compare('-4713 02 25', $hs_date = Date_Calc::DaysToDate(-272, "%Y %m %d"), '-272');
-compare(-272, Date_Calc::DateToDays(25, 2, -4713), '-4713 02 25');
-compare('-4713 02 26', $hs_date = Date_Calc::DaysToDate(-271, "%Y %m %d"), '-271');
-compare(-271, Date_Calc::DateToDays(26, 2, -4713), '-4713 02 26');
-compare('-4713 02 27', $hs_date = Date_Calc::DaysToDate(-270, "%Y %m %d"), '-270');
-compare(-270, Date_Calc::DateToDays(27, 2, -4713), '-4713 02 27');
-compare('-4713 02 28', $hs_date = Date_Calc::DaysToDate(-269, "%Y %m %d"), '-269');
-compare(-269, Date_Calc::DateToDays(28, 2, -4713), '-4713 02 28');
-compare('-4713 03 01', $hs_date = Date_Calc::DaysToDate(-268, "%Y %m %d"), '-268');
-compare(-268, Date_Calc::DateToDays(1, 3, -4713), '-4713 03 01');
-compare('-4713 03 02', $hs_date = Date_Calc::DaysToDate(-267, "%Y %m %d"), '-267');
-compare(-267, Date_Calc::DateToDays(2, 3, -4713), '-4713 03 02');
-compare('-4713 03 03', $hs_date = Date_Calc::DaysToDate(-266, "%Y %m %d"), '-266');
-compare(-266, Date_Calc::DateToDays(3, 3, -4713), '-4713 03 03');
-compare('-4713 03 04', $hs_date = Date_Calc::DaysToDate(-265, "%Y %m %d"), '-265');
-compare(-265, Date_Calc::DateToDays(4, 3, -4713), '-4713 03 04');
-compare('-4713 03 05', $hs_date = Date_Calc::DaysToDate(-264, "%Y %m %d"), '-264');
-compare(-264, Date_Calc::DateToDays(5, 3, -4713), '-4713 03 05');
-compare('-4713 03 06', $hs_date = Date_Calc::DaysToDate(-263, "%Y %m %d"), '-263');
-compare(-263, Date_Calc::DateToDays(6, 3, -4713), '-4713 03 06');
-compare('-4713 03 07', $hs_date = Date_Calc::DaysToDate(-262, "%Y %m %d"), '-262');
-compare(-262, Date_Calc::DateToDays(7, 3, -4713), '-4713 03 07');
-compare('-4713 03 08', $hs_date = Date_Calc::DaysToDate(-261, "%Y %m %d"), '-261');
-compare(-261, Date_Calc::DateToDays(8, 3, -4713), '-4713 03 08');
-compare('-4713 03 09', $hs_date = Date_Calc::DaysToDate(-260, "%Y %m %d"), '-260');
-compare(-260, Date_Calc::DateToDays(9, 3, -4713), '-4713 03 09');
-compare('-4713 03 10', $hs_date = Date_Calc::DaysToDate(-259, "%Y %m %d"), '-259');
-compare(-259, Date_Calc::DateToDays(10, 3, -4713), '-4713 03 10');
-compare('-4713 03 11', $hs_date = Date_Calc::DaysToDate(-258, "%Y %m %d"), '-258');
-compare(-258, Date_Calc::DateToDays(11, 3, -4713), '-4713 03 11');
-compare('-4713 03 12', $hs_date = Date_Calc::DaysToDate(-257, "%Y %m %d"), '-257');
-compare(-257, Date_Calc::DateToDays(12, 3, -4713), '-4713 03 12');
-compare('-4713 03 13', $hs_date = Date_Calc::DaysToDate(-256, "%Y %m %d"), '-256');
-compare(-256, Date_Calc::DateToDays(13, 3, -4713), '-4713 03 13');
-compare('-4713 03 14', $hs_date = Date_Calc::DaysToDate(-255, "%Y %m %d"), '-255');
-compare(-255, Date_Calc::DateToDays(14, 3, -4713), '-4713 03 14');
-compare('-4713 03 15', $hs_date = Date_Calc::DaysToDate(-254, "%Y %m %d"), '-254');
-compare(-254, Date_Calc::DateToDays(15, 3, -4713), '-4713 03 15');
-compare('-4713 03 16', $hs_date = Date_Calc::DaysToDate(-253, "%Y %m %d"), '-253');
-compare(-253, Date_Calc::DateToDays(16, 3, -4713), '-4713 03 16');
-compare('-4713 03 17', $hs_date = Date_Calc::DaysToDate(-252, "%Y %m %d"), '-252');
-compare(-252, Date_Calc::DateToDays(17, 3, -4713), '-4713 03 17');
-compare('-4713 03 18', $hs_date = Date_Calc::DaysToDate(-251, "%Y %m %d"), '-251');
-compare(-251, Date_Calc::DateToDays(18, 3, -4713), '-4713 03 18');
-compare('-4713 03 19', $hs_date = Date_Calc::DaysToDate(-250, "%Y %m %d"), '-250');
-compare(-250, Date_Calc::DateToDays(19, 3, -4713), '-4713 03 19');
-compare('-4713 03 20', $hs_date = Date_Calc::DaysToDate(-249, "%Y %m %d"), '-249');
-compare(-249, Date_Calc::DateToDays(20, 3, -4713), '-4713 03 20');
-compare('-4713 03 21', $hs_date = Date_Calc::DaysToDate(-248, "%Y %m %d"), '-248');
-compare(-248, Date_Calc::DateToDays(21, 3, -4713), '-4713 03 21');
-compare('-4713 03 22', $hs_date = Date_Calc::DaysToDate(-247, "%Y %m %d"), '-247');
-compare(-247, Date_Calc::DateToDays(22, 3, -4713), '-4713 03 22');
-compare('-4713 03 23', $hs_date = Date_Calc::DaysToDate(-246, "%Y %m %d"), '-246');
-compare(-246, Date_Calc::DateToDays(23, 3, -4713), '-4713 03 23');
-compare('-4713 03 24', $hs_date = Date_Calc::DaysToDate(-245, "%Y %m %d"), '-245');
-compare(-245, Date_Calc::DateToDays(24, 3, -4713), '-4713 03 24');
-compare('-4713 03 25', $hs_date = Date_Calc::DaysToDate(-244, "%Y %m %d"), '-244');
-compare(-244, Date_Calc::DateToDays(25, 3, -4713), '-4713 03 25');
-compare('-4713 03 26', $hs_date = Date_Calc::DaysToDate(-243, "%Y %m %d"), '-243');
-compare(-243, Date_Calc::DateToDays(26, 3, -4713), '-4713 03 26');
-compare('-4713 03 27', $hs_date = Date_Calc::DaysToDate(-242, "%Y %m %d"), '-242');
-compare(-242, Date_Calc::DateToDays(27, 3, -4713), '-4713 03 27');
-compare('-4713 03 28', $hs_date = Date_Calc::DaysToDate(-241, "%Y %m %d"), '-241');
-compare(-241, Date_Calc::DateToDays(28, 3, -4713), '-4713 03 28');
-compare('-4713 03 29', $hs_date = Date_Calc::DaysToDate(-240, "%Y %m %d"), '-240');
-compare(-240, Date_Calc::DateToDays(29, 3, -4713), '-4713 03 29');
-compare('-4713 03 30', $hs_date = Date_Calc::DaysToDate(-239, "%Y %m %d"), '-239');
-compare(-239, Date_Calc::DateToDays(30, 3, -4713), '-4713 03 30');
-compare('-4713 03 31', $hs_date = Date_Calc::DaysToDate(-238, "%Y %m %d"), '-238');
-compare(-238, Date_Calc::DateToDays(31, 3, -4713), '-4713 03 31');
-compare('-4713 04 01', $hs_date = Date_Calc::DaysToDate(-237, "%Y %m %d"), '-237');
-compare(-237, Date_Calc::DateToDays(1, 4, -4713), '-4713 04 01');
-compare('-4713 04 02', $hs_date = Date_Calc::DaysToDate(-236, "%Y %m %d"), '-236');
-compare(-236, Date_Calc::DateToDays(2, 4, -4713), '-4713 04 02');
-compare('-4713 04 03', $hs_date = Date_Calc::DaysToDate(-235, "%Y %m %d"), '-235');
-compare(-235, Date_Calc::DateToDays(3, 4, -4713), '-4713 04 03');
-compare('-4713 04 04', $hs_date = Date_Calc::DaysToDate(-234, "%Y %m %d"), '-234');
-compare(-234, Date_Calc::DateToDays(4, 4, -4713), '-4713 04 04');
-compare('-4713 04 05', $hs_date = Date_Calc::DaysToDate(-233, "%Y %m %d"), '-233');
-compare(-233, Date_Calc::DateToDays(5, 4, -4713), '-4713 04 05');
-compare('-4713 04 06', $hs_date = Date_Calc::DaysToDate(-232, "%Y %m %d"), '-232');
-compare(-232, Date_Calc::DateToDays(6, 4, -4713), '-4713 04 06');
-compare('-4713 04 07', $hs_date = Date_Calc::DaysToDate(-231, "%Y %m %d"), '-231');
-compare(-231, Date_Calc::DateToDays(7, 4, -4713), '-4713 04 07');
-compare('-4713 04 08', $hs_date = Date_Calc::DaysToDate(-230, "%Y %m %d"), '-230');
-compare(-230, Date_Calc::DateToDays(8, 4, -4713), '-4713 04 08');
-compare('-4713 04 09', $hs_date = Date_Calc::DaysToDate(-229, "%Y %m %d"), '-229');
-compare(-229, Date_Calc::DateToDays(9, 4, -4713), '-4713 04 09');
-compare('-4713 04 10', $hs_date = Date_Calc::DaysToDate(-228, "%Y %m %d"), '-228');
-compare(-228, Date_Calc::DateToDays(10, 4, -4713), '-4713 04 10');
-compare('-4713 04 11', $hs_date = Date_Calc::DaysToDate(-227, "%Y %m %d"), '-227');
-compare(-227, Date_Calc::DateToDays(11, 4, -4713), '-4713 04 11');
-compare('-4713 04 12', $hs_date = Date_Calc::DaysToDate(-226, "%Y %m %d"), '-226');
-compare(-226, Date_Calc::DateToDays(12, 4, -4713), '-4713 04 12');
-compare('-4713 04 13', $hs_date = Date_Calc::DaysToDate(-225, "%Y %m %d"), '-225');
-compare(-225, Date_Calc::DateToDays(13, 4, -4713), '-4713 04 13');
-compare('-4713 04 14', $hs_date = Date_Calc::DaysToDate(-224, "%Y %m %d"), '-224');
-compare(-224, Date_Calc::DateToDays(14, 4, -4713), '-4713 04 14');
-compare('-4713 04 15', $hs_date = Date_Calc::DaysToDate(-223, "%Y %m %d"), '-223');
-compare(-223, Date_Calc::DateToDays(15, 4, -4713), '-4713 04 15');
-compare('-4713 04 16', $hs_date = Date_Calc::DaysToDate(-222, "%Y %m %d"), '-222');
-compare(-222, Date_Calc::DateToDays(16, 4, -4713), '-4713 04 16');
-compare('-4713 04 17', $hs_date = Date_Calc::DaysToDate(-221, "%Y %m %d"), '-221');
-compare(-221, Date_Calc::DateToDays(17, 4, -4713), '-4713 04 17');
-compare('-4713 04 18', $hs_date = Date_Calc::DaysToDate(-220, "%Y %m %d"), '-220');
-compare(-220, Date_Calc::DateToDays(18, 4, -4713), '-4713 04 18');
-compare('-4713 04 19', $hs_date = Date_Calc::DaysToDate(-219, "%Y %m %d"), '-219');
-compare(-219, Date_Calc::DateToDays(19, 4, -4713), '-4713 04 19');
-compare('-4713 04 20', $hs_date = Date_Calc::DaysToDate(-218, "%Y %m %d"), '-218');
-compare(-218, Date_Calc::DateToDays(20, 4, -4713), '-4713 04 20');
-compare('-4713 04 21', $hs_date = Date_Calc::DaysToDate(-217, "%Y %m %d"), '-217');
-compare(-217, Date_Calc::DateToDays(21, 4, -4713), '-4713 04 21');
-compare('-4713 04 22', $hs_date = Date_Calc::DaysToDate(-216, "%Y %m %d"), '-216');
-compare(-216, Date_Calc::DateToDays(22, 4, -4713), '-4713 04 22');
-compare('-4713 04 23', $hs_date = Date_Calc::DaysToDate(-215, "%Y %m %d"), '-215');
-compare(-215, Date_Calc::DateToDays(23, 4, -4713), '-4713 04 23');
-compare('-4713 04 24', $hs_date = Date_Calc::DaysToDate(-214, "%Y %m %d"), '-214');
-compare(-214, Date_Calc::DateToDays(24, 4, -4713), '-4713 04 24');
-compare('-4713 04 25', $hs_date = Date_Calc::DaysToDate(-213, "%Y %m %d"), '-213');
-compare(-213, Date_Calc::DateToDays(25, 4, -4713), '-4713 04 25');
-compare('-4713 04 26', $hs_date = Date_Calc::DaysToDate(-212, "%Y %m %d"), '-212');
-compare(-212, Date_Calc::DateToDays(26, 4, -4713), '-4713 04 26');
-compare('-4713 04 27', $hs_date = Date_Calc::DaysToDate(-211, "%Y %m %d"), '-211');
-compare(-211, Date_Calc::DateToDays(27, 4, -4713), '-4713 04 27');
-compare('-4713 04 28', $hs_date = Date_Calc::DaysToDate(-210, "%Y %m %d"), '-210');
-compare(-210, Date_Calc::DateToDays(28, 4, -4713), '-4713 04 28');
-compare('-4713 04 29', $hs_date = Date_Calc::DaysToDate(-209, "%Y %m %d"), '-209');
-compare(-209, Date_Calc::DateToDays(29, 4, -4713), '-4713 04 29');
-compare('-4713 04 30', $hs_date = Date_Calc::DaysToDate(-208, "%Y %m %d"), '-208');
-compare(-208, Date_Calc::DateToDays(30, 4, -4713), '-4713 04 30');
-compare('-4713 05 01', $hs_date = Date_Calc::DaysToDate(-207, "%Y %m %d"), '-207');
-compare(-207, Date_Calc::DateToDays(1, 5, -4713), '-4713 05 01');
-compare('-4713 05 02', $hs_date = Date_Calc::DaysToDate(-206, "%Y %m %d"), '-206');
-compare(-206, Date_Calc::DateToDays(2, 5, -4713), '-4713 05 02');
-compare('-4713 05 03', $hs_date = Date_Calc::DaysToDate(-205, "%Y %m %d"), '-205');
-compare(-205, Date_Calc::DateToDays(3, 5, -4713), '-4713 05 03');
-compare('-4713 05 04', $hs_date = Date_Calc::DaysToDate(-204, "%Y %m %d"), '-204');
-compare(-204, Date_Calc::DateToDays(4, 5, -4713), '-4713 05 04');
-compare('-4713 05 05', $hs_date = Date_Calc::DaysToDate(-203, "%Y %m %d"), '-203');
-compare(-203, Date_Calc::DateToDays(5, 5, -4713), '-4713 05 05');
-compare('-4713 05 06', $hs_date = Date_Calc::DaysToDate(-202, "%Y %m %d"), '-202');
-compare(-202, Date_Calc::DateToDays(6, 5, -4713), '-4713 05 06');
-compare('-4713 05 07', $hs_date = Date_Calc::DaysToDate(-201, "%Y %m %d"), '-201');
-compare(-201, Date_Calc::DateToDays(7, 5, -4713), '-4713 05 07');
-compare('-4713 05 08', $hs_date = Date_Calc::DaysToDate(-200, "%Y %m %d"), '-200');
-compare(-200, Date_Calc::DateToDays(8, 5, -4713), '-4713 05 08');
-compare('-4713 05 09', $hs_date = Date_Calc::DaysToDate(-199, "%Y %m %d"), '-199');
-compare(-199, Date_Calc::DateToDays(9, 5, -4713), '-4713 05 09');
-compare('-4713 05 10', $hs_date = Date_Calc::DaysToDate(-198, "%Y %m %d"), '-198');
-compare(-198, Date_Calc::DateToDays(10, 5, -4713), '-4713 05 10');
-compare('-4713 05 11', $hs_date = Date_Calc::DaysToDate(-197, "%Y %m %d"), '-197');
-compare(-197, Date_Calc::DateToDays(11, 5, -4713), '-4713 05 11');
-compare('-4713 05 12', $hs_date = Date_Calc::DaysToDate(-196, "%Y %m %d"), '-196');
-compare(-196, Date_Calc::DateToDays(12, 5, -4713), '-4713 05 12');
-compare('-4713 05 13', $hs_date = Date_Calc::DaysToDate(-195, "%Y %m %d"), '-195');
-compare(-195, Date_Calc::DateToDays(13, 5, -4713), '-4713 05 13');
-compare('-4713 05 14', $hs_date = Date_Calc::DaysToDate(-194, "%Y %m %d"), '-194');
-compare(-194, Date_Calc::DateToDays(14, 5, -4713), '-4713 05 14');
-compare('-4713 05 15', $hs_date = Date_Calc::DaysToDate(-193, "%Y %m %d"), '-193');
-compare(-193, Date_Calc::DateToDays(15, 5, -4713), '-4713 05 15');
-compare('-4713 05 16', $hs_date = Date_Calc::DaysToDate(-192, "%Y %m %d"), '-192');
-compare(-192, Date_Calc::DateToDays(16, 5, -4713), '-4713 05 16');
-compare('-4713 05 17', $hs_date = Date_Calc::DaysToDate(-191, "%Y %m %d"), '-191');
-compare(-191, Date_Calc::DateToDays(17, 5, -4713), '-4713 05 17');
-compare('-4713 05 18', $hs_date = Date_Calc::DaysToDate(-190, "%Y %m %d"), '-190');
-compare(-190, Date_Calc::DateToDays(18, 5, -4713), '-4713 05 18');
-compare('-4713 05 19', $hs_date = Date_Calc::DaysToDate(-189, "%Y %m %d"), '-189');
-compare(-189, Date_Calc::DateToDays(19, 5, -4713), '-4713 05 19');
-compare('-4713 05 20', $hs_date = Date_Calc::DaysToDate(-188, "%Y %m %d"), '-188');
-compare(-188, Date_Calc::DateToDays(20, 5, -4713), '-4713 05 20');
-compare('-4713 05 21', $hs_date = Date_Calc::DaysToDate(-187, "%Y %m %d"), '-187');
-compare(-187, Date_Calc::DateToDays(21, 5, -4713), '-4713 05 21');
-compare('-4713 05 22', $hs_date = Date_Calc::DaysToDate(-186, "%Y %m %d"), '-186');
-compare(-186, Date_Calc::DateToDays(22, 5, -4713), '-4713 05 22');
-compare('-4713 05 23', $hs_date = Date_Calc::DaysToDate(-185, "%Y %m %d"), '-185');
-compare(-185, Date_Calc::DateToDays(23, 5, -4713), '-4713 05 23');
-compare('-4713 05 24', $hs_date = Date_Calc::DaysToDate(-184, "%Y %m %d"), '-184');
-compare(-184, Date_Calc::DateToDays(24, 5, -4713), '-4713 05 24');
-compare('-4713 05 25', $hs_date = Date_Calc::DaysToDate(-183, "%Y %m %d"), '-183');
-compare(-183, Date_Calc::DateToDays(25, 5, -4713), '-4713 05 25');
-compare('-4713 05 26', $hs_date = Date_Calc::DaysToDate(-182, "%Y %m %d"), '-182');
-compare(-182, Date_Calc::DateToDays(26, 5, -4713), '-4713 05 26');
-compare('-4713 05 27', $hs_date = Date_Calc::DaysToDate(-181, "%Y %m %d"), '-181');
-compare(-181, Date_Calc::DateToDays(27, 5, -4713), '-4713 05 27');
-compare('-4713 05 28', $hs_date = Date_Calc::DaysToDate(-180, "%Y %m %d"), '-180');
-compare(-180, Date_Calc::DateToDays(28, 5, -4713), '-4713 05 28');
-compare('-4713 05 29', $hs_date = Date_Calc::DaysToDate(-179, "%Y %m %d"), '-179');
-compare(-179, Date_Calc::DateToDays(29, 5, -4713), '-4713 05 29');
-compare('-4713 05 30', $hs_date = Date_Calc::DaysToDate(-178, "%Y %m %d"), '-178');
-compare(-178, Date_Calc::DateToDays(30, 5, -4713), '-4713 05 30');
-compare('-4713 05 31', $hs_date = Date_Calc::DaysToDate(-177, "%Y %m %d"), '-177');
-compare(-177, Date_Calc::DateToDays(31, 5, -4713), '-4713 05 31');
-compare('-4713 06 01', $hs_date = Date_Calc::DaysToDate(-176, "%Y %m %d"), '-176');
-compare(-176, Date_Calc::DateToDays(1, 6, -4713), '-4713 06 01');
-compare('-4713 06 02', $hs_date = Date_Calc::DaysToDate(-175, "%Y %m %d"), '-175');
-compare(-175, Date_Calc::DateToDays(2, 6, -4713), '-4713 06 02');
-compare('-4713 06 03', $hs_date = Date_Calc::DaysToDate(-174, "%Y %m %d"), '-174');
-compare(-174, Date_Calc::DateToDays(3, 6, -4713), '-4713 06 03');
-compare('-4713 06 04', $hs_date = Date_Calc::DaysToDate(-173, "%Y %m %d"), '-173');
-compare(-173, Date_Calc::DateToDays(4, 6, -4713), '-4713 06 04');
-compare('-4713 06 05', $hs_date = Date_Calc::DaysToDate(-172, "%Y %m %d"), '-172');
-compare(-172, Date_Calc::DateToDays(5, 6, -4713), '-4713 06 05');
-compare('-4713 06 06', $hs_date = Date_Calc::DaysToDate(-171, "%Y %m %d"), '-171');
-compare(-171, Date_Calc::DateToDays(6, 6, -4713), '-4713 06 06');
-compare('-4713 06 07', $hs_date = Date_Calc::DaysToDate(-170, "%Y %m %d"), '-170');
-compare(-170, Date_Calc::DateToDays(7, 6, -4713), '-4713 06 07');
-compare('-4713 06 08', $hs_date = Date_Calc::DaysToDate(-169, "%Y %m %d"), '-169');
-compare(-169, Date_Calc::DateToDays(8, 6, -4713), '-4713 06 08');
-compare('-4713 06 09', $hs_date = Date_Calc::DaysToDate(-168, "%Y %m %d"), '-168');
-compare(-168, Date_Calc::DateToDays(9, 6, -4713), '-4713 06 09');
-compare('-4713 06 10', $hs_date = Date_Calc::DaysToDate(-167, "%Y %m %d"), '-167');
-compare(-167, Date_Calc::DateToDays(10, 6, -4713), '-4713 06 10');
-compare('-4713 06 11', $hs_date = Date_Calc::DaysToDate(-166, "%Y %m %d"), '-166');
-compare(-166, Date_Calc::DateToDays(11, 6, -4713), '-4713 06 11');
-compare('-4713 06 12', $hs_date = Date_Calc::DaysToDate(-165, "%Y %m %d"), '-165');
-compare(-165, Date_Calc::DateToDays(12, 6, -4713), '-4713 06 12');
-compare('-4713 06 13', $hs_date = Date_Calc::DaysToDate(-164, "%Y %m %d"), '-164');
-compare(-164, Date_Calc::DateToDays(13, 6, -4713), '-4713 06 13');
-compare('-4713 06 14', $hs_date = Date_Calc::DaysToDate(-163, "%Y %m %d"), '-163');
-compare(-163, Date_Calc::DateToDays(14, 6, -4713), '-4713 06 14');
-compare('-4713 06 15', $hs_date = Date_Calc::DaysToDate(-162, "%Y %m %d"), '-162');
-compare(-162, Date_Calc::DateToDays(15, 6, -4713), '-4713 06 15');
-compare('-4713 06 16', $hs_date = Date_Calc::DaysToDate(-161, "%Y %m %d"), '-161');
-compare(-161, Date_Calc::DateToDays(16, 6, -4713), '-4713 06 16');
-compare('-4713 06 17', $hs_date = Date_Calc::DaysToDate(-160, "%Y %m %d"), '-160');
-compare(-160, Date_Calc::DateToDays(17, 6, -4713), '-4713 06 17');
-compare('-4713 06 18', $hs_date = Date_Calc::DaysToDate(-159, "%Y %m %d"), '-159');
-compare(-159, Date_Calc::DateToDays(18, 6, -4713), '-4713 06 18');
-compare('-4713 06 19', $hs_date = Date_Calc::DaysToDate(-158, "%Y %m %d"), '-158');
-compare(-158, Date_Calc::DateToDays(19, 6, -4713), '-4713 06 19');
-compare('-4713 06 20', $hs_date = Date_Calc::DaysToDate(-157, "%Y %m %d"), '-157');
-compare(-157, Date_Calc::DateToDays(20, 6, -4713), '-4713 06 20');
-compare('-4713 06 21', $hs_date = Date_Calc::DaysToDate(-156, "%Y %m %d"), '-156');
-compare(-156, Date_Calc::DateToDays(21, 6, -4713), '-4713 06 21');
-compare('-4713 06 22', $hs_date = Date_Calc::DaysToDate(-155, "%Y %m %d"), '-155');
-compare(-155, Date_Calc::DateToDays(22, 6, -4713), '-4713 06 22');
-compare('-4713 06 23', $hs_date = Date_Calc::DaysToDate(-154, "%Y %m %d"), '-154');
-compare(-154, Date_Calc::DateToDays(23, 6, -4713), '-4713 06 23');
-compare('-4713 06 24', $hs_date = Date_Calc::DaysToDate(-153, "%Y %m %d"), '-153');
-compare(-153, Date_Calc::DateToDays(24, 6, -4713), '-4713 06 24');
-compare('-4713 06 25', $hs_date = Date_Calc::DaysToDate(-152, "%Y %m %d"), '-152');
-compare(-152, Date_Calc::DateToDays(25, 6, -4713), '-4713 06 25');
-compare('-4713 06 26', $hs_date = Date_Calc::DaysToDate(-151, "%Y %m %d"), '-151');
-compare(-151, Date_Calc::DateToDays(26, 6, -4713), '-4713 06 26');
-compare('-4713 06 27', $hs_date = Date_Calc::DaysToDate(-150, "%Y %m %d"), '-150');
-compare(-150, Date_Calc::DateToDays(27, 6, -4713), '-4713 06 27');
-compare('-4713 06 28', $hs_date = Date_Calc::DaysToDate(-149, "%Y %m %d"), '-149');
-compare(-149, Date_Calc::DateToDays(28, 6, -4713), '-4713 06 28');
-compare('-4713 06 29', $hs_date = Date_Calc::DaysToDate(-148, "%Y %m %d"), '-148');
-compare(-148, Date_Calc::DateToDays(29, 6, -4713), '-4713 06 29');
-compare('-4713 06 30', $hs_date = Date_Calc::DaysToDate(-147, "%Y %m %d"), '-147');
-compare(-147, Date_Calc::DateToDays(30, 6, -4713), '-4713 06 30');
-compare('-4713 07 01', $hs_date = Date_Calc::DaysToDate(-146, "%Y %m %d"), '-146');
-compare(-146, Date_Calc::DateToDays(1, 7, -4713), '-4713 07 01');
-compare('-4713 07 02', $hs_date = Date_Calc::DaysToDate(-145, "%Y %m %d"), '-145');
-compare(-145, Date_Calc::DateToDays(2, 7, -4713), '-4713 07 02');
-compare('-4713 07 03', $hs_date = Date_Calc::DaysToDate(-144, "%Y %m %d"), '-144');
-compare(-144, Date_Calc::DateToDays(3, 7, -4713), '-4713 07 03');
-compare('-4713 07 04', $hs_date = Date_Calc::DaysToDate(-143, "%Y %m %d"), '-143');
-compare(-143, Date_Calc::DateToDays(4, 7, -4713), '-4713 07 04');
-compare('-4713 07 05', $hs_date = Date_Calc::DaysToDate(-142, "%Y %m %d"), '-142');
-compare(-142, Date_Calc::DateToDays(5, 7, -4713), '-4713 07 05');
-compare('-4713 07 06', $hs_date = Date_Calc::DaysToDate(-141, "%Y %m %d"), '-141');
-compare(-141, Date_Calc::DateToDays(6, 7, -4713), '-4713 07 06');
-compare('-4713 07 07', $hs_date = Date_Calc::DaysToDate(-140, "%Y %m %d"), '-140');
-compare(-140, Date_Calc::DateToDays(7, 7, -4713), '-4713 07 07');
-compare('-4713 07 08', $hs_date = Date_Calc::DaysToDate(-139, "%Y %m %d"), '-139');
-compare(-139, Date_Calc::DateToDays(8, 7, -4713), '-4713 07 08');
-compare('-4713 07 09', $hs_date = Date_Calc::DaysToDate(-138, "%Y %m %d"), '-138');
-compare(-138, Date_Calc::DateToDays(9, 7, -4713), '-4713 07 09');
-compare('-4713 07 10', $hs_date = Date_Calc::DaysToDate(-137, "%Y %m %d"), '-137');
-compare(-137, Date_Calc::DateToDays(10, 7, -4713), '-4713 07 10');
-compare('-4713 07 11', $hs_date = Date_Calc::DaysToDate(-136, "%Y %m %d"), '-136');
-compare(-136, Date_Calc::DateToDays(11, 7, -4713), '-4713 07 11');
-compare('-4713 07 12', $hs_date = Date_Calc::DaysToDate(-135, "%Y %m %d"), '-135');
-compare(-135, Date_Calc::DateToDays(12, 7, -4713), '-4713 07 12');
-compare('-4713 07 13', $hs_date = Date_Calc::DaysToDate(-134, "%Y %m %d"), '-134');
-compare(-134, Date_Calc::DateToDays(13, 7, -4713), '-4713 07 13');
-compare('-4713 07 14', $hs_date = Date_Calc::DaysToDate(-133, "%Y %m %d"), '-133');
-compare(-133, Date_Calc::DateToDays(14, 7, -4713), '-4713 07 14');
-compare('-4713 07 15', $hs_date = Date_Calc::DaysToDate(-132, "%Y %m %d"), '-132');
-compare(-132, Date_Calc::DateToDays(15, 7, -4713), '-4713 07 15');
-compare('-4713 07 16', $hs_date = Date_Calc::DaysToDate(-131, "%Y %m %d"), '-131');
-compare(-131, Date_Calc::DateToDays(16, 7, -4713), '-4713 07 16');
-compare('-4713 07 17', $hs_date = Date_Calc::DaysToDate(-130, "%Y %m %d"), '-130');
-compare(-130, Date_Calc::DateToDays(17, 7, -4713), '-4713 07 17');
-compare('-4713 07 18', $hs_date = Date_Calc::DaysToDate(-129, "%Y %m %d"), '-129');
-compare(-129, Date_Calc::DateToDays(18, 7, -4713), '-4713 07 18');
-compare('-4713 07 19', $hs_date = Date_Calc::DaysToDate(-128, "%Y %m %d"), '-128');
-compare(-128, Date_Calc::DateToDays(19, 7, -4713), '-4713 07 19');
-compare('-4713 07 20', $hs_date = Date_Calc::DaysToDate(-127, "%Y %m %d"), '-127');
-compare(-127, Date_Calc::DateToDays(20, 7, -4713), '-4713 07 20');
-compare('-4713 07 21', $hs_date = Date_Calc::DaysToDate(-126, "%Y %m %d"), '-126');
-compare(-126, Date_Calc::DateToDays(21, 7, -4713), '-4713 07 21');
-compare('-4713 07 22', $hs_date = Date_Calc::DaysToDate(-125, "%Y %m %d"), '-125');
-compare(-125, Date_Calc::DateToDays(22, 7, -4713), '-4713 07 22');
-compare('-4713 07 23', $hs_date = Date_Calc::DaysToDate(-124, "%Y %m %d"), '-124');
-compare(-124, Date_Calc::DateToDays(23, 7, -4713), '-4713 07 23');
-compare('-4713 07 24', $hs_date = Date_Calc::DaysToDate(-123, "%Y %m %d"), '-123');
-compare(-123, Date_Calc::DateToDays(24, 7, -4713), '-4713 07 24');
-compare('-4713 07 25', $hs_date = Date_Calc::DaysToDate(-122, "%Y %m %d"), '-122');
-compare(-122, Date_Calc::DateToDays(25, 7, -4713), '-4713 07 25');
-compare('-4713 07 26', $hs_date = Date_Calc::DaysToDate(-121, "%Y %m %d"), '-121');
-compare(-121, Date_Calc::DateToDays(26, 7, -4713), '-4713 07 26');
-compare('-4713 07 27', $hs_date = Date_Calc::DaysToDate(-120, "%Y %m %d"), '-120');
-compare(-120, Date_Calc::DateToDays(27, 7, -4713), '-4713 07 27');
-compare('-4713 07 28', $hs_date = Date_Calc::DaysToDate(-119, "%Y %m %d"), '-119');
-compare(-119, Date_Calc::DateToDays(28, 7, -4713), '-4713 07 28');
-compare('-4713 07 29', $hs_date = Date_Calc::DaysToDate(-118, "%Y %m %d"), '-118');
-compare(-118, Date_Calc::DateToDays(29, 7, -4713), '-4713 07 29');
-compare('-4713 07 30', $hs_date = Date_Calc::DaysToDate(-117, "%Y %m %d"), '-117');
-compare(-117, Date_Calc::DateToDays(30, 7, -4713), '-4713 07 30');
-compare('-4713 07 31', $hs_date = Date_Calc::DaysToDate(-116, "%Y %m %d"), '-116');
-compare(-116, Date_Calc::DateToDays(31, 7, -4713), '-4713 07 31');
-compare('-4713 08 01', $hs_date = Date_Calc::DaysToDate(-115, "%Y %m %d"), '-115');
-compare(-115, Date_Calc::DateToDays(1, 8, -4713), '-4713 08 01');
-compare('-4713 08 02', $hs_date = Date_Calc::DaysToDate(-114, "%Y %m %d"), '-114');
-compare(-114, Date_Calc::DateToDays(2, 8, -4713), '-4713 08 02');
-compare('-4713 08 03', $hs_date = Date_Calc::DaysToDate(-113, "%Y %m %d"), '-113');
-compare(-113, Date_Calc::DateToDays(3, 8, -4713), '-4713 08 03');
-compare('-4713 08 04', $hs_date = Date_Calc::DaysToDate(-112, "%Y %m %d"), '-112');
-compare(-112, Date_Calc::DateToDays(4, 8, -4713), '-4713 08 04');
-compare('-4713 08 05', $hs_date = Date_Calc::DaysToDate(-111, "%Y %m %d"), '-111');
-compare(-111, Date_Calc::DateToDays(5, 8, -4713), '-4713 08 05');
-compare('-4713 08 06', $hs_date = Date_Calc::DaysToDate(-110, "%Y %m %d"), '-110');
-compare(-110, Date_Calc::DateToDays(6, 8, -4713), '-4713 08 06');
-compare('-4713 08 07', $hs_date = Date_Calc::DaysToDate(-109, "%Y %m %d"), '-109');
-compare(-109, Date_Calc::DateToDays(7, 8, -4713), '-4713 08 07');
-compare('-4713 08 08', $hs_date = Date_Calc::DaysToDate(-108, "%Y %m %d"), '-108');
-compare(-108, Date_Calc::DateToDays(8, 8, -4713), '-4713 08 08');
-compare('-4713 08 09', $hs_date = Date_Calc::DaysToDate(-107, "%Y %m %d"), '-107');
-compare(-107, Date_Calc::DateToDays(9, 8, -4713), '-4713 08 09');
-compare('-4713 08 10', $hs_date = Date_Calc::DaysToDate(-106, "%Y %m %d"), '-106');
-compare(-106, Date_Calc::DateToDays(10, 8, -4713), '-4713 08 10');
-compare('-4713 08 11', $hs_date = Date_Calc::DaysToDate(-105, "%Y %m %d"), '-105');
-compare(-105, Date_Calc::DateToDays(11, 8, -4713), '-4713 08 11');
-compare('-4713 08 12', $hs_date = Date_Calc::DaysToDate(-104, "%Y %m %d"), '-104');
-compare(-104, Date_Calc::DateToDays(12, 8, -4713), '-4713 08 12');
-compare('-4713 08 13', $hs_date = Date_Calc::DaysToDate(-103, "%Y %m %d"), '-103');
-compare(-103, Date_Calc::DateToDays(13, 8, -4713), '-4713 08 13');
-compare('-4713 08 14', $hs_date = Date_Calc::DaysToDate(-102, "%Y %m %d"), '-102');
-compare(-102, Date_Calc::DateToDays(14, 8, -4713), '-4713 08 14');
-compare('-4713 08 15', $hs_date = Date_Calc::DaysToDate(-101, "%Y %m %d"), '-101');
-compare(-101, Date_Calc::DateToDays(15, 8, -4713), '-4713 08 15');
-compare('-4713 08 16', $hs_date = Date_Calc::DaysToDate(-100, "%Y %m %d"), '-100');
-compare(-100, Date_Calc::DateToDays(16, 8, -4713), '-4713 08 16');
-compare('-4713 08 17', $hs_date = Date_Calc::DaysToDate(-99, "%Y %m %d"), '-99');
-compare(-99, Date_Calc::DateToDays(17, 8, -4713), '-4713 08 17');
-compare('-4713 08 18', $hs_date = Date_Calc::DaysToDate(-98, "%Y %m %d"), '-98');
-compare(-98, Date_Calc::DateToDays(18, 8, -4713), '-4713 08 18');
-compare('-4713 08 19', $hs_date = Date_Calc::DaysToDate(-97, "%Y %m %d"), '-97');
-compare(-97, Date_Calc::DateToDays(19, 8, -4713), '-4713 08 19');
-compare('-4713 08 20', $hs_date = Date_Calc::DaysToDate(-96, "%Y %m %d"), '-96');
-compare(-96, Date_Calc::DateToDays(20, 8, -4713), '-4713 08 20');
-compare('-4713 08 21', $hs_date = Date_Calc::DaysToDate(-95, "%Y %m %d"), '-95');
-compare(-95, Date_Calc::DateToDays(21, 8, -4713), '-4713 08 21');
-compare('-4713 08 22', $hs_date = Date_Calc::DaysToDate(-94, "%Y %m %d"), '-94');
-compare(-94, Date_Calc::DateToDays(22, 8, -4713), '-4713 08 22');
-compare('-4713 08 23', $hs_date = Date_Calc::DaysToDate(-93, "%Y %m %d"), '-93');
-compare(-93, Date_Calc::DateToDays(23, 8, -4713), '-4713 08 23');
-compare('-4713 08 24', $hs_date = Date_Calc::DaysToDate(-92, "%Y %m %d"), '-92');
-compare(-92, Date_Calc::DateToDays(24, 8, -4713), '-4713 08 24');
-compare('-4713 08 25', $hs_date = Date_Calc::DaysToDate(-91, "%Y %m %d"), '-91');
-compare(-91, Date_Calc::DateToDays(25, 8, -4713), '-4713 08 25');
-compare('-4713 08 26', $hs_date = Date_Calc::DaysToDate(-90, "%Y %m %d"), '-90');
-compare(-90, Date_Calc::DateToDays(26, 8, -4713), '-4713 08 26');
-compare('-4713 08 27', $hs_date = Date_Calc::DaysToDate(-89, "%Y %m %d"), '-89');
-compare(-89, Date_Calc::DateToDays(27, 8, -4713), '-4713 08 27');
-compare('-4713 08 28', $hs_date = Date_Calc::DaysToDate(-88, "%Y %m %d"), '-88');
-compare(-88, Date_Calc::DateToDays(28, 8, -4713), '-4713 08 28');
-compare('-4713 08 29', $hs_date = Date_Calc::DaysToDate(-87, "%Y %m %d"), '-87');
-compare(-87, Date_Calc::DateToDays(29, 8, -4713), '-4713 08 29');
-compare('-4713 08 30', $hs_date = Date_Calc::DaysToDate(-86, "%Y %m %d"), '-86');
-compare(-86, Date_Calc::DateToDays(30, 8, -4713), '-4713 08 30');
-compare('-4713 08 31', $hs_date = Date_Calc::DaysToDate(-85, "%Y %m %d"), '-85');
-compare(-85, Date_Calc::DateToDays(31, 8, -4713), '-4713 08 31');
-compare('-4713 09 01', $hs_date = Date_Calc::DaysToDate(-84, "%Y %m %d"), '-84');
-compare(-84, Date_Calc::DateToDays(1, 9, -4713), '-4713 09 01');
-compare('-4713 09 02', $hs_date = Date_Calc::DaysToDate(-83, "%Y %m %d"), '-83');
-compare(-83, Date_Calc::DateToDays(2, 9, -4713), '-4713 09 02');
-compare('-4713 09 03', $hs_date = Date_Calc::DaysToDate(-82, "%Y %m %d"), '-82');
-compare(-82, Date_Calc::DateToDays(3, 9, -4713), '-4713 09 03');
-compare('-4713 09 04', $hs_date = Date_Calc::DaysToDate(-81, "%Y %m %d"), '-81');
-compare(-81, Date_Calc::DateToDays(4, 9, -4713), '-4713 09 04');
-compare('-4713 09 05', $hs_date = Date_Calc::DaysToDate(-80, "%Y %m %d"), '-80');
-compare(-80, Date_Calc::DateToDays(5, 9, -4713), '-4713 09 05');
-compare('-4713 09 06', $hs_date = Date_Calc::DaysToDate(-79, "%Y %m %d"), '-79');
-compare(-79, Date_Calc::DateToDays(6, 9, -4713), '-4713 09 06');
-compare('-4713 09 07', $hs_date = Date_Calc::DaysToDate(-78, "%Y %m %d"), '-78');
-compare(-78, Date_Calc::DateToDays(7, 9, -4713), '-4713 09 07');
-compare('-4713 09 08', $hs_date = Date_Calc::DaysToDate(-77, "%Y %m %d"), '-77');
-compare(-77, Date_Calc::DateToDays(8, 9, -4713), '-4713 09 08');
-compare('-4713 09 09', $hs_date = Date_Calc::DaysToDate(-76, "%Y %m %d"), '-76');
-compare(-76, Date_Calc::DateToDays(9, 9, -4713), '-4713 09 09');
-compare('-4713 09 10', $hs_date = Date_Calc::DaysToDate(-75, "%Y %m %d"), '-75');
-compare(-75, Date_Calc::DateToDays(10, 9, -4713), '-4713 09 10');
-compare('-4713 09 11', $hs_date = Date_Calc::DaysToDate(-74, "%Y %m %d"), '-74');
-compare(-74, Date_Calc::DateToDays(11, 9, -4713), '-4713 09 11');
-compare('-4713 09 12', $hs_date = Date_Calc::DaysToDate(-73, "%Y %m %d"), '-73');
-compare(-73, Date_Calc::DateToDays(12, 9, -4713), '-4713 09 12');
-compare('-4713 09 13', $hs_date = Date_Calc::DaysToDate(-72, "%Y %m %d"), '-72');
-compare(-72, Date_Calc::DateToDays(13, 9, -4713), '-4713 09 13');
-compare('-4713 09 14', $hs_date = Date_Calc::DaysToDate(-71, "%Y %m %d"), '-71');
-compare(-71, Date_Calc::DateToDays(14, 9, -4713), '-4713 09 14');
-compare('-4713 09 15', $hs_date = Date_Calc::DaysToDate(-70, "%Y %m %d"), '-70');
-compare(-70, Date_Calc::DateToDays(15, 9, -4713), '-4713 09 15');
-compare('-4713 09 16', $hs_date = Date_Calc::DaysToDate(-69, "%Y %m %d"), '-69');
-compare(-69, Date_Calc::DateToDays(16, 9, -4713), '-4713 09 16');
-compare('-4713 09 17', $hs_date = Date_Calc::DaysToDate(-68, "%Y %m %d"), '-68');
-compare(-68, Date_Calc::DateToDays(17, 9, -4713), '-4713 09 17');
-compare('-4713 09 18', $hs_date = Date_Calc::DaysToDate(-67, "%Y %m %d"), '-67');
-compare(-67, Date_Calc::DateToDays(18, 9, -4713), '-4713 09 18');
-compare('-4713 09 19', $hs_date = Date_Calc::DaysToDate(-66, "%Y %m %d"), '-66');
-compare(-66, Date_Calc::DateToDays(19, 9, -4713), '-4713 09 19');
-compare('-4713 09 20', $hs_date = Date_Calc::DaysToDate(-65, "%Y %m %d"), '-65');
-compare(-65, Date_Calc::DateToDays(20, 9, -4713), '-4713 09 20');
-compare('-4713 09 21', $hs_date = Date_Calc::DaysToDate(-64, "%Y %m %d"), '-64');
-compare(-64, Date_Calc::DateToDays(21, 9, -4713), '-4713 09 21');
-compare('-4713 09 22', $hs_date = Date_Calc::DaysToDate(-63, "%Y %m %d"), '-63');
-compare(-63, Date_Calc::DateToDays(22, 9, -4713), '-4713 09 22');
-compare('-4713 09 23', $hs_date = Date_Calc::DaysToDate(-62, "%Y %m %d"), '-62');
-compare(-62, Date_Calc::DateToDays(23, 9, -4713), '-4713 09 23');
-compare('-4713 09 24', $hs_date = Date_Calc::DaysToDate(-61, "%Y %m %d"), '-61');
-compare(-61, Date_Calc::DateToDays(24, 9, -4713), '-4713 09 24');
-compare('-4713 09 25', $hs_date = Date_Calc::DaysToDate(-60, "%Y %m %d"), '-60');
-compare(-60, Date_Calc::DateToDays(25, 9, -4713), '-4713 09 25');
-compare('-4713 09 26', $hs_date = Date_Calc::DaysToDate(-59, "%Y %m %d"), '-59');
-compare(-59, Date_Calc::DateToDays(26, 9, -4713), '-4713 09 26');
-compare('-4713 09 27', $hs_date = Date_Calc::DaysToDate(-58, "%Y %m %d"), '-58');
-compare(-58, Date_Calc::DateToDays(27, 9, -4713), '-4713 09 27');
-compare('-4713 09 28', $hs_date = Date_Calc::DaysToDate(-57, "%Y %m %d"), '-57');
-compare(-57, Date_Calc::DateToDays(28, 9, -4713), '-4713 09 28');
-compare('-4713 09 29', $hs_date = Date_Calc::DaysToDate(-56, "%Y %m %d"), '-56');
-compare(-56, Date_Calc::DateToDays(29, 9, -4713), '-4713 09 29');
-compare('-4713 09 30', $hs_date = Date_Calc::DaysToDate(-55, "%Y %m %d"), '-55');
-compare(-55, Date_Calc::DateToDays(30, 9, -4713), '-4713 09 30');
-compare('-4713 10 01', $hs_date = Date_Calc::DaysToDate(-54, "%Y %m %d"), '-54');
-compare(-54, Date_Calc::DateToDays(1, 10, -4713), '-4713 10 01');
-compare('-4713 10 02', $hs_date = Date_Calc::DaysToDate(-53, "%Y %m %d"), '-53');
-compare(-53, Date_Calc::DateToDays(2, 10, -4713), '-4713 10 02');
-compare('-4713 10 03', $hs_date = Date_Calc::DaysToDate(-52, "%Y %m %d"), '-52');
-compare(-52, Date_Calc::DateToDays(3, 10, -4713), '-4713 10 03');
-compare('-4713 10 04', $hs_date = Date_Calc::DaysToDate(-51, "%Y %m %d"), '-51');
-compare(-51, Date_Calc::DateToDays(4, 10, -4713), '-4713 10 04');
-compare('-4713 10 05', $hs_date = Date_Calc::DaysToDate(-50, "%Y %m %d"), '-50');
-compare(-50, Date_Calc::DateToDays(5, 10, -4713), '-4713 10 05');
-compare('-4713 10 06', $hs_date = Date_Calc::DaysToDate(-49, "%Y %m %d"), '-49');
-compare(-49, Date_Calc::DateToDays(6, 10, -4713), '-4713 10 06');
-compare('-4713 10 07', $hs_date = Date_Calc::DaysToDate(-48, "%Y %m %d"), '-48');
-compare(-48, Date_Calc::DateToDays(7, 10, -4713), '-4713 10 07');
-compare('-4713 10 08', $hs_date = Date_Calc::DaysToDate(-47, "%Y %m %d"), '-47');
-compare(-47, Date_Calc::DateToDays(8, 10, -4713), '-4713 10 08');
-compare('-4713 10 09', $hs_date = Date_Calc::DaysToDate(-46, "%Y %m %d"), '-46');
-compare(-46, Date_Calc::DateToDays(9, 10, -4713), '-4713 10 09');
-compare('-4713 10 10', $hs_date = Date_Calc::DaysToDate(-45, "%Y %m %d"), '-45');
-compare(-45, Date_Calc::DateToDays(10, 10, -4713), '-4713 10 10');
-compare('-4713 10 11', $hs_date = Date_Calc::DaysToDate(-44, "%Y %m %d"), '-44');
-compare(-44, Date_Calc::DateToDays(11, 10, -4713), '-4713 10 11');
-compare('-4713 10 12', $hs_date = Date_Calc::DaysToDate(-43, "%Y %m %d"), '-43');
-compare(-43, Date_Calc::DateToDays(12, 10, -4713), '-4713 10 12');
-compare('-4713 10 13', $hs_date = Date_Calc::DaysToDate(-42, "%Y %m %d"), '-42');
-compare(-42, Date_Calc::DateToDays(13, 10, -4713), '-4713 10 13');
-compare('-4713 10 14', $hs_date = Date_Calc::DaysToDate(-41, "%Y %m %d"), '-41');
-compare(-41, Date_Calc::DateToDays(14, 10, -4713), '-4713 10 14');
-compare('-4713 10 15', $hs_date = Date_Calc::DaysToDate(-40, "%Y %m %d"), '-40');
-compare(-40, Date_Calc::DateToDays(15, 10, -4713), '-4713 10 15');
-compare('-4713 10 16', $hs_date = Date_Calc::DaysToDate(-39, "%Y %m %d"), '-39');
-compare(-39, Date_Calc::DateToDays(16, 10, -4713), '-4713 10 16');
-compare('-4713 10 17', $hs_date = Date_Calc::DaysToDate(-38, "%Y %m %d"), '-38');
-compare(-38, Date_Calc::DateToDays(17, 10, -4713), '-4713 10 17');
-compare('-4713 10 18', $hs_date = Date_Calc::DaysToDate(-37, "%Y %m %d"), '-37');
-compare(-37, Date_Calc::DateToDays(18, 10, -4713), '-4713 10 18');
-compare('-4713 10 19', $hs_date = Date_Calc::DaysToDate(-36, "%Y %m %d"), '-36');
-compare(-36, Date_Calc::DateToDays(19, 10, -4713), '-4713 10 19');
-compare('-4713 10 20', $hs_date = Date_Calc::DaysToDate(-35, "%Y %m %d"), '-35');
-compare(-35, Date_Calc::DateToDays(20, 10, -4713), '-4713 10 20');
-compare('-4713 10 21', $hs_date = Date_Calc::DaysToDate(-34, "%Y %m %d"), '-34');
-compare(-34, Date_Calc::DateToDays(21, 10, -4713), '-4713 10 21');
-compare('-4713 10 22', $hs_date = Date_Calc::DaysToDate(-33, "%Y %m %d"), '-33');
-compare(-33, Date_Calc::DateToDays(22, 10, -4713), '-4713 10 22');
-compare('-4713 10 23', $hs_date = Date_Calc::DaysToDate(-32, "%Y %m %d"), '-32');
-compare(-32, Date_Calc::DateToDays(23, 10, -4713), '-4713 10 23');
-compare('-4713 10 24', $hs_date = Date_Calc::DaysToDate(-31, "%Y %m %d"), '-31');
-compare(-31, Date_Calc::DateToDays(24, 10, -4713), '-4713 10 24');
-compare('-4713 10 25', $hs_date = Date_Calc::DaysToDate(-30, "%Y %m %d"), '-30');
-compare(-30, Date_Calc::DateToDays(25, 10, -4713), '-4713 10 25');
-compare('-4713 10 26', $hs_date = Date_Calc::DaysToDate(-29, "%Y %m %d"), '-29');
-compare(-29, Date_Calc::DateToDays(26, 10, -4713), '-4713 10 26');
-compare('-4713 10 27', $hs_date = Date_Calc::DaysToDate(-28, "%Y %m %d"), '-28');
-compare(-28, Date_Calc::DateToDays(27, 10, -4713), '-4713 10 27');
-compare('-4713 10 28', $hs_date = Date_Calc::DaysToDate(-27, "%Y %m %d"), '-27');
-compare(-27, Date_Calc::DateToDays(28, 10, -4713), '-4713 10 28');
-compare('-4713 10 29', $hs_date = Date_Calc::DaysToDate(-26, "%Y %m %d"), '-26');
-compare(-26, Date_Calc::DateToDays(29, 10, -4713), '-4713 10 29');
-compare('-4713 10 30', $hs_date = Date_Calc::DaysToDate(-25, "%Y %m %d"), '-25');
-compare(-25, Date_Calc::DateToDays(30, 10, -4713), '-4713 10 30');
-compare('-4713 10 31', $hs_date = Date_Calc::DaysToDate(-24, "%Y %m %d"), '-24');
-compare(-24, Date_Calc::DateToDays(31, 10, -4713), '-4713 10 31');
-compare('-4713 11 01', $hs_date = Date_Calc::DaysToDate(-23, "%Y %m %d"), '-23');
-compare(-23, Date_Calc::DateToDays(1, 11, -4713), '-4713 11 01');
-compare('-4713 11 02', $hs_date = Date_Calc::DaysToDate(-22, "%Y %m %d"), '-22');
-compare(-22, Date_Calc::DateToDays(2, 11, -4713), '-4713 11 02');
-compare('-4713 11 03', $hs_date = Date_Calc::DaysToDate(-21, "%Y %m %d"), '-21');
-compare(-21, Date_Calc::DateToDays(3, 11, -4713), '-4713 11 03');
-compare('-4713 11 04', $hs_date = Date_Calc::DaysToDate(-20, "%Y %m %d"), '-20');
-compare(-20, Date_Calc::DateToDays(4, 11, -4713), '-4713 11 04');
-compare('-4713 11 05', $hs_date = Date_Calc::DaysToDate(-19, "%Y %m %d"), '-19');
-compare(-19, Date_Calc::DateToDays(5, 11, -4713), '-4713 11 05');
-compare('-4713 11 06', $hs_date = Date_Calc::DaysToDate(-18, "%Y %m %d"), '-18');
-compare(-18, Date_Calc::DateToDays(6, 11, -4713), '-4713 11 06');
-compare('-4713 11 07', $hs_date = Date_Calc::DaysToDate(-17, "%Y %m %d"), '-17');
-compare(-17, Date_Calc::DateToDays(7, 11, -4713), '-4713 11 07');
-compare('-4713 11 08', $hs_date = Date_Calc::DaysToDate(-16, "%Y %m %d"), '-16');
-compare(-16, Date_Calc::DateToDays(8, 11, -4713), '-4713 11 08');
-compare('-4713 11 09', $hs_date = Date_Calc::DaysToDate(-15, "%Y %m %d"), '-15');
-compare(-15, Date_Calc::DateToDays(9, 11, -4713), '-4713 11 09');
-compare('-4713 11 10', $hs_date = Date_Calc::DaysToDate(-14, "%Y %m %d"), '-14');
-compare(-14, Date_Calc::DateToDays(10, 11, -4713), '-4713 11 10');
-compare('-4713 11 11', $hs_date = Date_Calc::DaysToDate(-13, "%Y %m %d"), '-13');
-compare(-13, Date_Calc::DateToDays(11, 11, -4713), '-4713 11 11');
-compare('-4713 11 12', $hs_date = Date_Calc::DaysToDate(-12, "%Y %m %d"), '-12');
-compare(-12, Date_Calc::DateToDays(12, 11, -4713), '-4713 11 12');
-compare('-4713 11 13', $hs_date = Date_Calc::DaysToDate(-11, "%Y %m %d"), '-11');
-compare(-11, Date_Calc::DateToDays(13, 11, -4713), '-4713 11 13');
-compare('-4713 11 14', $hs_date = Date_Calc::DaysToDate(-10, "%Y %m %d"), '-10');
-compare(-10, Date_Calc::DateToDays(14, 11, -4713), '-4713 11 14');
-compare('-4713 11 15', $hs_date = Date_Calc::DaysToDate(-9, "%Y %m %d"), '-9');
-compare(-9, Date_Calc::DateToDays(15, 11, -4713), '-4713 11 15');
-compare('-4713 11 16', $hs_date = Date_Calc::DaysToDate(-8, "%Y %m %d"), '-8');
-compare(-8, Date_Calc::DateToDays(16, 11, -4713), '-4713 11 16');
-compare('-4713 11 17', $hs_date = Date_Calc::DaysToDate(-7, "%Y %m %d"), '-7');
-compare(-7, Date_Calc::DateToDays(17, 11, -4713), '-4713 11 17');
-compare('-4713 11 18', $hs_date = Date_Calc::DaysToDate(-6, "%Y %m %d"), '-6');
-compare(-6, Date_Calc::DateToDays(18, 11, -4713), '-4713 11 18');
-compare('-4713 11 19', $hs_date = Date_Calc::DaysToDate(-5, "%Y %m %d"), '-5');
-compare(-5, Date_Calc::DateToDays(19, 11, -4713), '-4713 11 19');
-compare('-4713 11 20', $hs_date = Date_Calc::DaysToDate(-4, "%Y %m %d"), '-4');
-compare(-4, Date_Calc::DateToDays(20, 11, -4713), '-4713 11 20');
-compare('-4713 11 21', $hs_date = Date_Calc::DaysToDate(-3, "%Y %m %d"), '-3');
-compare(-3, Date_Calc::DateToDays(21, 11, -4713), '-4713 11 21');
-compare('-4713 11 22', $hs_date = Date_Calc::DaysToDate(-2, "%Y %m %d"), '-2');
-compare(-2, Date_Calc::DateToDays(22, 11, -4713), '-4713 11 22');
-compare('-4713 11 23', $hs_date = Date_Calc::DaysToDate(-1, "%Y %m %d"), '-1');
-compare(-1, Date_Calc::DateToDays(23, 11, -4713), '-4713 11 23');
-compare('-4713 11 24', $hs_date = Date_Calc::DaysToDate(0, "%Y %m %d"), '0');
-compare(0, Date_Calc::DateToDays(24, 11, -4713), '-4713 11 24');
-compare('-4713 11 25', $hs_date = Date_Calc::DaysToDate(1, "%Y %m %d"), '1');
-compare(1, Date_Calc::DateToDays(25, 11, -4713), '-4713 11 25');
-compare('-4713 11 26', $hs_date = Date_Calc::DaysToDate(2, "%Y %m %d"), '2');
-compare(2, Date_Calc::DateToDays(26, 11, -4713), '-4713 11 26');
-compare('-4713 11 27', $hs_date = Date_Calc::DaysToDate(3, "%Y %m %d"), '3');
-compare(3, Date_Calc::DateToDays(27, 11, -4713), '-4713 11 27');
-compare('-4713 11 28', $hs_date = Date_Calc::DaysToDate(4, "%Y %m %d"), '4');
-compare(4, Date_Calc::DateToDays(28, 11, -4713), '-4713 11 28');
-compare('-4713 11 29', $hs_date = Date_Calc::DaysToDate(5, "%Y %m %d"), '5');
-compare(5, Date_Calc::DateToDays(29, 11, -4713), '-4713 11 29');
-compare('-4713 11 30', $hs_date = Date_Calc::DaysToDate(6, "%Y %m %d"), '6');
-compare(6, Date_Calc::DateToDays(30, 11, -4713), '-4713 11 30');
-compare('-4713 12 01', $hs_date = Date_Calc::DaysToDate(7, "%Y %m %d"), '7');
-compare(7, Date_Calc::DateToDays(1, 12, -4713), '-4713 12 01');
-compare('-4713 12 02', $hs_date = Date_Calc::DaysToDate(8, "%Y %m %d"), '8');
-compare(8, Date_Calc::DateToDays(2, 12, -4713), '-4713 12 02');
-compare('-4713 12 03', $hs_date = Date_Calc::DaysToDate(9, "%Y %m %d"), '9');
-compare(9, Date_Calc::DateToDays(3, 12, -4713), '-4713 12 03');
-compare('-4713 12 04', $hs_date = Date_Calc::DaysToDate(10, "%Y %m %d"), '10');
-compare(10, Date_Calc::DateToDays(4, 12, -4713), '-4713 12 04');
-compare('-4713 12 05', $hs_date = Date_Calc::DaysToDate(11, "%Y %m %d"), '11');
-compare(11, Date_Calc::DateToDays(5, 12, -4713), '-4713 12 05');
-compare('-4713 12 06', $hs_date = Date_Calc::DaysToDate(12, "%Y %m %d"), '12');
-compare(12, Date_Calc::DateToDays(6, 12, -4713), '-4713 12 06');
-compare('-4713 12 07', $hs_date = Date_Calc::DaysToDate(13, "%Y %m %d"), '13');
-compare(13, Date_Calc::DateToDays(7, 12, -4713), '-4713 12 07');
-compare('-4713 12 08', $hs_date = Date_Calc::DaysToDate(14, "%Y %m %d"), '14');
-compare(14, Date_Calc::DateToDays(8, 12, -4713), '-4713 12 08');
-compare('-4713 12 09', $hs_date = Date_Calc::DaysToDate(15, "%Y %m %d"), '15');
-compare(15, Date_Calc::DateToDays(9, 12, -4713), '-4713 12 09');
-compare('-4713 12 10', $hs_date = Date_Calc::DaysToDate(16, "%Y %m %d"), '16');
-compare(16, Date_Calc::DateToDays(10, 12, -4713), '-4713 12 10');
-compare('-4713 12 11', $hs_date = Date_Calc::DaysToDate(17, "%Y %m %d"), '17');
-compare(17, Date_Calc::DateToDays(11, 12, -4713), '-4713 12 11');
-compare('-4713 12 12', $hs_date = Date_Calc::DaysToDate(18, "%Y %m %d"), '18');
-compare(18, Date_Calc::DateToDays(12, 12, -4713), '-4713 12 12');
-compare('-4713 12 13', $hs_date = Date_Calc::DaysToDate(19, "%Y %m %d"), '19');
-compare(19, Date_Calc::DateToDays(13, 12, -4713), '-4713 12 13');
-compare('-4713 12 14', $hs_date = Date_Calc::DaysToDate(20, "%Y %m %d"), '20');
-compare(20, Date_Calc::DateToDays(14, 12, -4713), '-4713 12 14');
-compare('-4713 12 15', $hs_date = Date_Calc::DaysToDate(21, "%Y %m %d"), '21');
-compare(21, Date_Calc::DateToDays(15, 12, -4713), '-4713 12 15');
-compare('-4713 12 16', $hs_date = Date_Calc::DaysToDate(22, "%Y %m %d"), '22');
-compare(22, Date_Calc::DateToDays(16, 12, -4713), '-4713 12 16');
-compare('-4713 12 17', $hs_date = Date_Calc::DaysToDate(23, "%Y %m %d"), '23');
-compare(23, Date_Calc::DateToDays(17, 12, -4713), '-4713 12 17');
-compare('-4713 12 18', $hs_date = Date_Calc::DaysToDate(24, "%Y %m %d"), '24');
-compare(24, Date_Calc::DateToDays(18, 12, -4713), '-4713 12 18');
-compare('-4713 12 19', $hs_date = Date_Calc::DaysToDate(25, "%Y %m %d"), '25');
-compare(25, Date_Calc::DateToDays(19, 12, -4713), '-4713 12 19');
-compare('-4713 12 20', $hs_date = Date_Calc::DaysToDate(26, "%Y %m %d"), '26');
-compare(26, Date_Calc::DateToDays(20, 12, -4713), '-4713 12 20');
-compare('-4713 12 21', $hs_date = Date_Calc::DaysToDate(27, "%Y %m %d"), '27');
-compare(27, Date_Calc::DateToDays(21, 12, -4713), '-4713 12 21');
-compare('-4713 12 22', $hs_date = Date_Calc::DaysToDate(28, "%Y %m %d"), '28');
-compare(28, Date_Calc::DateToDays(22, 12, -4713), '-4713 12 22');
-compare('-4713 12 23', $hs_date = Date_Calc::DaysToDate(29, "%Y %m %d"), '29');
-compare(29, Date_Calc::DateToDays(23, 12, -4713), '-4713 12 23');
-compare('-4713 12 24', $hs_date = Date_Calc::DaysToDate(30, "%Y %m %d"), '30');
-compare(30, Date_Calc::DateToDays(24, 12, -4713), '-4713 12 24');
-compare('-4713 12 25', $hs_date = Date_Calc::DaysToDate(31, "%Y %m %d"), '31');
-compare(31, Date_Calc::DateToDays(25, 12, -4713), '-4713 12 25');
-compare('-4713 12 26', $hs_date = Date_Calc::DaysToDate(32, "%Y %m %d"), '32');
-compare(32, Date_Calc::DateToDays(26, 12, -4713), '-4713 12 26');
-compare('-4713 12 27', $hs_date = Date_Calc::DaysToDate(33, "%Y %m %d"), '33');
-compare(33, Date_Calc::DateToDays(27, 12, -4713), '-4713 12 27');
-compare('-4713 12 28', $hs_date = Date_Calc::DaysToDate(34, "%Y %m %d"), '34');
-compare(34, Date_Calc::DateToDays(28, 12, -4713), '-4713 12 28');
-compare('-4713 12 29', $hs_date = Date_Calc::DaysToDate(35, "%Y %m %d"), '35');
-compare(35, Date_Calc::DateToDays(29, 12, -4713), '-4713 12 29');
-compare('-4713 12 30', $hs_date = Date_Calc::DaysToDate(36, "%Y %m %d"), '36');
-compare(36, Date_Calc::DateToDays(30, 12, -4713), '-4713 12 30');
-compare('-4713 12 31', $hs_date = Date_Calc::DaysToDate(37, "%Y %m %d"), '37');
-compare(37, Date_Calc::DateToDays(31, 12, -4713), '-4713 12 31');
-compare('-4712 01 01', $hs_date = Date_Calc::DaysToDate(38, "%Y %m %d"), '38');
-compare(38, Date_Calc::DateToDays(1, 1, -4712), '-4712 01 01');
-compare('-4712 01 02', $hs_date = Date_Calc::DaysToDate(39, "%Y %m %d"), '39');
-compare(39, Date_Calc::DateToDays(2, 1, -4712), '-4712 01 02');
-compare('-4712 01 03', $hs_date = Date_Calc::DaysToDate(40, "%Y %m %d"), '40');
-compare(40, Date_Calc::DateToDays(3, 1, -4712), '-4712 01 03');
-compare('-4712 01 04', $hs_date = Date_Calc::DaysToDate(41, "%Y %m %d"), '41');
-compare(41, Date_Calc::DateToDays(4, 1, -4712), '-4712 01 04');
-compare('-4712 01 05', $hs_date = Date_Calc::DaysToDate(42, "%Y %m %d"), '42');
-compare(42, Date_Calc::DateToDays(5, 1, -4712), '-4712 01 05');
-compare('-4712 01 06', $hs_date = Date_Calc::DaysToDate(43, "%Y %m %d"), '43');
-compare(43, Date_Calc::DateToDays(6, 1, -4712), '-4712 01 06');
-compare('-4712 01 07', $hs_date = Date_Calc::DaysToDate(44, "%Y %m %d"), '44');
-compare(44, Date_Calc::DateToDays(7, 1, -4712), '-4712 01 07');
-compare('-4712 01 08', $hs_date = Date_Calc::DaysToDate(45, "%Y %m %d"), '45');
-compare(45, Date_Calc::DateToDays(8, 1, -4712), '-4712 01 08');
-compare('-4712 01 09', $hs_date = Date_Calc::DaysToDate(46, "%Y %m %d"), '46');
-compare(46, Date_Calc::DateToDays(9, 1, -4712), '-4712 01 09');
-compare('-4712 01 10', $hs_date = Date_Calc::DaysToDate(47, "%Y %m %d"), '47');
-compare(47, Date_Calc::DateToDays(10, 1, -4712), '-4712 01 10');
-compare('-4712 01 11', $hs_date = Date_Calc::DaysToDate(48, "%Y %m %d"), '48');
-compare(48, Date_Calc::DateToDays(11, 1, -4712), '-4712 01 11');
-compare('-4712 01 12', $hs_date = Date_Calc::DaysToDate(49, "%Y %m %d"), '49');
-compare(49, Date_Calc::DateToDays(12, 1, -4712), '-4712 01 12');
-compare('-4712 01 13', $hs_date = Date_Calc::DaysToDate(50, "%Y %m %d"), '50');
-compare(50, Date_Calc::DateToDays(13, 1, -4712), '-4712 01 13');
-compare('-4712 01 14', $hs_date = Date_Calc::DaysToDate(51, "%Y %m %d"), '51');
-compare(51, Date_Calc::DateToDays(14, 1, -4712), '-4712 01 14');
-compare('-4712 01 15', $hs_date = Date_Calc::DaysToDate(52, "%Y %m %d"), '52');
-compare(52, Date_Calc::DateToDays(15, 1, -4712), '-4712 01 15');
-compare('-4712 01 16', $hs_date = Date_Calc::DaysToDate(53, "%Y %m %d"), '53');
-compare(53, Date_Calc::DateToDays(16, 1, -4712), '-4712 01 16');
-compare('-4712 01 17', $hs_date = Date_Calc::DaysToDate(54, "%Y %m %d"), '54');
-compare(54, Date_Calc::DateToDays(17, 1, -4712), '-4712 01 17');
-compare('-4712 01 18', $hs_date = Date_Calc::DaysToDate(55, "%Y %m %d"), '55');
-compare(55, Date_Calc::DateToDays(18, 1, -4712), '-4712 01 18');
-compare('-4712 01 19', $hs_date = Date_Calc::DaysToDate(56, "%Y %m %d"), '56');
-compare(56, Date_Calc::DateToDays(19, 1, -4712), '-4712 01 19');
-compare('-4712 01 20', $hs_date = Date_Calc::DaysToDate(57, "%Y %m %d"), '57');
-compare(57, Date_Calc::DateToDays(20, 1, -4712), '-4712 01 20');
-compare('-4712 01 21', $hs_date = Date_Calc::DaysToDate(58, "%Y %m %d"), '58');
-compare(58, Date_Calc::DateToDays(21, 1, -4712), '-4712 01 21');
-compare('-4712 01 22', $hs_date = Date_Calc::DaysToDate(59, "%Y %m %d"), '59');
-compare(59, Date_Calc::DateToDays(22, 1, -4712), '-4712 01 22');
-compare('-4712 01 23', $hs_date = Date_Calc::DaysToDate(60, "%Y %m %d"), '60');
-compare(60, Date_Calc::DateToDays(23, 1, -4712), '-4712 01 23');
-compare('-4712 01 24', $hs_date = Date_Calc::DaysToDate(61, "%Y %m %d"), '61');
-compare(61, Date_Calc::DateToDays(24, 1, -4712), '-4712 01 24');
-compare('-4712 01 25', $hs_date = Date_Calc::DaysToDate(62, "%Y %m %d"), '62');
-compare(62, Date_Calc::DateToDays(25, 1, -4712), '-4712 01 25');
-compare('-4712 01 26', $hs_date = Date_Calc::DaysToDate(63, "%Y %m %d"), '63');
-compare(63, Date_Calc::DateToDays(26, 1, -4712), '-4712 01 26');
-compare('-4712 01 27', $hs_date = Date_Calc::DaysToDate(64, "%Y %m %d"), '64');
-compare(64, Date_Calc::DateToDays(27, 1, -4712), '-4712 01 27');
-compare('-4712 01 28', $hs_date = Date_Calc::DaysToDate(65, "%Y %m %d"), '65');
-compare(65, Date_Calc::DateToDays(28, 1, -4712), '-4712 01 28');
-compare('-4712 01 29', $hs_date = Date_Calc::DaysToDate(66, "%Y %m %d"), '66');
-compare(66, Date_Calc::DateToDays(29, 1, -4712), '-4712 01 29');
-compare('-4712 01 30', $hs_date = Date_Calc::DaysToDate(67, "%Y %m %d"), '67');
-compare(67, Date_Calc::DateToDays(30, 1, -4712), '-4712 01 30');
-compare('-4712 01 31', $hs_date = Date_Calc::DaysToDate(68, "%Y %m %d"), '68');
-compare(68, Date_Calc::DateToDays(31, 1, -4712), '-4712 01 31');
-compare('-4712 02 01', $hs_date = Date_Calc::DaysToDate(69, "%Y %m %d"), '69');
-compare(69, Date_Calc::DateToDays(1, 2, -4712), '-4712 02 01');
-compare('-4712 02 02', $hs_date = Date_Calc::DaysToDate(70, "%Y %m %d"), '70');
-compare(70, Date_Calc::DateToDays(2, 2, -4712), '-4712 02 02');
-compare('-4712 02 03', $hs_date = Date_Calc::DaysToDate(71, "%Y %m %d"), '71');
-compare(71, Date_Calc::DateToDays(3, 2, -4712), '-4712 02 03');
-compare('-4712 02 04', $hs_date = Date_Calc::DaysToDate(72, "%Y %m %d"), '72');
-compare(72, Date_Calc::DateToDays(4, 2, -4712), '-4712 02 04');
-compare('-4712 02 05', $hs_date = Date_Calc::DaysToDate(73, "%Y %m %d"), '73');
-compare(73, Date_Calc::DateToDays(5, 2, -4712), '-4712 02 05');
-compare('-4712 02 06', $hs_date = Date_Calc::DaysToDate(74, "%Y %m %d"), '74');
-compare(74, Date_Calc::DateToDays(6, 2, -4712), '-4712 02 06');
-compare('-4712 02 07', $hs_date = Date_Calc::DaysToDate(75, "%Y %m %d"), '75');
-compare(75, Date_Calc::DateToDays(7, 2, -4712), '-4712 02 07');
-compare('-4712 02 08', $hs_date = Date_Calc::DaysToDate(76, "%Y %m %d"), '76');
-compare(76, Date_Calc::DateToDays(8, 2, -4712), '-4712 02 08');
-compare('-4712 02 09', $hs_date = Date_Calc::DaysToDate(77, "%Y %m %d"), '77');
-compare(77, Date_Calc::DateToDays(9, 2, -4712), '-4712 02 09');
-compare('-4712 02 10', $hs_date = Date_Calc::DaysToDate(78, "%Y %m %d"), '78');
-compare(78, Date_Calc::DateToDays(10, 2, -4712), '-4712 02 10');
-compare('-4712 02 11', $hs_date = Date_Calc::DaysToDate(79, "%Y %m %d"), '79');
-compare(79, Date_Calc::DateToDays(11, 2, -4712), '-4712 02 11');
-compare('-4712 02 12', $hs_date = Date_Calc::DaysToDate(80, "%Y %m %d"), '80');
-compare(80, Date_Calc::DateToDays(12, 2, -4712), '-4712 02 12');
-compare('-4712 02 13', $hs_date = Date_Calc::DaysToDate(81, "%Y %m %d"), '81');
-compare(81, Date_Calc::DateToDays(13, 2, -4712), '-4712 02 13');
-compare('-4712 02 14', $hs_date = Date_Calc::DaysToDate(82, "%Y %m %d"), '82');
-compare(82, Date_Calc::DateToDays(14, 2, -4712), '-4712 02 14');
-compare('-4712 02 15', $hs_date = Date_Calc::DaysToDate(83, "%Y %m %d"), '83');
-compare(83, Date_Calc::DateToDays(15, 2, -4712), '-4712 02 15');
-compare('-4712 02 16', $hs_date = Date_Calc::DaysToDate(84, "%Y %m %d"), '84');
-compare(84, Date_Calc::DateToDays(16, 2, -4712), '-4712 02 16');
-compare('-4712 02 17', $hs_date = Date_Calc::DaysToDate(85, "%Y %m %d"), '85');
-compare(85, Date_Calc::DateToDays(17, 2, -4712), '-4712 02 17');
-compare('-4712 02 18', $hs_date = Date_Calc::DaysToDate(86, "%Y %m %d"), '86');
-compare(86, Date_Calc::DateToDays(18, 2, -4712), '-4712 02 18');
-compare('-4712 02 19', $hs_date = Date_Calc::DaysToDate(87, "%Y %m %d"), '87');
-compare(87, Date_Calc::DateToDays(19, 2, -4712), '-4712 02 19');
-compare('-4712 02 20', $hs_date = Date_Calc::DaysToDate(88, "%Y %m %d"), '88');
-compare(88, Date_Calc::DateToDays(20, 2, -4712), '-4712 02 20');
-compare('-4712 02 21', $hs_date = Date_Calc::DaysToDate(89, "%Y %m %d"), '89');
-compare(89, Date_Calc::DateToDays(21, 2, -4712), '-4712 02 21');
-compare('-4712 02 22', $hs_date = Date_Calc::DaysToDate(90, "%Y %m %d"), '90');
-compare(90, Date_Calc::DateToDays(22, 2, -4712), '-4712 02 22');
-compare('-4712 02 23', $hs_date = Date_Calc::DaysToDate(91, "%Y %m %d"), '91');
-compare(91, Date_Calc::DateToDays(23, 2, -4712), '-4712 02 23');
-compare('-4712 02 24', $hs_date = Date_Calc::DaysToDate(92, "%Y %m %d"), '92');
-compare(92, Date_Calc::DateToDays(24, 2, -4712), '-4712 02 24');
-compare('-4712 02 25', $hs_date = Date_Calc::DaysToDate(93, "%Y %m %d"), '93');
-compare(93, Date_Calc::DateToDays(25, 2, -4712), '-4712 02 25');
-compare('-4712 02 26', $hs_date = Date_Calc::DaysToDate(94, "%Y %m %d"), '94');
-compare(94, Date_Calc::DateToDays(26, 2, -4712), '-4712 02 26');
-compare('-4712 02 27', $hs_date = Date_Calc::DaysToDate(95, "%Y %m %d"), '95');
-compare(95, Date_Calc::DateToDays(27, 2, -4712), '-4712 02 27');
-compare('-4712 02 28', $hs_date = Date_Calc::DaysToDate(96, "%Y %m %d"), '96');
-compare(96, Date_Calc::DateToDays(28, 2, -4712), '-4712 02 28');
-compare('-4712 02 29', $hs_date = Date_Calc::DaysToDate(97, "%Y %m %d"), '97');
-compare(97, Date_Calc::DateToDays(29, 2, -4712), '-4712 02 29');
-compare('-4712 03 01', $hs_date = Date_Calc::DaysToDate(98, "%Y %m %d"), '98');
-compare(98, Date_Calc::DateToDays(1, 3, -4712), '-4712 03 01');
-compare('-4712 03 02', $hs_date = Date_Calc::DaysToDate(99, "%Y %m %d"), '99');
-compare(99, Date_Calc::DateToDays(2, 3, -4712), '-4712 03 02');
-compare('-4712 03 03', $hs_date = Date_Calc::DaysToDate(100, "%Y %m %d"), '100');
-compare(100, Date_Calc::DateToDays(3, 3, -4712), '-4712 03 03');
-compare('-4712 03 04', $hs_date = Date_Calc::DaysToDate(101, "%Y %m %d"), '101');
-compare(101, Date_Calc::DateToDays(4, 3, -4712), '-4712 03 04');
-compare('-4712 03 05', $hs_date = Date_Calc::DaysToDate(102, "%Y %m %d"), '102');
-compare(102, Date_Calc::DateToDays(5, 3, -4712), '-4712 03 05');
-compare('-4712 03 06', $hs_date = Date_Calc::DaysToDate(103, "%Y %m %d"), '103');
-compare(103, Date_Calc::DateToDays(6, 3, -4712), '-4712 03 06');
-compare('-4712 03 07', $hs_date = Date_Calc::DaysToDate(104, "%Y %m %d"), '104');
-compare(104, Date_Calc::DateToDays(7, 3, -4712), '-4712 03 07');
-compare('-4712 03 08', $hs_date = Date_Calc::DaysToDate(105, "%Y %m %d"), '105');
-compare(105, Date_Calc::DateToDays(8, 3, -4712), '-4712 03 08');
-compare('-4712 03 09', $hs_date = Date_Calc::DaysToDate(106, "%Y %m %d"), '106');
-compare(106, Date_Calc::DateToDays(9, 3, -4712), '-4712 03 09');
-compare('-4712 03 10', $hs_date = Date_Calc::DaysToDate(107, "%Y %m %d"), '107');
-compare(107, Date_Calc::DateToDays(10, 3, -4712), '-4712 03 10');
-compare('-4712 03 11', $hs_date = Date_Calc::DaysToDate(108, "%Y %m %d"), '108');
-compare(108, Date_Calc::DateToDays(11, 3, -4712), '-4712 03 11');
-compare('-4712 03 12', $hs_date = Date_Calc::DaysToDate(109, "%Y %m %d"), '109');
-compare(109, Date_Calc::DateToDays(12, 3, -4712), '-4712 03 12');
-compare('-4712 03 13', $hs_date = Date_Calc::DaysToDate(110, "%Y %m %d"), '110');
-compare(110, Date_Calc::DateToDays(13, 3, -4712), '-4712 03 13');
-compare('-4712 03 14', $hs_date = Date_Calc::DaysToDate(111, "%Y %m %d"), '111');
-compare(111, Date_Calc::DateToDays(14, 3, -4712), '-4712 03 14');
-compare('-4712 03 15', $hs_date = Date_Calc::DaysToDate(112, "%Y %m %d"), '112');
-compare(112, Date_Calc::DateToDays(15, 3, -4712), '-4712 03 15');
-compare('-4712 03 16', $hs_date = Date_Calc::DaysToDate(113, "%Y %m %d"), '113');
-compare(113, Date_Calc::DateToDays(16, 3, -4712), '-4712 03 16');
-compare('-4712 03 17', $hs_date = Date_Calc::DaysToDate(114, "%Y %m %d"), '114');
-compare(114, Date_Calc::DateToDays(17, 3, -4712), '-4712 03 17');
-compare('-4712 03 18', $hs_date = Date_Calc::DaysToDate(115, "%Y %m %d"), '115');
-compare(115, Date_Calc::DateToDays(18, 3, -4712), '-4712 03 18');
-compare('-4712 03 19', $hs_date = Date_Calc::DaysToDate(116, "%Y %m %d"), '116');
-compare(116, Date_Calc::DateToDays(19, 3, -4712), '-4712 03 19');
-compare('-4712 03 20', $hs_date = Date_Calc::DaysToDate(117, "%Y %m %d"), '117');
-compare(117, Date_Calc::DateToDays(20, 3, -4712), '-4712 03 20');
-compare('-4712 03 21', $hs_date = Date_Calc::DaysToDate(118, "%Y %m %d"), '118');
-compare(118, Date_Calc::DateToDays(21, 3, -4712), '-4712 03 21');
-compare('-4712 03 22', $hs_date = Date_Calc::DaysToDate(119, "%Y %m %d"), '119');
-compare(119, Date_Calc::DateToDays(22, 3, -4712), '-4712 03 22');
-compare('-4712 03 23', $hs_date = Date_Calc::DaysToDate(120, "%Y %m %d"), '120');
-compare(120, Date_Calc::DateToDays(23, 3, -4712), '-4712 03 23');
-compare('-4712 03 24', $hs_date = Date_Calc::DaysToDate(121, "%Y %m %d"), '121');
-compare(121, Date_Calc::DateToDays(24, 3, -4712), '-4712 03 24');
-compare('-4712 03 25', $hs_date = Date_Calc::DaysToDate(122, "%Y %m %d"), '122');
-compare(122, Date_Calc::DateToDays(25, 3, -4712), '-4712 03 25');
-compare('-4712 03 26', $hs_date = Date_Calc::DaysToDate(123, "%Y %m %d"), '123');
-compare(123, Date_Calc::DateToDays(26, 3, -4712), '-4712 03 26');
-compare('-4712 03 27', $hs_date = Date_Calc::DaysToDate(124, "%Y %m %d"), '124');
-compare(124, Date_Calc::DateToDays(27, 3, -4712), '-4712 03 27');
-compare('-4712 03 28', $hs_date = Date_Calc::DaysToDate(125, "%Y %m %d"), '125');
-compare(125, Date_Calc::DateToDays(28, 3, -4712), '-4712 03 28');
-compare('-4712 03 29', $hs_date = Date_Calc::DaysToDate(126, "%Y %m %d"), '126');
-compare(126, Date_Calc::DateToDays(29, 3, -4712), '-4712 03 29');
-compare('-4712 03 30', $hs_date = Date_Calc::DaysToDate(127, "%Y %m %d"), '127');
-compare(127, Date_Calc::DateToDays(30, 3, -4712), '-4712 03 30');
-compare('-4712 03 31', $hs_date = Date_Calc::DaysToDate(128, "%Y %m %d"), '128');
-compare(128, Date_Calc::DateToDays(31, 3, -4712), '-4712 03 31');
-compare('-4712 04 01', $hs_date = Date_Calc::DaysToDate(129, "%Y %m %d"), '129');
-compare(129, Date_Calc::DateToDays(1, 4, -4712), '-4712 04 01');
-compare('-4712 04 02', $hs_date = Date_Calc::DaysToDate(130, "%Y %m %d"), '130');
-compare(130, Date_Calc::DateToDays(2, 4, -4712), '-4712 04 02');
-compare('-4712 04 03', $hs_date = Date_Calc::DaysToDate(131, "%Y %m %d"), '131');
-compare(131, Date_Calc::DateToDays(3, 4, -4712), '-4712 04 03');
-compare('-4712 04 04', $hs_date = Date_Calc::DaysToDate(132, "%Y %m %d"), '132');
-compare(132, Date_Calc::DateToDays(4, 4, -4712), '-4712 04 04');
-compare('-4712 04 05', $hs_date = Date_Calc::DaysToDate(133, "%Y %m %d"), '133');
-compare(133, Date_Calc::DateToDays(5, 4, -4712), '-4712 04 05');
-compare('-4712 04 06', $hs_date = Date_Calc::DaysToDate(134, "%Y %m %d"), '134');
-compare(134, Date_Calc::DateToDays(6, 4, -4712), '-4712 04 06');
-compare('-4712 04 07', $hs_date = Date_Calc::DaysToDate(135, "%Y %m %d"), '135');
-compare(135, Date_Calc::DateToDays(7, 4, -4712), '-4712 04 07');
-compare('-4712 04 08', $hs_date = Date_Calc::DaysToDate(136, "%Y %m %d"), '136');
-compare(136, Date_Calc::DateToDays(8, 4, -4712), '-4712 04 08');
-compare('-4712 04 09', $hs_date = Date_Calc::DaysToDate(137, "%Y %m %d"), '137');
-compare(137, Date_Calc::DateToDays(9, 4, -4712), '-4712 04 09');
-compare('-4712 04 10', $hs_date = Date_Calc::DaysToDate(138, "%Y %m %d"), '138');
-compare(138, Date_Calc::DateToDays(10, 4, -4712), '-4712 04 10');
-compare('-4712 04 11', $hs_date = Date_Calc::DaysToDate(139, "%Y %m %d"), '139');
-compare(139, Date_Calc::DateToDays(11, 4, -4712), '-4712 04 11');
-compare('-4712 04 12', $hs_date = Date_Calc::DaysToDate(140, "%Y %m %d"), '140');
-compare(140, Date_Calc::DateToDays(12, 4, -4712), '-4712 04 12');
-compare('-4712 04 13', $hs_date = Date_Calc::DaysToDate(141, "%Y %m %d"), '141');
-compare(141, Date_Calc::DateToDays(13, 4, -4712), '-4712 04 13');
-compare('-4712 04 14', $hs_date = Date_Calc::DaysToDate(142, "%Y %m %d"), '142');
-compare(142, Date_Calc::DateToDays(14, 4, -4712), '-4712 04 14');
-compare('-4712 04 15', $hs_date = Date_Calc::DaysToDate(143, "%Y %m %d"), '143');
-compare(143, Date_Calc::DateToDays(15, 4, -4712), '-4712 04 15');
-compare('-4712 04 16', $hs_date = Date_Calc::DaysToDate(144, "%Y %m %d"), '144');
-compare(144, Date_Calc::DateToDays(16, 4, -4712), '-4712 04 16');
-compare('-4712 04 17', $hs_date = Date_Calc::DaysToDate(145, "%Y %m %d"), '145');
-compare(145, Date_Calc::DateToDays(17, 4, -4712), '-4712 04 17');
-compare('-4712 04 18', $hs_date = Date_Calc::DaysToDate(146, "%Y %m %d"), '146');
-compare(146, Date_Calc::DateToDays(18, 4, -4712), '-4712 04 18');
-compare('-4712 04 19', $hs_date = Date_Calc::DaysToDate(147, "%Y %m %d"), '147');
-compare(147, Date_Calc::DateToDays(19, 4, -4712), '-4712 04 19');
-compare('-4712 04 20', $hs_date = Date_Calc::DaysToDate(148, "%Y %m %d"), '148');
-compare(148, Date_Calc::DateToDays(20, 4, -4712), '-4712 04 20');
-compare('-4712 04 21', $hs_date = Date_Calc::DaysToDate(149, "%Y %m %d"), '149');
-compare(149, Date_Calc::DateToDays(21, 4, -4712), '-4712 04 21');
-compare('-4712 04 22', $hs_date = Date_Calc::DaysToDate(150, "%Y %m %d"), '150');
-compare(150, Date_Calc::DateToDays(22, 4, -4712), '-4712 04 22');
-compare('-4712 04 23', $hs_date = Date_Calc::DaysToDate(151, "%Y %m %d"), '151');
-compare(151, Date_Calc::DateToDays(23, 4, -4712), '-4712 04 23');
-compare('-4712 04 24', $hs_date = Date_Calc::DaysToDate(152, "%Y %m %d"), '152');
-compare(152, Date_Calc::DateToDays(24, 4, -4712), '-4712 04 24');
-compare('-4712 04 25', $hs_date = Date_Calc::DaysToDate(153, "%Y %m %d"), '153');
-compare(153, Date_Calc::DateToDays(25, 4, -4712), '-4712 04 25');
-compare('-4712 04 26', $hs_date = Date_Calc::DaysToDate(154, "%Y %m %d"), '154');
-compare(154, Date_Calc::DateToDays(26, 4, -4712), '-4712 04 26');
-compare('-4712 04 27', $hs_date = Date_Calc::DaysToDate(155, "%Y %m %d"), '155');
-compare(155, Date_Calc::DateToDays(27, 4, -4712), '-4712 04 27');
-compare('-4712 04 28', $hs_date = Date_Calc::DaysToDate(156, "%Y %m %d"), '156');
-compare(156, Date_Calc::DateToDays(28, 4, -4712), '-4712 04 28');
-compare('-4712 04 29', $hs_date = Date_Calc::DaysToDate(157, "%Y %m %d"), '157');
-compare(157, Date_Calc::DateToDays(29, 4, -4712), '-4712 04 29');
-compare('-4712 04 30', $hs_date = Date_Calc::DaysToDate(158, "%Y %m %d"), '158');
-compare(158, Date_Calc::DateToDays(30, 4, -4712), '-4712 04 30');
-compare('-4712 05 01', $hs_date = Date_Calc::DaysToDate(159, "%Y %m %d"), '159');
-compare(159, Date_Calc::DateToDays(1, 5, -4712), '-4712 05 01');
-compare('-4712 05 02', $hs_date = Date_Calc::DaysToDate(160, "%Y %m %d"), '160');
-compare(160, Date_Calc::DateToDays(2, 5, -4712), '-4712 05 02');
-compare('-4712 05 03', $hs_date = Date_Calc::DaysToDate(161, "%Y %m %d"), '161');
-compare(161, Date_Calc::DateToDays(3, 5, -4712), '-4712 05 03');
-compare('-4712 05 04', $hs_date = Date_Calc::DaysToDate(162, "%Y %m %d"), '162');
-compare(162, Date_Calc::DateToDays(4, 5, -4712), '-4712 05 04');
-compare('-4712 05 05', $hs_date = Date_Calc::DaysToDate(163, "%Y %m %d"), '163');
-compare(163, Date_Calc::DateToDays(5, 5, -4712), '-4712 05 05');
-compare('-4712 05 06', $hs_date = Date_Calc::DaysToDate(164, "%Y %m %d"), '164');
-compare(164, Date_Calc::DateToDays(6, 5, -4712), '-4712 05 06');
-compare('-4712 05 07', $hs_date = Date_Calc::DaysToDate(165, "%Y %m %d"), '165');
-compare(165, Date_Calc::DateToDays(7, 5, -4712), '-4712 05 07');
-compare('-4712 05 08', $hs_date = Date_Calc::DaysToDate(166, "%Y %m %d"), '166');
-compare(166, Date_Calc::DateToDays(8, 5, -4712), '-4712 05 08');
-compare('-4712 05 09', $hs_date = Date_Calc::DaysToDate(167, "%Y %m %d"), '167');
-compare(167, Date_Calc::DateToDays(9, 5, -4712), '-4712 05 09');
-compare('-4712 05 10', $hs_date = Date_Calc::DaysToDate(168, "%Y %m %d"), '168');
-compare(168, Date_Calc::DateToDays(10, 5, -4712), '-4712 05 10');
-compare('-4712 05 11', $hs_date = Date_Calc::DaysToDate(169, "%Y %m %d"), '169');
-compare(169, Date_Calc::DateToDays(11, 5, -4712), '-4712 05 11');
-compare('-4712 05 12', $hs_date = Date_Calc::DaysToDate(170, "%Y %m %d"), '170');
-compare(170, Date_Calc::DateToDays(12, 5, -4712), '-4712 05 12');
-compare('-4712 05 13', $hs_date = Date_Calc::DaysToDate(171, "%Y %m %d"), '171');
-compare(171, Date_Calc::DateToDays(13, 5, -4712), '-4712 05 13');
-compare('-4712 05 14', $hs_date = Date_Calc::DaysToDate(172, "%Y %m %d"), '172');
-compare(172, Date_Calc::DateToDays(14, 5, -4712), '-4712 05 14');
-compare('-4712 05 15', $hs_date = Date_Calc::DaysToDate(173, "%Y %m %d"), '173');
-compare(173, Date_Calc::DateToDays(15, 5, -4712), '-4712 05 15');
-compare('-4712 05 16', $hs_date = Date_Calc::DaysToDate(174, "%Y %m %d"), '174');
-compare(174, Date_Calc::DateToDays(16, 5, -4712), '-4712 05 16');
-compare('-4712 05 17', $hs_date = Date_Calc::DaysToDate(175, "%Y %m %d"), '175');
-compare(175, Date_Calc::DateToDays(17, 5, -4712), '-4712 05 17');
-compare('-4712 05 18', $hs_date = Date_Calc::DaysToDate(176, "%Y %m %d"), '176');
-compare(176, Date_Calc::DateToDays(18, 5, -4712), '-4712 05 18');
-compare('-4712 05 19', $hs_date = Date_Calc::DaysToDate(177, "%Y %m %d"), '177');
-compare(177, Date_Calc::DateToDays(19, 5, -4712), '-4712 05 19');
-compare('-4712 05 20', $hs_date = Date_Calc::DaysToDate(178, "%Y %m %d"), '178');
-compare(178, Date_Calc::DateToDays(20, 5, -4712), '-4712 05 20');
-compare('-4712 05 21', $hs_date = Date_Calc::DaysToDate(179, "%Y %m %d"), '179');
-compare(179, Date_Calc::DateToDays(21, 5, -4712), '-4712 05 21');
-compare('-4712 05 22', $hs_date = Date_Calc::DaysToDate(180, "%Y %m %d"), '180');
-compare(180, Date_Calc::DateToDays(22, 5, -4712), '-4712 05 22');
-compare('-4712 05 23', $hs_date = Date_Calc::DaysToDate(181, "%Y %m %d"), '181');
-compare(181, Date_Calc::DateToDays(23, 5, -4712), '-4712 05 23');
-compare('-4712 05 24', $hs_date = Date_Calc::DaysToDate(182, "%Y %m %d"), '182');
-compare(182, Date_Calc::DateToDays(24, 5, -4712), '-4712 05 24');
-compare('-4712 05 25', $hs_date = Date_Calc::DaysToDate(183, "%Y %m %d"), '183');
-compare(183, Date_Calc::DateToDays(25, 5, -4712), '-4712 05 25');
-compare('-4712 05 26', $hs_date = Date_Calc::DaysToDate(184, "%Y %m %d"), '184');
-compare(184, Date_Calc::DateToDays(26, 5, -4712), '-4712 05 26');
-compare('-4712 05 27', $hs_date = Date_Calc::DaysToDate(185, "%Y %m %d"), '185');
-compare(185, Date_Calc::DateToDays(27, 5, -4712), '-4712 05 27');
-compare('-4712 05 28', $hs_date = Date_Calc::DaysToDate(186, "%Y %m %d"), '186');
-compare(186, Date_Calc::DateToDays(28, 5, -4712), '-4712 05 28');
-compare('-4712 05 29', $hs_date = Date_Calc::DaysToDate(187, "%Y %m %d"), '187');
-compare(187, Date_Calc::DateToDays(29, 5, -4712), '-4712 05 29');
-compare('-4712 05 30', $hs_date = Date_Calc::DaysToDate(188, "%Y %m %d"), '188');
-compare(188, Date_Calc::DateToDays(30, 5, -4712), '-4712 05 30');
-compare('-4712 05 31', $hs_date = Date_Calc::DaysToDate(189, "%Y %m %d"), '189');
-compare(189, Date_Calc::DateToDays(31, 5, -4712), '-4712 05 31');
-compare('-4712 06 01', $hs_date = Date_Calc::DaysToDate(190, "%Y %m %d"), '190');
-compare(190, Date_Calc::DateToDays(1, 6, -4712), '-4712 06 01');
-compare('-4712 06 02', $hs_date = Date_Calc::DaysToDate(191, "%Y %m %d"), '191');
-compare(191, Date_Calc::DateToDays(2, 6, -4712), '-4712 06 02');
-compare('-4712 06 03', $hs_date = Date_Calc::DaysToDate(192, "%Y %m %d"), '192');
-compare(192, Date_Calc::DateToDays(3, 6, -4712), '-4712 06 03');
-compare('-4712 06 04', $hs_date = Date_Calc::DaysToDate(193, "%Y %m %d"), '193');
-compare(193, Date_Calc::DateToDays(4, 6, -4712), '-4712 06 04');
-compare('-4712 06 05', $hs_date = Date_Calc::DaysToDate(194, "%Y %m %d"), '194');
-compare(194, Date_Calc::DateToDays(5, 6, -4712), '-4712 06 05');
-compare('-4712 06 06', $hs_date = Date_Calc::DaysToDate(195, "%Y %m %d"), '195');
-compare(195, Date_Calc::DateToDays(6, 6, -4712), '-4712 06 06');
-compare('-4712 06 07', $hs_date = Date_Calc::DaysToDate(196, "%Y %m %d"), '196');
-compare(196, Date_Calc::DateToDays(7, 6, -4712), '-4712 06 07');
-compare('-4712 06 08', $hs_date = Date_Calc::DaysToDate(197, "%Y %m %d"), '197');
-compare(197, Date_Calc::DateToDays(8, 6, -4712), '-4712 06 08');
-compare('-4712 06 09', $hs_date = Date_Calc::DaysToDate(198, "%Y %m %d"), '198');
-compare(198, Date_Calc::DateToDays(9, 6, -4712), '-4712 06 09');
-compare('-4712 06 10', $hs_date = Date_Calc::DaysToDate(199, "%Y %m %d"), '199');
-compare(199, Date_Calc::DateToDays(10, 6, -4712), '-4712 06 10');
-compare('-4712 06 11', $hs_date = Date_Calc::DaysToDate(200, "%Y %m %d"), '200');
-compare(200, Date_Calc::DateToDays(11, 6, -4712), '-4712 06 11');
-compare('-4712 06 12', $hs_date = Date_Calc::DaysToDate(201, "%Y %m %d"), '201');
-compare(201, Date_Calc::DateToDays(12, 6, -4712), '-4712 06 12');
-compare('-4712 06 13', $hs_date = Date_Calc::DaysToDate(202, "%Y %m %d"), '202');
-compare(202, Date_Calc::DateToDays(13, 6, -4712), '-4712 06 13');
-compare('-4712 06 14', $hs_date = Date_Calc::DaysToDate(203, "%Y %m %d"), '203');
-compare(203, Date_Calc::DateToDays(14, 6, -4712), '-4712 06 14');
-compare('-4712 06 15', $hs_date = Date_Calc::DaysToDate(204, "%Y %m %d"), '204');
-compare(204, Date_Calc::DateToDays(15, 6, -4712), '-4712 06 15');
-compare('-4712 06 16', $hs_date = Date_Calc::DaysToDate(205, "%Y %m %d"), '205');
-compare(205, Date_Calc::DateToDays(16, 6, -4712), '-4712 06 16');
-compare('-4712 06 17', $hs_date = Date_Calc::DaysToDate(206, "%Y %m %d"), '206');
-compare(206, Date_Calc::DateToDays(17, 6, -4712), '-4712 06 17');
-compare('-4712 06 18', $hs_date = Date_Calc::DaysToDate(207, "%Y %m %d"), '207');
-compare(207, Date_Calc::DateToDays(18, 6, -4712), '-4712 06 18');
-compare('-4712 06 19', $hs_date = Date_Calc::DaysToDate(208, "%Y %m %d"), '208');
-compare(208, Date_Calc::DateToDays(19, 6, -4712), '-4712 06 19');
-compare('-4712 06 20', $hs_date = Date_Calc::DaysToDate(209, "%Y %m %d"), '209');
-compare(209, Date_Calc::DateToDays(20, 6, -4712), '-4712 06 20');
-compare('-4712 06 21', $hs_date = Date_Calc::DaysToDate(210, "%Y %m %d"), '210');
-compare(210, Date_Calc::DateToDays(21, 6, -4712), '-4712 06 21');
-compare('-4712 06 22', $hs_date = Date_Calc::DaysToDate(211, "%Y %m %d"), '211');
-compare(211, Date_Calc::DateToDays(22, 6, -4712), '-4712 06 22');
-compare('-4712 06 23', $hs_date = Date_Calc::DaysToDate(212, "%Y %m %d"), '212');
-compare(212, Date_Calc::DateToDays(23, 6, -4712), '-4712 06 23');
-compare('-4712 06 24', $hs_date = Date_Calc::DaysToDate(213, "%Y %m %d"), '213');
-compare(213, Date_Calc::DateToDays(24, 6, -4712), '-4712 06 24');
-compare('-4712 06 25', $hs_date = Date_Calc::DaysToDate(214, "%Y %m %d"), '214');
-compare(214, Date_Calc::DateToDays(25, 6, -4712), '-4712 06 25');
-compare('-4712 06 26', $hs_date = Date_Calc::DaysToDate(215, "%Y %m %d"), '215');
-compare(215, Date_Calc::DateToDays(26, 6, -4712), '-4712 06 26');
-compare('-4712 06 27', $hs_date = Date_Calc::DaysToDate(216, "%Y %m %d"), '216');
-compare(216, Date_Calc::DateToDays(27, 6, -4712), '-4712 06 27');
-compare('-4712 06 28', $hs_date = Date_Calc::DaysToDate(217, "%Y %m %d"), '217');
-compare(217, Date_Calc::DateToDays(28, 6, -4712), '-4712 06 28');
-compare('-4712 06 29', $hs_date = Date_Calc::DaysToDate(218, "%Y %m %d"), '218');
-compare(218, Date_Calc::DateToDays(29, 6, -4712), '-4712 06 29');
-compare('-4712 06 30', $hs_date = Date_Calc::DaysToDate(219, "%Y %m %d"), '219');
-compare(219, Date_Calc::DateToDays(30, 6, -4712), '-4712 06 30');
-compare('-4712 07 01', $hs_date = Date_Calc::DaysToDate(220, "%Y %m %d"), '220');
-compare(220, Date_Calc::DateToDays(1, 7, -4712), '-4712 07 01');
-compare('-4712 07 02', $hs_date = Date_Calc::DaysToDate(221, "%Y %m %d"), '221');
-compare(221, Date_Calc::DateToDays(2, 7, -4712), '-4712 07 02');
-compare('-4712 07 03', $hs_date = Date_Calc::DaysToDate(222, "%Y %m %d"), '222');
-compare(222, Date_Calc::DateToDays(3, 7, -4712), '-4712 07 03');
-compare('-4712 07 04', $hs_date = Date_Calc::DaysToDate(223, "%Y %m %d"), '223');
-compare(223, Date_Calc::DateToDays(4, 7, -4712), '-4712 07 04');
-compare('-4712 07 05', $hs_date = Date_Calc::DaysToDate(224, "%Y %m %d"), '224');
-compare(224, Date_Calc::DateToDays(5, 7, -4712), '-4712 07 05');
-compare('-4712 07 06', $hs_date = Date_Calc::DaysToDate(225, "%Y %m %d"), '225');
-compare(225, Date_Calc::DateToDays(6, 7, -4712), '-4712 07 06');
-compare('-4712 07 07', $hs_date = Date_Calc::DaysToDate(226, "%Y %m %d"), '226');
-compare(226, Date_Calc::DateToDays(7, 7, -4712), '-4712 07 07');
-compare('-4712 07 08', $hs_date = Date_Calc::DaysToDate(227, "%Y %m %d"), '227');
-compare(227, Date_Calc::DateToDays(8, 7, -4712), '-4712 07 08');
-compare('-4712 07 09', $hs_date = Date_Calc::DaysToDate(228, "%Y %m %d"), '228');
-compare(228, Date_Calc::DateToDays(9, 7, -4712), '-4712 07 09');
-compare('-4712 07 10', $hs_date = Date_Calc::DaysToDate(229, "%Y %m %d"), '229');
-compare(229, Date_Calc::DateToDays(10, 7, -4712), '-4712 07 10');
-compare('-4712 07 11', $hs_date = Date_Calc::DaysToDate(230, "%Y %m %d"), '230');
-compare(230, Date_Calc::DateToDays(11, 7, -4712), '-4712 07 11');
-compare('-4712 07 12', $hs_date = Date_Calc::DaysToDate(231, "%Y %m %d"), '231');
-compare(231, Date_Calc::DateToDays(12, 7, -4712), '-4712 07 12');
-compare('-4712 07 13', $hs_date = Date_Calc::DaysToDate(232, "%Y %m %d"), '232');
-compare(232, Date_Calc::DateToDays(13, 7, -4712), '-4712 07 13');
-compare('-4712 07 14', $hs_date = Date_Calc::DaysToDate(233, "%Y %m %d"), '233');
-compare(233, Date_Calc::DateToDays(14, 7, -4712), '-4712 07 14');
-compare('-4712 07 15', $hs_date = Date_Calc::DaysToDate(234, "%Y %m %d"), '234');
-compare(234, Date_Calc::DateToDays(15, 7, -4712), '-4712 07 15');
-compare('-4712 07 16', $hs_date = Date_Calc::DaysToDate(235, "%Y %m %d"), '235');
-compare(235, Date_Calc::DateToDays(16, 7, -4712), '-4712 07 16');
-compare('-4712 07 17', $hs_date = Date_Calc::DaysToDate(236, "%Y %m %d"), '236');
-compare(236, Date_Calc::DateToDays(17, 7, -4712), '-4712 07 17');
-compare('-4712 07 18', $hs_date = Date_Calc::DaysToDate(237, "%Y %m %d"), '237');
-compare(237, Date_Calc::DateToDays(18, 7, -4712), '-4712 07 18');
-compare('-4712 07 19', $hs_date = Date_Calc::DaysToDate(238, "%Y %m %d"), '238');
-compare(238, Date_Calc::DateToDays(19, 7, -4712), '-4712 07 19');
-compare('-4712 07 20', $hs_date = Date_Calc::DaysToDate(239, "%Y %m %d"), '239');
-compare(239, Date_Calc::DateToDays(20, 7, -4712), '-4712 07 20');
-compare('-4712 07 21', $hs_date = Date_Calc::DaysToDate(240, "%Y %m %d"), '240');
-compare(240, Date_Calc::DateToDays(21, 7, -4712), '-4712 07 21');
-compare('-4712 07 22', $hs_date = Date_Calc::DaysToDate(241, "%Y %m %d"), '241');
-compare(241, Date_Calc::DateToDays(22, 7, -4712), '-4712 07 22');
-compare('-4712 07 23', $hs_date = Date_Calc::DaysToDate(242, "%Y %m %d"), '242');
-compare(242, Date_Calc::DateToDays(23, 7, -4712), '-4712 07 23');
-compare('-4712 07 24', $hs_date = Date_Calc::DaysToDate(243, "%Y %m %d"), '243');
-compare(243, Date_Calc::DateToDays(24, 7, -4712), '-4712 07 24');
-compare('-4712 07 25', $hs_date = Date_Calc::DaysToDate(244, "%Y %m %d"), '244');
-compare(244, Date_Calc::DateToDays(25, 7, -4712), '-4712 07 25');
-compare('-4712 07 26', $hs_date = Date_Calc::DaysToDate(245, "%Y %m %d"), '245');
-compare(245, Date_Calc::DateToDays(26, 7, -4712), '-4712 07 26');
-compare('-4712 07 27', $hs_date = Date_Calc::DaysToDate(246, "%Y %m %d"), '246');
-compare(246, Date_Calc::DateToDays(27, 7, -4712), '-4712 07 27');
-compare('-4712 07 28', $hs_date = Date_Calc::DaysToDate(247, "%Y %m %d"), '247');
-compare(247, Date_Calc::DateToDays(28, 7, -4712), '-4712 07 28');
-compare('-4712 07 29', $hs_date = Date_Calc::DaysToDate(248, "%Y %m %d"), '248');
-compare(248, Date_Calc::DateToDays(29, 7, -4712), '-4712 07 29');
-compare('-4712 07 30', $hs_date = Date_Calc::DaysToDate(249, "%Y %m %d"), '249');
-compare(249, Date_Calc::DateToDays(30, 7, -4712), '-4712 07 30');
-compare('-4712 07 31', $hs_date = Date_Calc::DaysToDate(250, "%Y %m %d"), '250');
-compare(250, Date_Calc::DateToDays(31, 7, -4712), '-4712 07 31');
-compare('-4712 08 01', $hs_date = Date_Calc::DaysToDate(251, "%Y %m %d"), '251');
-compare(251, Date_Calc::DateToDays(1, 8, -4712), '-4712 08 01');
-compare('-4712 08 02', $hs_date = Date_Calc::DaysToDate(252, "%Y %m %d"), '252');
-compare(252, Date_Calc::DateToDays(2, 8, -4712), '-4712 08 02');
-compare('-4712 08 03', $hs_date = Date_Calc::DaysToDate(253, "%Y %m %d"), '253');
-compare(253, Date_Calc::DateToDays(3, 8, -4712), '-4712 08 03');
-compare('-4712 08 04', $hs_date = Date_Calc::DaysToDate(254, "%Y %m %d"), '254');
-compare(254, Date_Calc::DateToDays(4, 8, -4712), '-4712 08 04');
-compare('-4712 08 05', $hs_date = Date_Calc::DaysToDate(255, "%Y %m %d"), '255');
-compare(255, Date_Calc::DateToDays(5, 8, -4712), '-4712 08 05');
-compare('-4712 08 06', $hs_date = Date_Calc::DaysToDate(256, "%Y %m %d"), '256');
-compare(256, Date_Calc::DateToDays(6, 8, -4712), '-4712 08 06');
-compare('-4712 08 07', $hs_date = Date_Calc::DaysToDate(257, "%Y %m %d"), '257');
-compare(257, Date_Calc::DateToDays(7, 8, -4712), '-4712 08 07');
-compare('-4712 08 08', $hs_date = Date_Calc::DaysToDate(258, "%Y %m %d"), '258');
-compare(258, Date_Calc::DateToDays(8, 8, -4712), '-4712 08 08');
-compare('-4712 08 09', $hs_date = Date_Calc::DaysToDate(259, "%Y %m %d"), '259');
-compare(259, Date_Calc::DateToDays(9, 8, -4712), '-4712 08 09');
-compare('-4712 08 10', $hs_date = Date_Calc::DaysToDate(260, "%Y %m %d"), '260');
-compare(260, Date_Calc::DateToDays(10, 8, -4712), '-4712 08 10');
-compare('-4712 08 11', $hs_date = Date_Calc::DaysToDate(261, "%Y %m %d"), '261');
-compare(261, Date_Calc::DateToDays(11, 8, -4712), '-4712 08 11');
-compare('-4712 08 12', $hs_date = Date_Calc::DaysToDate(262, "%Y %m %d"), '262');
-compare(262, Date_Calc::DateToDays(12, 8, -4712), '-4712 08 12');
-compare('-4712 08 13', $hs_date = Date_Calc::DaysToDate(263, "%Y %m %d"), '263');
-compare(263, Date_Calc::DateToDays(13, 8, -4712), '-4712 08 13');
-compare('-4712 08 14', $hs_date = Date_Calc::DaysToDate(264, "%Y %m %d"), '264');
-compare(264, Date_Calc::DateToDays(14, 8, -4712), '-4712 08 14');
-compare('-4712 08 15', $hs_date = Date_Calc::DaysToDate(265, "%Y %m %d"), '265');
-compare(265, Date_Calc::DateToDays(15, 8, -4712), '-4712 08 15');
-compare('-4712 08 16', $hs_date = Date_Calc::DaysToDate(266, "%Y %m %d"), '266');
-compare(266, Date_Calc::DateToDays(16, 8, -4712), '-4712 08 16');
-compare('-4712 08 17', $hs_date = Date_Calc::DaysToDate(267, "%Y %m %d"), '267');
-compare(267, Date_Calc::DateToDays(17, 8, -4712), '-4712 08 17');
-compare('-4712 08 18', $hs_date = Date_Calc::DaysToDate(268, "%Y %m %d"), '268');
-compare(268, Date_Calc::DateToDays(18, 8, -4712), '-4712 08 18');
-compare('-4712 08 19', $hs_date = Date_Calc::DaysToDate(269, "%Y %m %d"), '269');
-compare(269, Date_Calc::DateToDays(19, 8, -4712), '-4712 08 19');
-compare('-4712 08 20', $hs_date = Date_Calc::DaysToDate(270, "%Y %m %d"), '270');
-compare(270, Date_Calc::DateToDays(20, 8, -4712), '-4712 08 20');
-compare('-4712 08 21', $hs_date = Date_Calc::DaysToDate(271, "%Y %m %d"), '271');
-compare(271, Date_Calc::DateToDays(21, 8, -4712), '-4712 08 21');
-compare('-4712 08 22', $hs_date = Date_Calc::DaysToDate(272, "%Y %m %d"), '272');
-compare(272, Date_Calc::DateToDays(22, 8, -4712), '-4712 08 22');
-compare('-4712 08 23', $hs_date = Date_Calc::DaysToDate(273, "%Y %m %d"), '273');
-compare(273, Date_Calc::DateToDays(23, 8, -4712), '-4712 08 23');
-compare('-4712 08 24', $hs_date = Date_Calc::DaysToDate(274, "%Y %m %d"), '274');
-compare(274, Date_Calc::DateToDays(24, 8, -4712), '-4712 08 24');
-compare('-4712 08 25', $hs_date = Date_Calc::DaysToDate(275, "%Y %m %d"), '275');
-compare(275, Date_Calc::DateToDays(25, 8, -4712), '-4712 08 25');
-compare('-4712 08 26', $hs_date = Date_Calc::DaysToDate(276, "%Y %m %d"), '276');
-compare(276, Date_Calc::DateToDays(26, 8, -4712), '-4712 08 26');
-compare('-4712 08 27', $hs_date = Date_Calc::DaysToDate(277, "%Y %m %d"), '277');
-compare(277, Date_Calc::DateToDays(27, 8, -4712), '-4712 08 27');
-compare('-4712 08 28', $hs_date = Date_Calc::DaysToDate(278, "%Y %m %d"), '278');
-compare(278, Date_Calc::DateToDays(28, 8, -4712), '-4712 08 28');
-compare('-4712 08 29', $hs_date = Date_Calc::DaysToDate(279, "%Y %m %d"), '279');
-compare(279, Date_Calc::DateToDays(29, 8, -4712), '-4712 08 29');
-compare('-4712 08 30', $hs_date = Date_Calc::DaysToDate(280, "%Y %m %d"), '280');
-compare(280, Date_Calc::DateToDays(30, 8, -4712), '-4712 08 30');
-compare('-4712 08 31', $hs_date = Date_Calc::DaysToDate(281, "%Y %m %d"), '281');
-compare(281, Date_Calc::DateToDays(31, 8, -4712), '-4712 08 31');
-compare('-4712 09 01', $hs_date = Date_Calc::DaysToDate(282, "%Y %m %d"), '282');
-compare(282, Date_Calc::DateToDays(1, 9, -4712), '-4712 09 01');
-compare('-4712 09 02', $hs_date = Date_Calc::DaysToDate(283, "%Y %m %d"), '283');
-compare(283, Date_Calc::DateToDays(2, 9, -4712), '-4712 09 02');
-compare('-4712 09 03', $hs_date = Date_Calc::DaysToDate(284, "%Y %m %d"), '284');
-compare(284, Date_Calc::DateToDays(3, 9, -4712), '-4712 09 03');
-compare('-4712 09 04', $hs_date = Date_Calc::DaysToDate(285, "%Y %m %d"), '285');
-compare(285, Date_Calc::DateToDays(4, 9, -4712), '-4712 09 04');
-compare('-4712 09 05', $hs_date = Date_Calc::DaysToDate(286, "%Y %m %d"), '286');
-compare(286, Date_Calc::DateToDays(5, 9, -4712), '-4712 09 05');
-compare('-4712 09 06', $hs_date = Date_Calc::DaysToDate(287, "%Y %m %d"), '287');
-compare(287, Date_Calc::DateToDays(6, 9, -4712), '-4712 09 06');
-compare('-4712 09 07', $hs_date = Date_Calc::DaysToDate(288, "%Y %m %d"), '288');
-compare(288, Date_Calc::DateToDays(7, 9, -4712), '-4712 09 07');
-compare('-4712 09 08', $hs_date = Date_Calc::DaysToDate(289, "%Y %m %d"), '289');
-compare(289, Date_Calc::DateToDays(8, 9, -4712), '-4712 09 08');
-compare('-4712 09 09', $hs_date = Date_Calc::DaysToDate(290, "%Y %m %d"), '290');
-compare(290, Date_Calc::DateToDays(9, 9, -4712), '-4712 09 09');
-compare('-4712 09 10', $hs_date = Date_Calc::DaysToDate(291, "%Y %m %d"), '291');
-compare(291, Date_Calc::DateToDays(10, 9, -4712), '-4712 09 10');
-compare('-4712 09 11', $hs_date = Date_Calc::DaysToDate(292, "%Y %m %d"), '292');
-compare(292, Date_Calc::DateToDays(11, 9, -4712), '-4712 09 11');
-compare('-4712 09 12', $hs_date = Date_Calc::DaysToDate(293, "%Y %m %d"), '293');
-compare(293, Date_Calc::DateToDays(12, 9, -4712), '-4712 09 12');
-compare('-4712 09 13', $hs_date = Date_Calc::DaysToDate(294, "%Y %m %d"), '294');
-compare(294, Date_Calc::DateToDays(13, 9, -4712), '-4712 09 13');
-compare('-4712 09 14', $hs_date = Date_Calc::DaysToDate(295, "%Y %m %d"), '295');
-compare(295, Date_Calc::DateToDays(14, 9, -4712), '-4712 09 14');
-compare('-4712 09 15', $hs_date = Date_Calc::DaysToDate(296, "%Y %m %d"), '296');
-compare(296, Date_Calc::DateToDays(15, 9, -4712), '-4712 09 15');
-compare('-4712 09 16', $hs_date = Date_Calc::DaysToDate(297, "%Y %m %d"), '297');
-compare(297, Date_Calc::DateToDays(16, 9, -4712), '-4712 09 16');
-compare('-4712 09 17', $hs_date = Date_Calc::DaysToDate(298, "%Y %m %d"), '298');
-compare(298, Date_Calc::DateToDays(17, 9, -4712), '-4712 09 17');
-compare('-4712 09 18', $hs_date = Date_Calc::DaysToDate(299, "%Y %m %d"), '299');
-compare(299, Date_Calc::DateToDays(18, 9, -4712), '-4712 09 18');
-compare('-4712 09 19', $hs_date = Date_Calc::DaysToDate(300, "%Y %m %d"), '300');
-compare(300, Date_Calc::DateToDays(19, 9, -4712), '-4712 09 19');
-compare('-4712 09 20', $hs_date = Date_Calc::DaysToDate(301, "%Y %m %d"), '301');
-compare(301, Date_Calc::DateToDays(20, 9, -4712), '-4712 09 20');
-compare('-4712 09 21', $hs_date = Date_Calc::DaysToDate(302, "%Y %m %d"), '302');
-compare(302, Date_Calc::DateToDays(21, 9, -4712), '-4712 09 21');
-compare('-4712 09 22', $hs_date = Date_Calc::DaysToDate(303, "%Y %m %d"), '303');
-compare(303, Date_Calc::DateToDays(22, 9, -4712), '-4712 09 22');
-compare('-4712 09 23', $hs_date = Date_Calc::DaysToDate(304, "%Y %m %d"), '304');
-compare(304, Date_Calc::DateToDays(23, 9, -4712), '-4712 09 23');
-compare('-4712 09 24', $hs_date = Date_Calc::DaysToDate(305, "%Y %m %d"), '305');
-compare(305, Date_Calc::DateToDays(24, 9, -4712), '-4712 09 24');
-compare('-4712 09 25', $hs_date = Date_Calc::DaysToDate(306, "%Y %m %d"), '306');
-compare(306, Date_Calc::DateToDays(25, 9, -4712), '-4712 09 25');
-compare('-4712 09 26', $hs_date = Date_Calc::DaysToDate(307, "%Y %m %d"), '307');
-compare(307, Date_Calc::DateToDays(26, 9, -4712), '-4712 09 26');
-compare('-4712 09 27', $hs_date = Date_Calc::DaysToDate(308, "%Y %m %d"), '308');
-compare(308, Date_Calc::DateToDays(27, 9, -4712), '-4712 09 27');
-compare('-4712 09 28', $hs_date = Date_Calc::DaysToDate(309, "%Y %m %d"), '309');
-compare(309, Date_Calc::DateToDays(28, 9, -4712), '-4712 09 28');
-compare('-4712 09 29', $hs_date = Date_Calc::DaysToDate(310, "%Y %m %d"), '310');
-compare(310, Date_Calc::DateToDays(29, 9, -4712), '-4712 09 29');
-compare('-4712 09 30', $hs_date = Date_Calc::DaysToDate(311, "%Y %m %d"), '311');
-compare(311, Date_Calc::DateToDays(30, 9, -4712), '-4712 09 30');
-compare('-4712 10 01', $hs_date = Date_Calc::DaysToDate(312, "%Y %m %d"), '312');
-compare(312, Date_Calc::DateToDays(1, 10, -4712), '-4712 10 01');
-compare('-4712 10 02', $hs_date = Date_Calc::DaysToDate(313, "%Y %m %d"), '313');
-compare(313, Date_Calc::DateToDays(2, 10, -4712), '-4712 10 02');
-compare('-4712 10 03', $hs_date = Date_Calc::DaysToDate(314, "%Y %m %d"), '314');
-compare(314, Date_Calc::DateToDays(3, 10, -4712), '-4712 10 03');
-compare('-4712 10 04', $hs_date = Date_Calc::DaysToDate(315, "%Y %m %d"), '315');
-compare(315, Date_Calc::DateToDays(4, 10, -4712), '-4712 10 04');
-compare('-4712 10 05', $hs_date = Date_Calc::DaysToDate(316, "%Y %m %d"), '316');
-compare(316, Date_Calc::DateToDays(5, 10, -4712), '-4712 10 05');
-compare('-4712 10 06', $hs_date = Date_Calc::DaysToDate(317, "%Y %m %d"), '317');
-compare(317, Date_Calc::DateToDays(6, 10, -4712), '-4712 10 06');
-compare('-4712 10 07', $hs_date = Date_Calc::DaysToDate(318, "%Y %m %d"), '318');
-compare(318, Date_Calc::DateToDays(7, 10, -4712), '-4712 10 07');
-compare('-4712 10 08', $hs_date = Date_Calc::DaysToDate(319, "%Y %m %d"), '319');
-compare(319, Date_Calc::DateToDays(8, 10, -4712), '-4712 10 08');
-compare('-4712 10 09', $hs_date = Date_Calc::DaysToDate(320, "%Y %m %d"), '320');
-compare(320, Date_Calc::DateToDays(9, 10, -4712), '-4712 10 09');
-compare('-4712 10 10', $hs_date = Date_Calc::DaysToDate(321, "%Y %m %d"), '321');
-compare(321, Date_Calc::DateToDays(10, 10, -4712), '-4712 10 10');
-compare('-4712 10 11', $hs_date = Date_Calc::DaysToDate(322, "%Y %m %d"), '322');
-compare(322, Date_Calc::DateToDays(11, 10, -4712), '-4712 10 11');
-compare('-4712 10 12', $hs_date = Date_Calc::DaysToDate(323, "%Y %m %d"), '323');
-compare(323, Date_Calc::DateToDays(12, 10, -4712), '-4712 10 12');
-compare('-4712 10 13', $hs_date = Date_Calc::DaysToDate(324, "%Y %m %d"), '324');
-compare(324, Date_Calc::DateToDays(13, 10, -4712), '-4712 10 13');
-compare('-4712 10 14', $hs_date = Date_Calc::DaysToDate(325, "%Y %m %d"), '325');
-compare(325, Date_Calc::DateToDays(14, 10, -4712), '-4712 10 14');
-compare('-4712 10 15', $hs_date = Date_Calc::DaysToDate(326, "%Y %m %d"), '326');
-compare(326, Date_Calc::DateToDays(15, 10, -4712), '-4712 10 15');
-compare('-4712 10 16', $hs_date = Date_Calc::DaysToDate(327, "%Y %m %d"), '327');
-compare(327, Date_Calc::DateToDays(16, 10, -4712), '-4712 10 16');
-compare('-4712 10 17', $hs_date = Date_Calc::DaysToDate(328, "%Y %m %d"), '328');
-compare(328, Date_Calc::DateToDays(17, 10, -4712), '-4712 10 17');
-compare('-4712 10 18', $hs_date = Date_Calc::DaysToDate(329, "%Y %m %d"), '329');
-compare(329, Date_Calc::DateToDays(18, 10, -4712), '-4712 10 18');
-compare('-4712 10 19', $hs_date = Date_Calc::DaysToDate(330, "%Y %m %d"), '330');
-compare(330, Date_Calc::DateToDays(19, 10, -4712), '-4712 10 19');
-compare('-4712 10 20', $hs_date = Date_Calc::DaysToDate(331, "%Y %m %d"), '331');
-compare(331, Date_Calc::DateToDays(20, 10, -4712), '-4712 10 20');
-compare('-4712 10 21', $hs_date = Date_Calc::DaysToDate(332, "%Y %m %d"), '332');
-compare(332, Date_Calc::DateToDays(21, 10, -4712), '-4712 10 21');
-compare('-4712 10 22', $hs_date = Date_Calc::DaysToDate(333, "%Y %m %d"), '333');
-compare(333, Date_Calc::DateToDays(22, 10, -4712), '-4712 10 22');
-compare('-4712 10 23', $hs_date = Date_Calc::DaysToDate(334, "%Y %m %d"), '334');
-compare(334, Date_Calc::DateToDays(23, 10, -4712), '-4712 10 23');
-compare('-4712 10 24', $hs_date = Date_Calc::DaysToDate(335, "%Y %m %d"), '335');
-compare(335, Date_Calc::DateToDays(24, 10, -4712), '-4712 10 24');
-compare('-4712 10 25', $hs_date = Date_Calc::DaysToDate(336, "%Y %m %d"), '336');
-compare(336, Date_Calc::DateToDays(25, 10, -4712), '-4712 10 25');
-compare('-4712 10 26', $hs_date = Date_Calc::DaysToDate(337, "%Y %m %d"), '337');
-compare(337, Date_Calc::DateToDays(26, 10, -4712), '-4712 10 26');
-compare('-4712 10 27', $hs_date = Date_Calc::DaysToDate(338, "%Y %m %d"), '338');
-compare(338, Date_Calc::DateToDays(27, 10, -4712), '-4712 10 27');
-compare('-4712 10 28', $hs_date = Date_Calc::DaysToDate(339, "%Y %m %d"), '339');
-compare(339, Date_Calc::DateToDays(28, 10, -4712), '-4712 10 28');
-compare('-4712 10 29', $hs_date = Date_Calc::DaysToDate(340, "%Y %m %d"), '340');
-compare(340, Date_Calc::DateToDays(29, 10, -4712), '-4712 10 29');
-compare('-4712 10 30', $hs_date = Date_Calc::DaysToDate(341, "%Y %m %d"), '341');
-compare(341, Date_Calc::DateToDays(30, 10, -4712), '-4712 10 30');
-compare('-4712 10 31', $hs_date = Date_Calc::DaysToDate(342, "%Y %m %d"), '342');
-compare(342, Date_Calc::DateToDays(31, 10, -4712), '-4712 10 31');
-compare('-4712 11 01', $hs_date = Date_Calc::DaysToDate(343, "%Y %m %d"), '343');
-compare(343, Date_Calc::DateToDays(1, 11, -4712), '-4712 11 01');
-compare('-4712 11 02', $hs_date = Date_Calc::DaysToDate(344, "%Y %m %d"), '344');
-compare(344, Date_Calc::DateToDays(2, 11, -4712), '-4712 11 02');
-compare('-4712 11 03', $hs_date = Date_Calc::DaysToDate(345, "%Y %m %d"), '345');
-compare(345, Date_Calc::DateToDays(3, 11, -4712), '-4712 11 03');
-compare('-4712 11 04', $hs_date = Date_Calc::DaysToDate(346, "%Y %m %d"), '346');
-compare(346, Date_Calc::DateToDays(4, 11, -4712), '-4712 11 04');
-compare('-4712 11 05', $hs_date = Date_Calc::DaysToDate(347, "%Y %m %d"), '347');
-compare(347, Date_Calc::DateToDays(5, 11, -4712), '-4712 11 05');
-compare('-4712 11 06', $hs_date = Date_Calc::DaysToDate(348, "%Y %m %d"), '348');
-compare(348, Date_Calc::DateToDays(6, 11, -4712), '-4712 11 06');
-compare('-4712 11 07', $hs_date = Date_Calc::DaysToDate(349, "%Y %m %d"), '349');
-compare(349, Date_Calc::DateToDays(7, 11, -4712), '-4712 11 07');
-compare('-4712 11 08', $hs_date = Date_Calc::DaysToDate(350, "%Y %m %d"), '350');
-compare(350, Date_Calc::DateToDays(8, 11, -4712), '-4712 11 08');
-compare('-4712 11 09', $hs_date = Date_Calc::DaysToDate(351, "%Y %m %d"), '351');
-compare(351, Date_Calc::DateToDays(9, 11, -4712), '-4712 11 09');
-compare('-4712 11 10', $hs_date = Date_Calc::DaysToDate(352, "%Y %m %d"), '352');
-compare(352, Date_Calc::DateToDays(10, 11, -4712), '-4712 11 10');
-compare('-4712 11 11', $hs_date = Date_Calc::DaysToDate(353, "%Y %m %d"), '353');
-compare(353, Date_Calc::DateToDays(11, 11, -4712), '-4712 11 11');
-compare('-4712 11 12', $hs_date = Date_Calc::DaysToDate(354, "%Y %m %d"), '354');
-compare(354, Date_Calc::DateToDays(12, 11, -4712), '-4712 11 12');
-compare('-4712 11 13', $hs_date = Date_Calc::DaysToDate(355, "%Y %m %d"), '355');
-compare(355, Date_Calc::DateToDays(13, 11, -4712), '-4712 11 13');
-compare('-4712 11 14', $hs_date = Date_Calc::DaysToDate(356, "%Y %m %d"), '356');
-compare(356, Date_Calc::DateToDays(14, 11, -4712), '-4712 11 14');
-compare('-4712 11 15', $hs_date = Date_Calc::DaysToDate(357, "%Y %m %d"), '357');
-compare(357, Date_Calc::DateToDays(15, 11, -4712), '-4712 11 15');
-compare('-4712 11 16', $hs_date = Date_Calc::DaysToDate(358, "%Y %m %d"), '358');
-compare(358, Date_Calc::DateToDays(16, 11, -4712), '-4712 11 16');
-compare('-4712 11 17', $hs_date = Date_Calc::DaysToDate(359, "%Y %m %d"), '359');
-compare(359, Date_Calc::DateToDays(17, 11, -4712), '-4712 11 17');
-compare('-4712 11 18', $hs_date = Date_Calc::DaysToDate(360, "%Y %m %d"), '360');
-compare(360, Date_Calc::DateToDays(18, 11, -4712), '-4712 11 18');
-compare('-4712 11 19', $hs_date = Date_Calc::DaysToDate(361, "%Y %m %d"), '361');
-compare(361, Date_Calc::DateToDays(19, 11, -4712), '-4712 11 19');
-compare('-4712 11 20', $hs_date = Date_Calc::DaysToDate(362, "%Y %m %d"), '362');
-compare(362, Date_Calc::DateToDays(20, 11, -4712), '-4712 11 20');
-compare('-4712 11 21', $hs_date = Date_Calc::DaysToDate(363, "%Y %m %d"), '363');
-compare(363, Date_Calc::DateToDays(21, 11, -4712), '-4712 11 21');
-compare('-4712 11 22', $hs_date = Date_Calc::DaysToDate(364, "%Y %m %d"), '364');
-compare(364, Date_Calc::DateToDays(22, 11, -4712), '-4712 11 22');
-compare('-4712 11 23', $hs_date = Date_Calc::DaysToDate(365, "%Y %m %d"), '365');
-compare(365, Date_Calc::DateToDays(23, 11, -4712), '-4712 11 23');
-compare('-4712 11 24', $hs_date = Date_Calc::DaysToDate(366, "%Y %m %d"), '366');
-compare(366, Date_Calc::DateToDays(24, 11, -4712), '-4712 11 24');
-
-compare('2006 11 07', Date_Calc::DaysToDate(2454047, "%Y %m %d"), '2454047');
-compare(2454047, Date_Calc::DateToDays(7, 11, 2006), '2006 11 07');
-compare('2006 11 08', Date_Calc::DaysToDate(2454048, "%Y %m %d"), '2454048');
-compare(2454048, Date_Calc::DateToDays(8, 11, 2006), '2006 11 08');
-compare('2006 11 09', Date_Calc::DaysToDate(2454049, "%Y %m %d"), '2454049');
-compare(2454049, Date_Calc::DateToDays(9, 11, 2006), '2006 11 09');
-compare('2006 11 10', Date_Calc::DaysToDate(2454050, "%Y %m %d"), '2454050');
-compare(2454050, Date_Calc::DateToDays(10, 11, 2006), '2006 11 10');
-compare('2006 11 11', Date_Calc::DaysToDate(2454051, "%Y %m %d"), '2454051');
-compare(2454051, Date_Calc::DateToDays(11, 11, 2006), '2006 11 11');
-compare('2006 11 12', Date_Calc::DaysToDate(2454052, "%Y %m %d"), '2454052');
-compare(2454052, Date_Calc::DateToDays(12, 11, 2006), '2006 11 12');
-compare('2006 11 13', Date_Calc::DaysToDate(2454053, "%Y %m %d"), '2454053');
-compare(2454053, Date_Calc::DateToDays(13, 11, 2006), '2006 11 13');
-compare('2006 11 14', Date_Calc::DaysToDate(2454054, "%Y %m %d"), '2454054');
-compare(2454054, Date_Calc::DateToDays(14, 11, 2006), '2006 11 14');
-compare('2006 11 15', Date_Calc::DaysToDate(2454055, "%Y %m %d"), '2454055');
-compare(2454055, Date_Calc::DateToDays(15, 11, 2006), '2006 11 15');
-compare('2006 11 16', Date_Calc::DaysToDate(2454056, "%Y %m %d"), '2454056');
-compare(2454056, Date_Calc::DateToDays(16, 11, 2006), '2006 11 16');
-compare('2006 11 17', Date_Calc::DaysToDate(2454057, "%Y %m %d"), '2454057');
-compare(2454057, Date_Calc::DateToDays(17, 11, 2006), '2006 11 17');
-compare('2006 11 18', Date_Calc::DaysToDate(2454058, "%Y %m %d"), '2454058');
-compare(2454058, Date_Calc::DateToDays(18, 11, 2006), '2006 11 18');
-compare('2006 11 19', Date_Calc::DaysToDate(2454059, "%Y %m %d"), '2454059');
-compare(2454059, Date_Calc::DateToDays(19, 11, 2006), '2006 11 19');
-compare('2006 11 20', Date_Calc::DaysToDate(2454060, "%Y %m %d"), '2454060');
-compare(2454060, Date_Calc::DateToDays(20, 11, 2006), '2006 11 20');
-compare('2006 11 21', Date_Calc::DaysToDate(2454061, "%Y %m %d"), '2454061');
-compare(2454061, Date_Calc::DateToDays(21, 11, 2006), '2006 11 21');
-compare('2006 11 22', Date_Calc::DaysToDate(2454062, "%Y %m %d"), '2454062');
-compare(2454062, Date_Calc::DateToDays(22, 11, 2006), '2006 11 22');
-compare('2006 11 23', Date_Calc::DaysToDate(2454063, "%Y %m %d"), '2454063');
-compare(2454063, Date_Calc::DateToDays(23, 11, 2006), '2006 11 23');
-compare('2006 11 24', Date_Calc::DaysToDate(2454064, "%Y %m %d"), '2454064');
-compare(2454064, Date_Calc::DateToDays(24, 11, 2006), '2006 11 24');
-compare('2006 11 25', Date_Calc::DaysToDate(2454065, "%Y %m %d"), '2454065');
-compare(2454065, Date_Calc::DateToDays(25, 11, 2006), '2006 11 25');
-compare('2006 11 26', Date_Calc::DaysToDate(2454066, "%Y %m %d"), '2454066');
-compare(2454066, Date_Calc::DateToDays(26, 11, 2006), '2006 11 26');
-compare('2006 11 27', Date_Calc::DaysToDate(2454067, "%Y %m %d"), '2454067');
-compare(2454067, Date_Calc::DateToDays(27, 11, 2006), '2006 11 27');
-compare('2006 11 28', Date_Calc::DaysToDate(2454068, "%Y %m %d"), '2454068');
-compare(2454068, Date_Calc::DateToDays(28, 11, 2006), '2006 11 28');
-compare('2006 11 29', Date_Calc::DaysToDate(2454069, "%Y %m %d"), '2454069');
-compare(2454069, Date_Calc::DateToDays(29, 11, 2006), '2006 11 29');
-compare('2006 11 30', Date_Calc::DaysToDate(2454070, "%Y %m %d"), '2454070');
-compare(2454070, Date_Calc::DateToDays(30, 11, 2006), '2006 11 30');
-compare('2006 12 01', Date_Calc::DaysToDate(2454071, "%Y %m %d"), '2454071');
-compare(2454071, Date_Calc::DateToDays(1, 12, 2006), '2006 12 01');
-compare('2006 12 02', Date_Calc::DaysToDate(2454072, "%Y %m %d"), '2454072');
-compare(2454072, Date_Calc::DateToDays(2, 12, 2006), '2006 12 02');
-compare('2006 12 03', Date_Calc::DaysToDate(2454073, "%Y %m %d"), '2454073');
-compare(2454073, Date_Calc::DateToDays(3, 12, 2006), '2006 12 03');
-compare('2006 12 04', Date_Calc::DaysToDate(2454074, "%Y %m %d"), '2454074');
-compare(2454074, Date_Calc::DateToDays(4, 12, 2006), '2006 12 04');
-compare('2006 12 05', Date_Calc::DaysToDate(2454075, "%Y %m %d"), '2454075');
-compare(2454075, Date_Calc::DateToDays(5, 12, 2006), '2006 12 05');
-compare('2006 12 06', Date_Calc::DaysToDate(2454076, "%Y %m %d"), '2454076');
-compare(2454076, Date_Calc::DateToDays(6, 12, 2006), '2006 12 06');
-compare('2006 12 07', Date_Calc::DaysToDate(2454077, "%Y %m %d"), '2454077');
-compare(2454077, Date_Calc::DateToDays(7, 12, 2006), '2006 12 07');
-compare('2006 12 08', Date_Calc::DaysToDate(2454078, "%Y %m %d"), '2454078');
-compare(2454078, Date_Calc::DateToDays(8, 12, 2006), '2006 12 08');
-compare('2006 12 09', Date_Calc::DaysToDate(2454079, "%Y %m %d"), '2454079');
-compare(2454079, Date_Calc::DateToDays(9, 12, 2006), '2006 12 09');
-compare('2006 12 10', Date_Calc::DaysToDate(2454080, "%Y %m %d"), '2454080');
-compare(2454080, Date_Calc::DateToDays(10, 12, 2006), '2006 12 10');
-compare('2006 12 11', Date_Calc::DaysToDate(2454081, "%Y %m %d"), '2454081');
-compare(2454081, Date_Calc::DateToDays(11, 12, 2006), '2006 12 11');
-compare('2006 12 12', Date_Calc::DaysToDate(2454082, "%Y %m %d"), '2454082');
-compare(2454082, Date_Calc::DateToDays(12, 12, 2006), '2006 12 12');
-compare('2006 12 13', Date_Calc::DaysToDate(2454083, "%Y %m %d"), '2454083');
-compare(2454083, Date_Calc::DateToDays(13, 12, 2006), '2006 12 13');
-compare('2006 12 14', Date_Calc::DaysToDate(2454084, "%Y %m %d"), '2454084');
-compare(2454084, Date_Calc::DateToDays(14, 12, 2006), '2006 12 14');
-compare('2006 12 15', Date_Calc::DaysToDate(2454085, "%Y %m %d"), '2454085');
-compare(2454085, Date_Calc::DateToDays(15, 12, 2006), '2006 12 15');
-compare('2006 12 16', Date_Calc::DaysToDate(2454086, "%Y %m %d"), '2454086');
-compare(2454086, Date_Calc::DateToDays(16, 12, 2006), '2006 12 16');
-compare('2006 12 17', Date_Calc::DaysToDate(2454087, "%Y %m %d"), '2454087');
-compare(2454087, Date_Calc::DateToDays(17, 12, 2006), '2006 12 17');
-compare('2006 12 18', Date_Calc::DaysToDate(2454088, "%Y %m %d"), '2454088');
-compare(2454088, Date_Calc::DateToDays(18, 12, 2006), '2006 12 18');
-compare('2006 12 19', Date_Calc::DaysToDate(2454089, "%Y %m %d"), '2454089');
-compare(2454089, Date_Calc::DateToDays(19, 12, 2006), '2006 12 19');
-compare('2006 12 20', Date_Calc::DaysToDate(2454090, "%Y %m %d"), '2454090');
-compare(2454090, Date_Calc::DateToDays(20, 12, 2006), '2006 12 20');
-compare('2006 12 21', Date_Calc::DaysToDate(2454091, "%Y %m %d"), '2454091');
-compare(2454091, Date_Calc::DateToDays(21, 12, 2006), '2006 12 21');
-compare('2006 12 22', Date_Calc::DaysToDate(2454092, "%Y %m %d"), '2454092');
-compare(2454092, Date_Calc::DateToDays(22, 12, 2006), '2006 12 22');
-compare('2006 12 23', Date_Calc::DaysToDate(2454093, "%Y %m %d"), '2454093');
-compare(2454093, Date_Calc::DateToDays(23, 12, 2006), '2006 12 23');
-compare('2006 12 24', Date_Calc::DaysToDate(2454094, "%Y %m %d"), '2454094');
-compare(2454094, Date_Calc::DateToDays(24, 12, 2006), '2006 12 24');
-compare('2006 12 25', Date_Calc::DaysToDate(2454095, "%Y %m %d"), '2454095');
-compare(2454095, Date_Calc::DateToDays(25, 12, 2006), '2006 12 25');
-compare('2006 12 26', Date_Calc::DaysToDate(2454096, "%Y %m %d"), '2454096');
-compare(2454096, Date_Calc::DateToDays(26, 12, 2006), '2006 12 26');
-compare('2006 12 27', Date_Calc::DaysToDate(2454097, "%Y %m %d"), '2454097');
-compare(2454097, Date_Calc::DateToDays(27, 12, 2006), '2006 12 27');
-compare('2006 12 28', Date_Calc::DaysToDate(2454098, "%Y %m %d"), '2454098');
-compare(2454098, Date_Calc::DateToDays(28, 12, 2006), '2006 12 28');
-compare('2006 12 29', Date_Calc::DaysToDate(2454099, "%Y %m %d"), '2454099');
-compare(2454099, Date_Calc::DateToDays(29, 12, 2006), '2006 12 29');
-compare('2006 12 30', Date_Calc::DaysToDate(2454100, "%Y %m %d"), '2454100');
-compare(2454100, Date_Calc::DateToDays(30, 12, 2006), '2006 12 30');
-compare('2006 12 31', Date_Calc::DaysToDate(2454101, "%Y %m %d"), '2454101');
-compare(2454101, Date_Calc::DateToDays(31, 12, 2006), '2006 12 31');
-compare('2007 01 01', Date_Calc::DaysToDate(2454102, "%Y %m %d"), '2454102');
-compare(2454102, Date_Calc::DateToDays(1, 1, 2007), '2007 01 01');
-compare('2007 01 02', Date_Calc::DaysToDate(2454103, "%Y %m %d"), '2454103');
-compare(2454103, Date_Calc::DateToDays(2, 1, 2007), '2007 01 02');
-compare('2007 01 03', Date_Calc::DaysToDate(2454104, "%Y %m %d"), '2454104');
-compare(2454104, Date_Calc::DateToDays(3, 1, 2007), '2007 01 03');
-compare('2007 01 04', Date_Calc::DaysToDate(2454105, "%Y %m %d"), '2454105');
-compare(2454105, Date_Calc::DateToDays(4, 1, 2007), '2007 01 04');
-compare('2007 01 05', Date_Calc::DaysToDate(2454106, "%Y %m %d"), '2454106');
-compare(2454106, Date_Calc::DateToDays(5, 1, 2007), '2007 01 05');
-compare('2007 01 06', Date_Calc::DaysToDate(2454107, "%Y %m %d"), '2454107');
-compare(2454107, Date_Calc::DateToDays(6, 1, 2007), '2007 01 06');
-compare('2007 01 07', Date_Calc::DaysToDate(2454108, "%Y %m %d"), '2454108');
-compare(2454108, Date_Calc::DateToDays(7, 1, 2007), '2007 01 07');
-compare('2007 01 08', Date_Calc::DaysToDate(2454109, "%Y %m %d"), '2454109');
-compare(2454109, Date_Calc::DateToDays(8, 1, 2007), '2007 01 08');
-compare('2007 01 09', Date_Calc::DaysToDate(2454110, "%Y %m %d"), '2454110');
-compare(2454110, Date_Calc::DateToDays(9, 1, 2007), '2007 01 09');
-compare('2007 01 10', Date_Calc::DaysToDate(2454111, "%Y %m %d"), '2454111');
-compare(2454111, Date_Calc::DateToDays(10, 1, 2007), '2007 01 10');
-compare('2007 01 11', Date_Calc::DaysToDate(2454112, "%Y %m %d"), '2454112');
-compare(2454112, Date_Calc::DateToDays(11, 1, 2007), '2007 01 11');
-compare('2007 01 12', Date_Calc::DaysToDate(2454113, "%Y %m %d"), '2454113');
-compare(2454113, Date_Calc::DateToDays(12, 1, 2007), '2007 01 12');
-compare('2007 01 13', Date_Calc::DaysToDate(2454114, "%Y %m %d"), '2454114');
-compare(2454114, Date_Calc::DateToDays(13, 1, 2007), '2007 01 13');
-compare('2007 01 14', Date_Calc::DaysToDate(2454115, "%Y %m %d"), '2454115');
-compare(2454115, Date_Calc::DateToDays(14, 1, 2007), '2007 01 14');
-compare('2007 01 15', Date_Calc::DaysToDate(2454116, "%Y %m %d"), '2454116');
-compare(2454116, Date_Calc::DateToDays(15, 1, 2007), '2007 01 15');
-compare('2007 01 16', Date_Calc::DaysToDate(2454117, "%Y %m %d"), '2454117');
-compare(2454117, Date_Calc::DateToDays(16, 1, 2007), '2007 01 16');
-compare('2007 01 17', Date_Calc::DaysToDate(2454118, "%Y %m %d"), '2454118');
-compare(2454118, Date_Calc::DateToDays(17, 1, 2007), '2007 01 17');
-compare('2007 01 18', Date_Calc::DaysToDate(2454119, "%Y %m %d"), '2454119');
-compare(2454119, Date_Calc::DateToDays(18, 1, 2007), '2007 01 18');
-compare('2007 01 19', Date_Calc::DaysToDate(2454120, "%Y %m %d"), '2454120');
-compare(2454120, Date_Calc::DateToDays(19, 1, 2007), '2007 01 19');
-compare('2007 01 20', Date_Calc::DaysToDate(2454121, "%Y %m %d"), '2454121');
-compare(2454121, Date_Calc::DateToDays(20, 1, 2007), '2007 01 20');
-compare('2007 01 21', Date_Calc::DaysToDate(2454122, "%Y %m %d"), '2454122');
-compare(2454122, Date_Calc::DateToDays(21, 1, 2007), '2007 01 21');
-compare('2007 01 22', Date_Calc::DaysToDate(2454123, "%Y %m %d"), '2454123');
-compare(2454123, Date_Calc::DateToDays(22, 1, 2007), '2007 01 22');
-compare('2007 01 23', Date_Calc::DaysToDate(2454124, "%Y %m %d"), '2454124');
-compare(2454124, Date_Calc::DateToDays(23, 1, 2007), '2007 01 23');
-compare('2007 01 24', Date_Calc::DaysToDate(2454125, "%Y %m %d"), '2454125');
-compare(2454125, Date_Calc::DateToDays(24, 1, 2007), '2007 01 24');
-compare('2007 01 25', Date_Calc::DaysToDate(2454126, "%Y %m %d"), '2454126');
-compare(2454126, Date_Calc::DateToDays(25, 1, 2007), '2007 01 25');
-compare('2007 01 26', Date_Calc::DaysToDate(2454127, "%Y %m %d"), '2454127');
-compare(2454127, Date_Calc::DateToDays(26, 1, 2007), '2007 01 26');
-compare('2007 01 27', Date_Calc::DaysToDate(2454128, "%Y %m %d"), '2454128');
-compare(2454128, Date_Calc::DateToDays(27, 1, 2007), '2007 01 27');
-compare('2007 01 28', Date_Calc::DaysToDate(2454129, "%Y %m %d"), '2454129');
-compare(2454129, Date_Calc::DateToDays(28, 1, 2007), '2007 01 28');
-compare('2007 01 29', Date_Calc::DaysToDate(2454130, "%Y %m %d"), '2454130');
-compare(2454130, Date_Calc::DateToDays(29, 1, 2007), '2007 01 29');
-compare('2007 01 30', Date_Calc::DaysToDate(2454131, "%Y %m %d"), '2454131');
-compare(2454131, Date_Calc::DateToDays(30, 1, 2007), '2007 01 30');
-compare('2007 01 31', Date_Calc::DaysToDate(2454132, "%Y %m %d"), '2454132');
-compare(2454132, Date_Calc::DateToDays(31, 1, 2007), '2007 01 31');
-compare('2007 02 01', Date_Calc::DaysToDate(2454133, "%Y %m %d"), '2454133');
-compare(2454133, Date_Calc::DateToDays(1, 2, 2007), '2007 02 01');
-compare('2007 02 02', Date_Calc::DaysToDate(2454134, "%Y %m %d"), '2454134');
-compare(2454134, Date_Calc::DateToDays(2, 2, 2007), '2007 02 02');
-compare('2007 02 03', Date_Calc::DaysToDate(2454135, "%Y %m %d"), '2454135');
-compare(2454135, Date_Calc::DateToDays(3, 2, 2007), '2007 02 03');
-compare('2007 02 04', Date_Calc::DaysToDate(2454136, "%Y %m %d"), '2454136');
-compare(2454136, Date_Calc::DateToDays(4, 2, 2007), '2007 02 04');
-compare('2007 02 05', Date_Calc::DaysToDate(2454137, "%Y %m %d"), '2454137');
-compare(2454137, Date_Calc::DateToDays(5, 2, 2007), '2007 02 05');
-compare('2007 02 06', Date_Calc::DaysToDate(2454138, "%Y %m %d"), '2454138');
-compare(2454138, Date_Calc::DateToDays(6, 2, 2007), '2007 02 06');
-compare('2007 02 07', Date_Calc::DaysToDate(2454139, "%Y %m %d"), '2454139');
-compare(2454139, Date_Calc::DateToDays(7, 2, 2007), '2007 02 07');
-compare('2007 02 08', Date_Calc::DaysToDate(2454140, "%Y %m %d"), '2454140');
-compare(2454140, Date_Calc::DateToDays(8, 2, 2007), '2007 02 08');
-compare('2007 02 09', Date_Calc::DaysToDate(2454141, "%Y %m %d"), '2454141');
-compare(2454141, Date_Calc::DateToDays(9, 2, 2007), '2007 02 09');
-compare('2007 02 10', Date_Calc::DaysToDate(2454142, "%Y %m %d"), '2454142');
-compare(2454142, Date_Calc::DateToDays(10, 2, 2007), '2007 02 10');
-compare('2007 02 11', Date_Calc::DaysToDate(2454143, "%Y %m %d"), '2454143');
-compare(2454143, Date_Calc::DateToDays(11, 2, 2007), '2007 02 11');
-compare('2007 02 12', Date_Calc::DaysToDate(2454144, "%Y %m %d"), '2454144');
-compare(2454144, Date_Calc::DateToDays(12, 2, 2007), '2007 02 12');
-compare('2007 02 13', Date_Calc::DaysToDate(2454145, "%Y %m %d"), '2454145');
-compare(2454145, Date_Calc::DateToDays(13, 2, 2007), '2007 02 13');
-compare('2007 02 14', Date_Calc::DaysToDate(2454146, "%Y %m %d"), '2454146');
-compare(2454146, Date_Calc::DateToDays(14, 2, 2007), '2007 02 14');
-compare('2007 02 15', Date_Calc::DaysToDate(2454147, "%Y %m %d"), '2454147');
-compare(2454147, Date_Calc::DateToDays(15, 2, 2007), '2007 02 15');
-compare('2007 02 16', Date_Calc::DaysToDate(2454148, "%Y %m %d"), '2454148');
-compare(2454148, Date_Calc::DateToDays(16, 2, 2007), '2007 02 16');
-compare('2007 02 17', Date_Calc::DaysToDate(2454149, "%Y %m %d"), '2454149');
-compare(2454149, Date_Calc::DateToDays(17, 2, 2007), '2007 02 17');
-compare('2007 02 18', Date_Calc::DaysToDate(2454150, "%Y %m %d"), '2454150');
-compare(2454150, Date_Calc::DateToDays(18, 2, 2007), '2007 02 18');
-compare('2007 02 19', Date_Calc::DaysToDate(2454151, "%Y %m %d"), '2454151');
-compare(2454151, Date_Calc::DateToDays(19, 2, 2007), '2007 02 19');
-compare('2007 02 20', Date_Calc::DaysToDate(2454152, "%Y %m %d"), '2454152');
-compare(2454152, Date_Calc::DateToDays(20, 2, 2007), '2007 02 20');
-compare('2007 02 21', Date_Calc::DaysToDate(2454153, "%Y %m %d"), '2454153');
-compare(2454153, Date_Calc::DateToDays(21, 2, 2007), '2007 02 21');
-compare('2007 02 22', Date_Calc::DaysToDate(2454154, "%Y %m %d"), '2454154');
-compare(2454154, Date_Calc::DateToDays(22, 2, 2007), '2007 02 22');
-compare('2007 02 23', Date_Calc::DaysToDate(2454155, "%Y %m %d"), '2454155');
-compare(2454155, Date_Calc::DateToDays(23, 2, 2007), '2007 02 23');
-compare('2007 02 24', Date_Calc::DaysToDate(2454156, "%Y %m %d"), '2454156');
-compare(2454156, Date_Calc::DateToDays(24, 2, 2007), '2007 02 24');
-compare('2007 02 25', Date_Calc::DaysToDate(2454157, "%Y %m %d"), '2454157');
-compare(2454157, Date_Calc::DateToDays(25, 2, 2007), '2007 02 25');
-compare('2007 02 26', Date_Calc::DaysToDate(2454158, "%Y %m %d"), '2454158');
-compare(2454158, Date_Calc::DateToDays(26, 2, 2007), '2007 02 26');
-compare('2007 02 27', Date_Calc::DaysToDate(2454159, "%Y %m %d"), '2454159');
-compare(2454159, Date_Calc::DateToDays(27, 2, 2007), '2007 02 27');
-compare('2007 02 28', Date_Calc::DaysToDate(2454160, "%Y %m %d"), '2454160');
-compare(2454160, Date_Calc::DateToDays(28, 2, 2007), '2007 02 28');
-compare('2007 03 01', Date_Calc::DaysToDate(2454161, "%Y %m %d"), '2454161');
-compare(2454161, Date_Calc::DateToDays(1, 3, 2007), '2007 03 01');
-compare('2007 03 02', Date_Calc::DaysToDate(2454162, "%Y %m %d"), '2454162');
-compare(2454162, Date_Calc::DateToDays(2, 3, 2007), '2007 03 02');
-compare('2007 03 03', Date_Calc::DaysToDate(2454163, "%Y %m %d"), '2454163');
-compare(2454163, Date_Calc::DateToDays(3, 3, 2007), '2007 03 03');
-compare('2007 03 04', Date_Calc::DaysToDate(2454164, "%Y %m %d"), '2454164');
-compare(2454164, Date_Calc::DateToDays(4, 3, 2007), '2007 03 04');
-compare('2007 03 05', Date_Calc::DaysToDate(2454165, "%Y %m %d"), '2454165');
-compare(2454165, Date_Calc::DateToDays(5, 3, 2007), '2007 03 05');
-compare('2007 03 06', Date_Calc::DaysToDate(2454166, "%Y %m %d"), '2454166');
-compare(2454166, Date_Calc::DateToDays(6, 3, 2007), '2007 03 06');
-compare('2007 03 07', Date_Calc::DaysToDate(2454167, "%Y %m %d"), '2454167');
-compare(2454167, Date_Calc::DateToDays(7, 3, 2007), '2007 03 07');
-compare('2007 03 08', Date_Calc::DaysToDate(2454168, "%Y %m %d"), '2454168');
-compare(2454168, Date_Calc::DateToDays(8, 3, 2007), '2007 03 08');
-compare('2007 03 09', Date_Calc::DaysToDate(2454169, "%Y %m %d"), '2454169');
-compare(2454169, Date_Calc::DateToDays(9, 3, 2007), '2007 03 09');
-compare('2007 03 10', Date_Calc::DaysToDate(2454170, "%Y %m %d"), '2454170');
-compare(2454170, Date_Calc::DateToDays(10, 3, 2007), '2007 03 10');
-compare('2007 03 11', Date_Calc::DaysToDate(2454171, "%Y %m %d"), '2454171');
-compare(2454171, Date_Calc::DateToDays(11, 3, 2007), '2007 03 11');
-compare('2007 03 12', Date_Calc::DaysToDate(2454172, "%Y %m %d"), '2454172');
-compare(2454172, Date_Calc::DateToDays(12, 3, 2007), '2007 03 12');
-compare('2007 03 13', Date_Calc::DaysToDate(2454173, "%Y %m %d"), '2454173');
-compare(2454173, Date_Calc::DateToDays(13, 3, 2007), '2007 03 13');
-compare('2007 03 14', Date_Calc::DaysToDate(2454174, "%Y %m %d"), '2454174');
-compare(2454174, Date_Calc::DateToDays(14, 3, 2007), '2007 03 14');
-compare('2007 03 15', Date_Calc::DaysToDate(2454175, "%Y %m %d"), '2454175');
-compare(2454175, Date_Calc::DateToDays(15, 3, 2007), '2007 03 15');
-compare('2007 03 16', Date_Calc::DaysToDate(2454176, "%Y %m %d"), '2454176');
-compare(2454176, Date_Calc::DateToDays(16, 3, 2007), '2007 03 16');
-compare('2007 03 17', Date_Calc::DaysToDate(2454177, "%Y %m %d"), '2454177');
-compare(2454177, Date_Calc::DateToDays(17, 3, 2007), '2007 03 17');
-compare('2007 03 18', Date_Calc::DaysToDate(2454178, "%Y %m %d"), '2454178');
-compare(2454178, Date_Calc::DateToDays(18, 3, 2007), '2007 03 18');
-compare('2007 03 19', Date_Calc::DaysToDate(2454179, "%Y %m %d"), '2454179');
-compare(2454179, Date_Calc::DateToDays(19, 3, 2007), '2007 03 19');
-compare('2007 03 20', Date_Calc::DaysToDate(2454180, "%Y %m %d"), '2454180');
-compare(2454180, Date_Calc::DateToDays(20, 3, 2007), '2007 03 20');
-compare('2007 03 21', Date_Calc::DaysToDate(2454181, "%Y %m %d"), '2454181');
-compare(2454181, Date_Calc::DateToDays(21, 3, 2007), '2007 03 21');
-compare('2007 03 22', Date_Calc::DaysToDate(2454182, "%Y %m %d"), '2454182');
-compare(2454182, Date_Calc::DateToDays(22, 3, 2007), '2007 03 22');
-compare('2007 03 23', Date_Calc::DaysToDate(2454183, "%Y %m %d"), '2454183');
-compare(2454183, Date_Calc::DateToDays(23, 3, 2007), '2007 03 23');
-compare('2007 03 24', Date_Calc::DaysToDate(2454184, "%Y %m %d"), '2454184');
-compare(2454184, Date_Calc::DateToDays(24, 3, 2007), '2007 03 24');
-compare('2007 03 25', Date_Calc::DaysToDate(2454185, "%Y %m %d"), '2454185');
-compare(2454185, Date_Calc::DateToDays(25, 3, 2007), '2007 03 25');
-compare('2007 03 26', Date_Calc::DaysToDate(2454186, "%Y %m %d"), '2454186');
-compare(2454186, Date_Calc::DateToDays(26, 3, 2007), '2007 03 26');
-compare('2007 03 27', Date_Calc::DaysToDate(2454187, "%Y %m %d"), '2454187');
-compare(2454187, Date_Calc::DateToDays(27, 3, 2007), '2007 03 27');
-compare('2007 03 28', Date_Calc::DaysToDate(2454188, "%Y %m %d"), '2454188');
-compare(2454188, Date_Calc::DateToDays(28, 3, 2007), '2007 03 28');
-compare('2007 03 29', Date_Calc::DaysToDate(2454189, "%Y %m %d"), '2454189');
-compare(2454189, Date_Calc::DateToDays(29, 3, 2007), '2007 03 29');
-compare('2007 03 30', Date_Calc::DaysToDate(2454190, "%Y %m %d"), '2454190');
-compare(2454190, Date_Calc::DateToDays(30, 3, 2007), '2007 03 30');
-compare('2007 03 31', Date_Calc::DaysToDate(2454191, "%Y %m %d"), '2454191');
-compare(2454191, Date_Calc::DateToDays(31, 3, 2007), '2007 03 31');
-compare('2007 04 01', Date_Calc::DaysToDate(2454192, "%Y %m %d"), '2454192');
-compare(2454192, Date_Calc::DateToDays(1, 4, 2007), '2007 04 01');
-compare('2007 04 02', Date_Calc::DaysToDate(2454193, "%Y %m %d"), '2454193');
-compare(2454193, Date_Calc::DateToDays(2, 4, 2007), '2007 04 02');
-compare('2007 04 03', Date_Calc::DaysToDate(2454194, "%Y %m %d"), '2454194');
-compare(2454194, Date_Calc::DateToDays(3, 4, 2007), '2007 04 03');
-compare('2007 04 04', Date_Calc::DaysToDate(2454195, "%Y %m %d"), '2454195');
-compare(2454195, Date_Calc::DateToDays(4, 4, 2007), '2007 04 04');
-compare('2007 04 05', Date_Calc::DaysToDate(2454196, "%Y %m %d"), '2454196');
-compare(2454196, Date_Calc::DateToDays(5, 4, 2007), '2007 04 05');
-compare('2007 04 06', Date_Calc::DaysToDate(2454197, "%Y %m %d"), '2454197');
-compare(2454197, Date_Calc::DateToDays(6, 4, 2007), '2007 04 06');
-compare('2007 04 07', Date_Calc::DaysToDate(2454198, "%Y %m %d"), '2454198');
-compare(2454198, Date_Calc::DateToDays(7, 4, 2007), '2007 04 07');
-compare('2007 04 08', Date_Calc::DaysToDate(2454199, "%Y %m %d"), '2454199');
-compare(2454199, Date_Calc::DateToDays(8, 4, 2007), '2007 04 08');
-compare('2007 04 09', Date_Calc::DaysToDate(2454200, "%Y %m %d"), '2454200');
-compare(2454200, Date_Calc::DateToDays(9, 4, 2007), '2007 04 09');
-compare('2007 04 10', Date_Calc::DaysToDate(2454201, "%Y %m %d"), '2454201');
-compare(2454201, Date_Calc::DateToDays(10, 4, 2007), '2007 04 10');
-compare('2007 04 11', Date_Calc::DaysToDate(2454202, "%Y %m %d"), '2454202');
-compare(2454202, Date_Calc::DateToDays(11, 4, 2007), '2007 04 11');
-compare('2007 04 12', Date_Calc::DaysToDate(2454203, "%Y %m %d"), '2454203');
-compare(2454203, Date_Calc::DateToDays(12, 4, 2007), '2007 04 12');
-compare('2007 04 13', Date_Calc::DaysToDate(2454204, "%Y %m %d"), '2454204');
-compare(2454204, Date_Calc::DateToDays(13, 4, 2007), '2007 04 13');
-compare('2007 04 14', Date_Calc::DaysToDate(2454205, "%Y %m %d"), '2454205');
-compare(2454205, Date_Calc::DateToDays(14, 4, 2007), '2007 04 14');
-compare('2007 04 15', Date_Calc::DaysToDate(2454206, "%Y %m %d"), '2454206');
-compare(2454206, Date_Calc::DateToDays(15, 4, 2007), '2007 04 15');
-compare('2007 04 16', Date_Calc::DaysToDate(2454207, "%Y %m %d"), '2454207');
-compare(2454207, Date_Calc::DateToDays(16, 4, 2007), '2007 04 16');
-compare('2007 04 17', Date_Calc::DaysToDate(2454208, "%Y %m %d"), '2454208');
-compare(2454208, Date_Calc::DateToDays(17, 4, 2007), '2007 04 17');
-compare('2007 04 18', Date_Calc::DaysToDate(2454209, "%Y %m %d"), '2454209');
-compare(2454209, Date_Calc::DateToDays(18, 4, 2007), '2007 04 18');
-compare('2007 04 19', Date_Calc::DaysToDate(2454210, "%Y %m %d"), '2454210');
-compare(2454210, Date_Calc::DateToDays(19, 4, 2007), '2007 04 19');
-compare('2007 04 20', Date_Calc::DaysToDate(2454211, "%Y %m %d"), '2454211');
-compare(2454211, Date_Calc::DateToDays(20, 4, 2007), '2007 04 20');
-compare('2007 04 21', Date_Calc::DaysToDate(2454212, "%Y %m %d"), '2454212');
-compare(2454212, Date_Calc::DateToDays(21, 4, 2007), '2007 04 21');
-compare('2007 04 22', Date_Calc::DaysToDate(2454213, "%Y %m %d"), '2454213');
-compare(2454213, Date_Calc::DateToDays(22, 4, 2007), '2007 04 22');
-compare('2007 04 23', Date_Calc::DaysToDate(2454214, "%Y %m %d"), '2454214');
-compare(2454214, Date_Calc::DateToDays(23, 4, 2007), '2007 04 23');
-compare('2007 04 24', Date_Calc::DaysToDate(2454215, "%Y %m %d"), '2454215');
-compare(2454215, Date_Calc::DateToDays(24, 4, 2007), '2007 04 24');
-compare('2007 04 25', Date_Calc::DaysToDate(2454216, "%Y %m %d"), '2454216');
-compare(2454216, Date_Calc::DateToDays(25, 4, 2007), '2007 04 25');
-compare('2007 04 26', Date_Calc::DaysToDate(2454217, "%Y %m %d"), '2454217');
-compare(2454217, Date_Calc::DateToDays(26, 4, 2007), '2007 04 26');
-compare('2007 04 27', Date_Calc::DaysToDate(2454218, "%Y %m %d"), '2454218');
-compare(2454218, Date_Calc::DateToDays(27, 4, 2007), '2007 04 27');
-compare('2007 04 28', Date_Calc::DaysToDate(2454219, "%Y %m %d"), '2454219');
-compare(2454219, Date_Calc::DateToDays(28, 4, 2007), '2007 04 28');
-compare('2007 04 29', Date_Calc::DaysToDate(2454220, "%Y %m %d"), '2454220');
-compare(2454220, Date_Calc::DateToDays(29, 4, 2007), '2007 04 29');
-compare('2007 04 30', Date_Calc::DaysToDate(2454221, "%Y %m %d"), '2454221');
-compare(2454221, Date_Calc::DateToDays(30, 4, 2007), '2007 04 30');
-compare('2007 05 01', Date_Calc::DaysToDate(2454222, "%Y %m %d"), '2454222');
-compare(2454222, Date_Calc::DateToDays(1, 5, 2007), '2007 05 01');
-compare('2007 05 02', Date_Calc::DaysToDate(2454223, "%Y %m %d"), '2454223');
-compare(2454223, Date_Calc::DateToDays(2, 5, 2007), '2007 05 02');
-compare('2007 05 03', Date_Calc::DaysToDate(2454224, "%Y %m %d"), '2454224');
-compare(2454224, Date_Calc::DateToDays(3, 5, 2007), '2007 05 03');
-compare('2007 05 04', Date_Calc::DaysToDate(2454225, "%Y %m %d"), '2454225');
-compare(2454225, Date_Calc::DateToDays(4, 5, 2007), '2007 05 04');
-compare('2007 05 05', Date_Calc::DaysToDate(2454226, "%Y %m %d"), '2454226');
-compare(2454226, Date_Calc::DateToDays(5, 5, 2007), '2007 05 05');
-compare('2007 05 06', Date_Calc::DaysToDate(2454227, "%Y %m %d"), '2454227');
-compare(2454227, Date_Calc::DateToDays(6, 5, 2007), '2007 05 06');
-compare('2007 05 07', Date_Calc::DaysToDate(2454228, "%Y %m %d"), '2454228');
-compare(2454228, Date_Calc::DateToDays(7, 5, 2007), '2007 05 07');
-compare('2007 05 08', Date_Calc::DaysToDate(2454229, "%Y %m %d"), '2454229');
-compare(2454229, Date_Calc::DateToDays(8, 5, 2007), '2007 05 08');
-compare('2007 05 09', Date_Calc::DaysToDate(2454230, "%Y %m %d"), '2454230');
-compare(2454230, Date_Calc::DateToDays(9, 5, 2007), '2007 05 09');
-compare('2007 05 10', Date_Calc::DaysToDate(2454231, "%Y %m %d"), '2454231');
-compare(2454231, Date_Calc::DateToDays(10, 5, 2007), '2007 05 10');
-compare('2007 05 11', Date_Calc::DaysToDate(2454232, "%Y %m %d"), '2454232');
-compare(2454232, Date_Calc::DateToDays(11, 5, 2007), '2007 05 11');
-compare('2007 05 12', Date_Calc::DaysToDate(2454233, "%Y %m %d"), '2454233');
-compare(2454233, Date_Calc::DateToDays(12, 5, 2007), '2007 05 12');
-compare('2007 05 13', Date_Calc::DaysToDate(2454234, "%Y %m %d"), '2454234');
-compare(2454234, Date_Calc::DateToDays(13, 5, 2007), '2007 05 13');
-compare('2007 05 14', Date_Calc::DaysToDate(2454235, "%Y %m %d"), '2454235');
-compare(2454235, Date_Calc::DateToDays(14, 5, 2007), '2007 05 14');
-compare('2007 05 15', Date_Calc::DaysToDate(2454236, "%Y %m %d"), '2454236');
-compare(2454236, Date_Calc::DateToDays(15, 5, 2007), '2007 05 15');
-compare('2007 05 16', Date_Calc::DaysToDate(2454237, "%Y %m %d"), '2454237');
-compare(2454237, Date_Calc::DateToDays(16, 5, 2007), '2007 05 16');
-compare('2007 05 17', Date_Calc::DaysToDate(2454238, "%Y %m %d"), '2454238');
-compare(2454238, Date_Calc::DateToDays(17, 5, 2007), '2007 05 17');
-compare('2007 05 18', Date_Calc::DaysToDate(2454239, "%Y %m %d"), '2454239');
-compare(2454239, Date_Calc::DateToDays(18, 5, 2007), '2007 05 18');
-compare('2007 05 19', Date_Calc::DaysToDate(2454240, "%Y %m %d"), '2454240');
-compare(2454240, Date_Calc::DateToDays(19, 5, 2007), '2007 05 19');
-compare('2007 05 20', Date_Calc::DaysToDate(2454241, "%Y %m %d"), '2454241');
-compare(2454241, Date_Calc::DateToDays(20, 5, 2007), '2007 05 20');
-compare('2007 05 21', Date_Calc::DaysToDate(2454242, "%Y %m %d"), '2454242');
-compare(2454242, Date_Calc::DateToDays(21, 5, 2007), '2007 05 21');
-compare('2007 05 22', Date_Calc::DaysToDate(2454243, "%Y %m %d"), '2454243');
-compare(2454243, Date_Calc::DateToDays(22, 5, 2007), '2007 05 22');
-compare('2007 05 23', Date_Calc::DaysToDate(2454244, "%Y %m %d"), '2454244');
-compare(2454244, Date_Calc::DateToDays(23, 5, 2007), '2007 05 23');
-compare('2007 05 24', Date_Calc::DaysToDate(2454245, "%Y %m %d"), '2454245');
-compare(2454245, Date_Calc::DateToDays(24, 5, 2007), '2007 05 24');
-compare('2007 05 25', Date_Calc::DaysToDate(2454246, "%Y %m %d"), '2454246');
-compare(2454246, Date_Calc::DateToDays(25, 5, 2007), '2007 05 25');
-compare('2007 05 26', Date_Calc::DaysToDate(2454247, "%Y %m %d"), '2454247');
-compare(2454247, Date_Calc::DateToDays(26, 5, 2007), '2007 05 26');
-compare('2007 05 27', Date_Calc::DaysToDate(2454248, "%Y %m %d"), '2454248');
-compare(2454248, Date_Calc::DateToDays(27, 5, 2007), '2007 05 27');
-compare('2007 05 28', Date_Calc::DaysToDate(2454249, "%Y %m %d"), '2454249');
-compare(2454249, Date_Calc::DateToDays(28, 5, 2007), '2007 05 28');
-compare('2007 05 29', Date_Calc::DaysToDate(2454250, "%Y %m %d"), '2454250');
-compare(2454250, Date_Calc::DateToDays(29, 5, 2007), '2007 05 29');
-compare('2007 05 30', Date_Calc::DaysToDate(2454251, "%Y %m %d"), '2454251');
-compare(2454251, Date_Calc::DateToDays(30, 5, 2007), '2007 05 30');
-compare('2007 05 31', Date_Calc::DaysToDate(2454252, "%Y %m %d"), '2454252');
-compare(2454252, Date_Calc::DateToDays(31, 5, 2007), '2007 05 31');
-compare('2007 06 01', Date_Calc::DaysToDate(2454253, "%Y %m %d"), '2454253');
-compare(2454253, Date_Calc::DateToDays(1, 6, 2007), '2007 06 01');
-compare('2007 06 02', Date_Calc::DaysToDate(2454254, "%Y %m %d"), '2454254');
-compare(2454254, Date_Calc::DateToDays(2, 6, 2007), '2007 06 02');
-compare('2007 06 03', Date_Calc::DaysToDate(2454255, "%Y %m %d"), '2454255');
-compare(2454255, Date_Calc::DateToDays(3, 6, 2007), '2007 06 03');
-compare('2007 06 04', Date_Calc::DaysToDate(2454256, "%Y %m %d"), '2454256');
-compare(2454256, Date_Calc::DateToDays(4, 6, 2007), '2007 06 04');
-compare('2007 06 05', Date_Calc::DaysToDate(2454257, "%Y %m %d"), '2454257');
-compare(2454257, Date_Calc::DateToDays(5, 6, 2007), '2007 06 05');
-compare('2007 06 06', Date_Calc::DaysToDate(2454258, "%Y %m %d"), '2454258');
-compare(2454258, Date_Calc::DateToDays(6, 6, 2007), '2007 06 06');
-compare('2007 06 07', Date_Calc::DaysToDate(2454259, "%Y %m %d"), '2454259');
-compare(2454259, Date_Calc::DateToDays(7, 6, 2007), '2007 06 07');
-compare('2007 06 08', Date_Calc::DaysToDate(2454260, "%Y %m %d"), '2454260');
-compare(2454260, Date_Calc::DateToDays(8, 6, 2007), '2007 06 08');
-compare('2007 06 09', Date_Calc::DaysToDate(2454261, "%Y %m %d"), '2454261');
-compare(2454261, Date_Calc::DateToDays(9, 6, 2007), '2007 06 09');
-compare('2007 06 10', Date_Calc::DaysToDate(2454262, "%Y %m %d"), '2454262');
-compare(2454262, Date_Calc::DateToDays(10, 6, 2007), '2007 06 10');
-compare('2007 06 11', Date_Calc::DaysToDate(2454263, "%Y %m %d"), '2454263');
-compare(2454263, Date_Calc::DateToDays(11, 6, 2007), '2007 06 11');
-compare('2007 06 12', Date_Calc::DaysToDate(2454264, "%Y %m %d"), '2454264');
-compare(2454264, Date_Calc::DateToDays(12, 6, 2007), '2007 06 12');
-compare('2007 06 13', Date_Calc::DaysToDate(2454265, "%Y %m %d"), '2454265');
-compare(2454265, Date_Calc::DateToDays(13, 6, 2007), '2007 06 13');
-compare('2007 06 14', Date_Calc::DaysToDate(2454266, "%Y %m %d"), '2454266');
-compare(2454266, Date_Calc::DateToDays(14, 6, 2007), '2007 06 14');
-compare('2007 06 15', Date_Calc::DaysToDate(2454267, "%Y %m %d"), '2454267');
-compare(2454267, Date_Calc::DateToDays(15, 6, 2007), '2007 06 15');
-compare('2007 06 16', Date_Calc::DaysToDate(2454268, "%Y %m %d"), '2454268');
-compare(2454268, Date_Calc::DateToDays(16, 6, 2007), '2007 06 16');
-compare('2007 06 17', Date_Calc::DaysToDate(2454269, "%Y %m %d"), '2454269');
-compare(2454269, Date_Calc::DateToDays(17, 6, 2007), '2007 06 17');
-compare('2007 06 18', Date_Calc::DaysToDate(2454270, "%Y %m %d"), '2454270');
-compare(2454270, Date_Calc::DateToDays(18, 6, 2007), '2007 06 18');
-compare('2007 06 19', Date_Calc::DaysToDate(2454271, "%Y %m %d"), '2454271');
-compare(2454271, Date_Calc::DateToDays(19, 6, 2007), '2007 06 19');
-compare('2007 06 20', Date_Calc::DaysToDate(2454272, "%Y %m %d"), '2454272');
-compare(2454272, Date_Calc::DateToDays(20, 6, 2007), '2007 06 20');
-compare('2007 06 21', Date_Calc::DaysToDate(2454273, "%Y %m %d"), '2454273');
-compare(2454273, Date_Calc::DateToDays(21, 6, 2007), '2007 06 21');
-compare('2007 06 22', Date_Calc::DaysToDate(2454274, "%Y %m %d"), '2454274');
-compare(2454274, Date_Calc::DateToDays(22, 6, 2007), '2007 06 22');
-compare('2007 06 23', Date_Calc::DaysToDate(2454275, "%Y %m %d"), '2454275');
-compare(2454275, Date_Calc::DateToDays(23, 6, 2007), '2007 06 23');
-compare('2007 06 24', Date_Calc::DaysToDate(2454276, "%Y %m %d"), '2454276');
-compare(2454276, Date_Calc::DateToDays(24, 6, 2007), '2007 06 24');
-compare('2007 06 25', Date_Calc::DaysToDate(2454277, "%Y %m %d"), '2454277');
-compare(2454277, Date_Calc::DateToDays(25, 6, 2007), '2007 06 25');
-compare('2007 06 26', Date_Calc::DaysToDate(2454278, "%Y %m %d"), '2454278');
-compare(2454278, Date_Calc::DateToDays(26, 6, 2007), '2007 06 26');
-compare('2007 06 27', Date_Calc::DaysToDate(2454279, "%Y %m %d"), '2454279');
-compare(2454279, Date_Calc::DateToDays(27, 6, 2007), '2007 06 27');
-compare('2007 06 28', Date_Calc::DaysToDate(2454280, "%Y %m %d"), '2454280');
-compare(2454280, Date_Calc::DateToDays(28, 6, 2007), '2007 06 28');
-compare('2007 06 29', Date_Calc::DaysToDate(2454281, "%Y %m %d"), '2454281');
-compare(2454281, Date_Calc::DateToDays(29, 6, 2007), '2007 06 29');
-compare('2007 06 30', Date_Calc::DaysToDate(2454282, "%Y %m %d"), '2454282');
-compare(2454282, Date_Calc::DateToDays(30, 6, 2007), '2007 06 30');
-compare('2007 07 01', Date_Calc::DaysToDate(2454283, "%Y %m %d"), '2454283');
-compare(2454283, Date_Calc::DateToDays(1, 7, 2007), '2007 07 01');
-compare('2007 07 02', Date_Calc::DaysToDate(2454284, "%Y %m %d"), '2454284');
-compare(2454284, Date_Calc::DateToDays(2, 7, 2007), '2007 07 02');
-compare('2007 07 03', Date_Calc::DaysToDate(2454285, "%Y %m %d"), '2454285');
-compare(2454285, Date_Calc::DateToDays(3, 7, 2007), '2007 07 03');
-compare('2007 07 04', Date_Calc::DaysToDate(2454286, "%Y %m %d"), '2454286');
-compare(2454286, Date_Calc::DateToDays(4, 7, 2007), '2007 07 04');
-compare('2007 07 05', Date_Calc::DaysToDate(2454287, "%Y %m %d"), '2454287');
-compare(2454287, Date_Calc::DateToDays(5, 7, 2007), '2007 07 05');
-compare('2007 07 06', Date_Calc::DaysToDate(2454288, "%Y %m %d"), '2454288');
-compare(2454288, Date_Calc::DateToDays(6, 7, 2007), '2007 07 06');
-compare('2007 07 07', Date_Calc::DaysToDate(2454289, "%Y %m %d"), '2454289');
-compare(2454289, Date_Calc::DateToDays(7, 7, 2007), '2007 07 07');
-compare('2007 07 08', Date_Calc::DaysToDate(2454290, "%Y %m %d"), '2454290');
-compare(2454290, Date_Calc::DateToDays(8, 7, 2007), '2007 07 08');
-compare('2007 07 09', Date_Calc::DaysToDate(2454291, "%Y %m %d"), '2454291');
-compare(2454291, Date_Calc::DateToDays(9, 7, 2007), '2007 07 09');
-compare('2007 07 10', Date_Calc::DaysToDate(2454292, "%Y %m %d"), '2454292');
-compare(2454292, Date_Calc::DateToDays(10, 7, 2007), '2007 07 10');
-compare('2007 07 11', Date_Calc::DaysToDate(2454293, "%Y %m %d"), '2454293');
-compare(2454293, Date_Calc::DateToDays(11, 7, 2007), '2007 07 11');
-compare('2007 07 12', Date_Calc::DaysToDate(2454294, "%Y %m %d"), '2454294');
-compare(2454294, Date_Calc::DateToDays(12, 7, 2007), '2007 07 12');
-compare('2007 07 13', Date_Calc::DaysToDate(2454295, "%Y %m %d"), '2454295');
-compare(2454295, Date_Calc::DateToDays(13, 7, 2007), '2007 07 13');
-compare('2007 07 14', Date_Calc::DaysToDate(2454296, "%Y %m %d"), '2454296');
-compare(2454296, Date_Calc::DateToDays(14, 7, 2007), '2007 07 14');
-compare('2007 07 15', Date_Calc::DaysToDate(2454297, "%Y %m %d"), '2454297');
-compare(2454297, Date_Calc::DateToDays(15, 7, 2007), '2007 07 15');
-compare('2007 07 16', Date_Calc::DaysToDate(2454298, "%Y %m %d"), '2454298');
-compare(2454298, Date_Calc::DateToDays(16, 7, 2007), '2007 07 16');
-compare('2007 07 17', Date_Calc::DaysToDate(2454299, "%Y %m %d"), '2454299');
-compare(2454299, Date_Calc::DateToDays(17, 7, 2007), '2007 07 17');
-compare('2007 07 18', Date_Calc::DaysToDate(2454300, "%Y %m %d"), '2454300');
-compare(2454300, Date_Calc::DateToDays(18, 7, 2007), '2007 07 18');
-compare('2007 07 19', Date_Calc::DaysToDate(2454301, "%Y %m %d"), '2454301');
-compare(2454301, Date_Calc::DateToDays(19, 7, 2007), '2007 07 19');
-compare('2007 07 20', Date_Calc::DaysToDate(2454302, "%Y %m %d"), '2454302');
-compare(2454302, Date_Calc::DateToDays(20, 7, 2007), '2007 07 20');
-compare('2007 07 21', Date_Calc::DaysToDate(2454303, "%Y %m %d"), '2454303');
-compare(2454303, Date_Calc::DateToDays(21, 7, 2007), '2007 07 21');
-compare('2007 07 22', Date_Calc::DaysToDate(2454304, "%Y %m %d"), '2454304');
-compare(2454304, Date_Calc::DateToDays(22, 7, 2007), '2007 07 22');
-compare('2007 07 23', Date_Calc::DaysToDate(2454305, "%Y %m %d"), '2454305');
-compare(2454305, Date_Calc::DateToDays(23, 7, 2007), '2007 07 23');
-compare('2007 07 24', Date_Calc::DaysToDate(2454306, "%Y %m %d"), '2454306');
-compare(2454306, Date_Calc::DateToDays(24, 7, 2007), '2007 07 24');
-compare('2007 07 25', Date_Calc::DaysToDate(2454307, "%Y %m %d"), '2454307');
-compare(2454307, Date_Calc::DateToDays(25, 7, 2007), '2007 07 25');
-compare('2007 07 26', Date_Calc::DaysToDate(2454308, "%Y %m %d"), '2454308');
-compare(2454308, Date_Calc::DateToDays(26, 7, 2007), '2007 07 26');
-compare('2007 07 27', Date_Calc::DaysToDate(2454309, "%Y %m %d"), '2454309');
-compare(2454309, Date_Calc::DateToDays(27, 7, 2007), '2007 07 27');
-compare('2007 07 28', Date_Calc::DaysToDate(2454310, "%Y %m %d"), '2454310');
-compare(2454310, Date_Calc::DateToDays(28, 7, 2007), '2007 07 28');
-compare('2007 07 29', Date_Calc::DaysToDate(2454311, "%Y %m %d"), '2454311');
-compare(2454311, Date_Calc::DateToDays(29, 7, 2007), '2007 07 29');
-compare('2007 07 30', Date_Calc::DaysToDate(2454312, "%Y %m %d"), '2454312');
-compare(2454312, Date_Calc::DateToDays(30, 7, 2007), '2007 07 30');
-compare('2007 07 31', Date_Calc::DaysToDate(2454313, "%Y %m %d"), '2454313');
-compare(2454313, Date_Calc::DateToDays(31, 7, 2007), '2007 07 31');
-compare('2007 08 01', Date_Calc::DaysToDate(2454314, "%Y %m %d"), '2454314');
-compare(2454314, Date_Calc::DateToDays(1, 8, 2007), '2007 08 01');
-compare('2007 08 02', Date_Calc::DaysToDate(2454315, "%Y %m %d"), '2454315');
-compare(2454315, Date_Calc::DateToDays(2, 8, 2007), '2007 08 02');
-compare('2007 08 03', Date_Calc::DaysToDate(2454316, "%Y %m %d"), '2454316');
-compare(2454316, Date_Calc::DateToDays(3, 8, 2007), '2007 08 03');
-compare('2007 08 04', Date_Calc::DaysToDate(2454317, "%Y %m %d"), '2454317');
-compare(2454317, Date_Calc::DateToDays(4, 8, 2007), '2007 08 04');
-compare('2007 08 05', Date_Calc::DaysToDate(2454318, "%Y %m %d"), '2454318');
-compare(2454318, Date_Calc::DateToDays(5, 8, 2007), '2007 08 05');
-compare('2007 08 06', Date_Calc::DaysToDate(2454319, "%Y %m %d"), '2454319');
-compare(2454319, Date_Calc::DateToDays(6, 8, 2007), '2007 08 06');
-compare('2007 08 07', Date_Calc::DaysToDate(2454320, "%Y %m %d"), '2454320');
-compare(2454320, Date_Calc::DateToDays(7, 8, 2007), '2007 08 07');
-compare('2007 08 08', Date_Calc::DaysToDate(2454321, "%Y %m %d"), '2454321');
-compare(2454321, Date_Calc::DateToDays(8, 8, 2007), '2007 08 08');
-compare('2007 08 09', Date_Calc::DaysToDate(2454322, "%Y %m %d"), '2454322');
-compare(2454322, Date_Calc::DateToDays(9, 8, 2007), '2007 08 09');
-compare('2007 08 10', Date_Calc::DaysToDate(2454323, "%Y %m %d"), '2454323');
-compare(2454323, Date_Calc::DateToDays(10, 8, 2007), '2007 08 10');
-compare('2007 08 11', Date_Calc::DaysToDate(2454324, "%Y %m %d"), '2454324');
-compare(2454324, Date_Calc::DateToDays(11, 8, 2007), '2007 08 11');
-compare('2007 08 12', Date_Calc::DaysToDate(2454325, "%Y %m %d"), '2454325');
-compare(2454325, Date_Calc::DateToDays(12, 8, 2007), '2007 08 12');
-compare('2007 08 13', Date_Calc::DaysToDate(2454326, "%Y %m %d"), '2454326');
-compare(2454326, Date_Calc::DateToDays(13, 8, 2007), '2007 08 13');
-compare('2007 08 14', Date_Calc::DaysToDate(2454327, "%Y %m %d"), '2454327');
-compare(2454327, Date_Calc::DateToDays(14, 8, 2007), '2007 08 14');
-compare('2007 08 15', Date_Calc::DaysToDate(2454328, "%Y %m %d"), '2454328');
-compare(2454328, Date_Calc::DateToDays(15, 8, 2007), '2007 08 15');
-compare('2007 08 16', Date_Calc::DaysToDate(2454329, "%Y %m %d"), '2454329');
-compare(2454329, Date_Calc::DateToDays(16, 8, 2007), '2007 08 16');
-compare('2007 08 17', Date_Calc::DaysToDate(2454330, "%Y %m %d"), '2454330');
-compare(2454330, Date_Calc::DateToDays(17, 8, 2007), '2007 08 17');
-compare('2007 08 18', Date_Calc::DaysToDate(2454331, "%Y %m %d"), '2454331');
-compare(2454331, Date_Calc::DateToDays(18, 8, 2007), '2007 08 18');
-compare('2007 08 19', Date_Calc::DaysToDate(2454332, "%Y %m %d"), '2454332');
-compare(2454332, Date_Calc::DateToDays(19, 8, 2007), '2007 08 19');
-compare('2007 08 20', Date_Calc::DaysToDate(2454333, "%Y %m %d"), '2454333');
-compare(2454333, Date_Calc::DateToDays(20, 8, 2007), '2007 08 20');
-compare('2007 08 21', Date_Calc::DaysToDate(2454334, "%Y %m %d"), '2454334');
-compare(2454334, Date_Calc::DateToDays(21, 8, 2007), '2007 08 21');
-compare('2007 08 22', Date_Calc::DaysToDate(2454335, "%Y %m %d"), '2454335');
-compare(2454335, Date_Calc::DateToDays(22, 8, 2007), '2007 08 22');
-compare('2007 08 23', Date_Calc::DaysToDate(2454336, "%Y %m %d"), '2454336');
-compare(2454336, Date_Calc::DateToDays(23, 8, 2007), '2007 08 23');
-compare('2007 08 24', Date_Calc::DaysToDate(2454337, "%Y %m %d"), '2454337');
-compare(2454337, Date_Calc::DateToDays(24, 8, 2007), '2007 08 24');
-compare('2007 08 25', Date_Calc::DaysToDate(2454338, "%Y %m %d"), '2454338');
-compare(2454338, Date_Calc::DateToDays(25, 8, 2007), '2007 08 25');
-compare('2007 08 26', Date_Calc::DaysToDate(2454339, "%Y %m %d"), '2454339');
-compare(2454339, Date_Calc::DateToDays(26, 8, 2007), '2007 08 26');
-compare('2007 08 27', Date_Calc::DaysToDate(2454340, "%Y %m %d"), '2454340');
-compare(2454340, Date_Calc::DateToDays(27, 8, 2007), '2007 08 27');
-compare('2007 08 28', Date_Calc::DaysToDate(2454341, "%Y %m %d"), '2454341');
-compare(2454341, Date_Calc::DateToDays(28, 8, 2007), '2007 08 28');
-compare('2007 08 29', Date_Calc::DaysToDate(2454342, "%Y %m %d"), '2454342');
-compare(2454342, Date_Calc::DateToDays(29, 8, 2007), '2007 08 29');
-compare('2007 08 30', Date_Calc::DaysToDate(2454343, "%Y %m %d"), '2454343');
-compare(2454343, Date_Calc::DateToDays(30, 8, 2007), '2007 08 30');
-compare('2007 08 31', Date_Calc::DaysToDate(2454344, "%Y %m %d"), '2454344');
-compare(2454344, Date_Calc::DateToDays(31, 8, 2007), '2007 08 31');
-compare('2007 09 01', Date_Calc::DaysToDate(2454345, "%Y %m %d"), '2454345');
-compare(2454345, Date_Calc::DateToDays(1, 9, 2007), '2007 09 01');
-compare('2007 09 02', Date_Calc::DaysToDate(2454346, "%Y %m %d"), '2454346');
-compare(2454346, Date_Calc::DateToDays(2, 9, 2007), '2007 09 02');
-compare('2007 09 03', Date_Calc::DaysToDate(2454347, "%Y %m %d"), '2454347');
-compare(2454347, Date_Calc::DateToDays(3, 9, 2007), '2007 09 03');
-compare('2007 09 04', Date_Calc::DaysToDate(2454348, "%Y %m %d"), '2454348');
-compare(2454348, Date_Calc::DateToDays(4, 9, 2007), '2007 09 04');
-compare('2007 09 05', Date_Calc::DaysToDate(2454349, "%Y %m %d"), '2454349');
-compare(2454349, Date_Calc::DateToDays(5, 9, 2007), '2007 09 05');
-compare('2007 09 06', Date_Calc::DaysToDate(2454350, "%Y %m %d"), '2454350');
-compare(2454350, Date_Calc::DateToDays(6, 9, 2007), '2007 09 06');
-compare('2007 09 07', Date_Calc::DaysToDate(2454351, "%Y %m %d"), '2454351');
-compare(2454351, Date_Calc::DateToDays(7, 9, 2007), '2007 09 07');
-compare('2007 09 08', Date_Calc::DaysToDate(2454352, "%Y %m %d"), '2454352');
-compare(2454352, Date_Calc::DateToDays(8, 9, 2007), '2007 09 08');
-compare('2007 09 09', Date_Calc::DaysToDate(2454353, "%Y %m %d"), '2454353');
-compare(2454353, Date_Calc::DateToDays(9, 9, 2007), '2007 09 09');
-compare('2007 09 10', Date_Calc::DaysToDate(2454354, "%Y %m %d"), '2454354');
-compare(2454354, Date_Calc::DateToDays(10, 9, 2007), '2007 09 10');
-compare('2007 09 11', Date_Calc::DaysToDate(2454355, "%Y %m %d"), '2454355');
-compare(2454355, Date_Calc::DateToDays(11, 9, 2007), '2007 09 11');
-compare('2007 09 12', Date_Calc::DaysToDate(2454356, "%Y %m %d"), '2454356');
-compare(2454356, Date_Calc::DateToDays(12, 9, 2007), '2007 09 12');
-compare('2007 09 13', Date_Calc::DaysToDate(2454357, "%Y %m %d"), '2454357');
-compare(2454357, Date_Calc::DateToDays(13, 9, 2007), '2007 09 13');
-compare('2007 09 14', Date_Calc::DaysToDate(2454358, "%Y %m %d"), '2454358');
-compare(2454358, Date_Calc::DateToDays(14, 9, 2007), '2007 09 14');
-compare('2007 09 15', Date_Calc::DaysToDate(2454359, "%Y %m %d"), '2454359');
-compare(2454359, Date_Calc::DateToDays(15, 9, 2007), '2007 09 15');
-compare('2007 09 16', Date_Calc::DaysToDate(2454360, "%Y %m %d"), '2454360');
-compare(2454360, Date_Calc::DateToDays(16, 9, 2007), '2007 09 16');
-compare('2007 09 17', Date_Calc::DaysToDate(2454361, "%Y %m %d"), '2454361');
-compare(2454361, Date_Calc::DateToDays(17, 9, 2007), '2007 09 17');
-compare('2007 09 18', Date_Calc::DaysToDate(2454362, "%Y %m %d"), '2454362');
-compare(2454362, Date_Calc::DateToDays(18, 9, 2007), '2007 09 18');
-compare('2007 09 19', Date_Calc::DaysToDate(2454363, "%Y %m %d"), '2454363');
-compare(2454363, Date_Calc::DateToDays(19, 9, 2007), '2007 09 19');
-compare('2007 09 20', Date_Calc::DaysToDate(2454364, "%Y %m %d"), '2454364');
-compare(2454364, Date_Calc::DateToDays(20, 9, 2007), '2007 09 20');
-compare('2007 09 21', Date_Calc::DaysToDate(2454365, "%Y %m %d"), '2454365');
-compare(2454365, Date_Calc::DateToDays(21, 9, 2007), '2007 09 21');
-compare('2007 09 22', Date_Calc::DaysToDate(2454366, "%Y %m %d"), '2454366');
-compare(2454366, Date_Calc::DateToDays(22, 9, 2007), '2007 09 22');
-compare('2007 09 23', Date_Calc::DaysToDate(2454367, "%Y %m %d"), '2454367');
-compare(2454367, Date_Calc::DateToDays(23, 9, 2007), '2007 09 23');
-compare('2007 09 24', Date_Calc::DaysToDate(2454368, "%Y %m %d"), '2454368');
-compare(2454368, Date_Calc::DateToDays(24, 9, 2007), '2007 09 24');
-compare('2007 09 25', Date_Calc::DaysToDate(2454369, "%Y %m %d"), '2454369');
-compare(2454369, Date_Calc::DateToDays(25, 9, 2007), '2007 09 25');
-compare('2007 09 26', Date_Calc::DaysToDate(2454370, "%Y %m %d"), '2454370');
-compare(2454370, Date_Calc::DateToDays(26, 9, 2007), '2007 09 26');
-compare('2007 09 27', Date_Calc::DaysToDate(2454371, "%Y %m %d"), '2454371');
-compare(2454371, Date_Calc::DateToDays(27, 9, 2007), '2007 09 27');
-compare('2007 09 28', Date_Calc::DaysToDate(2454372, "%Y %m %d"), '2454372');
-compare(2454372, Date_Calc::DateToDays(28, 9, 2007), '2007 09 28');
-compare('2007 09 29', Date_Calc::DaysToDate(2454373, "%Y %m %d"), '2454373');
-compare(2454373, Date_Calc::DateToDays(29, 9, 2007), '2007 09 29');
-compare('2007 09 30', Date_Calc::DaysToDate(2454374, "%Y %m %d"), '2454374');
-compare(2454374, Date_Calc::DateToDays(30, 9, 2007), '2007 09 30');
-compare('2007 10 01', Date_Calc::DaysToDate(2454375, "%Y %m %d"), '2454375');
-compare(2454375, Date_Calc::DateToDays(1, 10, 2007), '2007 10 01');
-compare('2007 10 02', Date_Calc::DaysToDate(2454376, "%Y %m %d"), '2454376');
-compare(2454376, Date_Calc::DateToDays(2, 10, 2007), '2007 10 02');
-compare('2007 10 03', Date_Calc::DaysToDate(2454377, "%Y %m %d"), '2454377');
-compare(2454377, Date_Calc::DateToDays(3, 10, 2007), '2007 10 03');
-compare('2007 10 04', Date_Calc::DaysToDate(2454378, "%Y %m %d"), '2454378');
-compare(2454378, Date_Calc::DateToDays(4, 10, 2007), '2007 10 04');
-compare('2007 10 05', Date_Calc::DaysToDate(2454379, "%Y %m %d"), '2454379');
-compare(2454379, Date_Calc::DateToDays(5, 10, 2007), '2007 10 05');
-compare('2007 10 06', Date_Calc::DaysToDate(2454380, "%Y %m %d"), '2454380');
-compare(2454380, Date_Calc::DateToDays(6, 10, 2007), '2007 10 06');
-compare('2007 10 07', Date_Calc::DaysToDate(2454381, "%Y %m %d"), '2454381');
-compare(2454381, Date_Calc::DateToDays(7, 10, 2007), '2007 10 07');
-compare('2007 10 08', Date_Calc::DaysToDate(2454382, "%Y %m %d"), '2454382');
-compare(2454382, Date_Calc::DateToDays(8, 10, 2007), '2007 10 08');
-compare('2007 10 09', Date_Calc::DaysToDate(2454383, "%Y %m %d"), '2454383');
-compare(2454383, Date_Calc::DateToDays(9, 10, 2007), '2007 10 09');
-compare('2007 10 10', Date_Calc::DaysToDate(2454384, "%Y %m %d"), '2454384');
-compare(2454384, Date_Calc::DateToDays(10, 10, 2007), '2007 10 10');
-compare('2007 10 11', Date_Calc::DaysToDate(2454385, "%Y %m %d"), '2454385');
-compare(2454385, Date_Calc::DateToDays(11, 10, 2007), '2007 10 11');
-compare('2007 10 12', Date_Calc::DaysToDate(2454386, "%Y %m %d"), '2454386');
-compare(2454386, Date_Calc::DateToDays(12, 10, 2007), '2007 10 12');
-compare('2007 10 13', Date_Calc::DaysToDate(2454387, "%Y %m %d"), '2454387');
-compare(2454387, Date_Calc::DateToDays(13, 10, 2007), '2007 10 13');
-compare('2007 10 14', Date_Calc::DaysToDate(2454388, "%Y %m %d"), '2454388');
-compare(2454388, Date_Calc::DateToDays(14, 10, 2007), '2007 10 14');
-compare('2007 10 15', Date_Calc::DaysToDate(2454389, "%Y %m %d"), '2454389');
-compare(2454389, Date_Calc::DateToDays(15, 10, 2007), '2007 10 15');
-compare('2007 10 16', Date_Calc::DaysToDate(2454390, "%Y %m %d"), '2454390');
-compare(2454390, Date_Calc::DateToDays(16, 10, 2007), '2007 10 16');
-compare('2007 10 17', Date_Calc::DaysToDate(2454391, "%Y %m %d"), '2454391');
-compare(2454391, Date_Calc::DateToDays(17, 10, 2007), '2007 10 17');
-compare('2007 10 18', Date_Calc::DaysToDate(2454392, "%Y %m %d"), '2454392');
-compare(2454392, Date_Calc::DateToDays(18, 10, 2007), '2007 10 18');
-compare('2007 10 19', Date_Calc::DaysToDate(2454393, "%Y %m %d"), '2454393');
-compare(2454393, Date_Calc::DateToDays(19, 10, 2007), '2007 10 19');
-compare('2007 10 20', Date_Calc::DaysToDate(2454394, "%Y %m %d"), '2454394');
-compare(2454394, Date_Calc::DateToDays(20, 10, 2007), '2007 10 20');
-compare('2007 10 21', Date_Calc::DaysToDate(2454395, "%Y %m %d"), '2454395');
-compare(2454395, Date_Calc::DateToDays(21, 10, 2007), '2007 10 21');
-compare('2007 10 22', Date_Calc::DaysToDate(2454396, "%Y %m %d"), '2454396');
-compare(2454396, Date_Calc::DateToDays(22, 10, 2007), '2007 10 22');
-compare('2007 10 23', Date_Calc::DaysToDate(2454397, "%Y %m %d"), '2454397');
-compare(2454397, Date_Calc::DateToDays(23, 10, 2007), '2007 10 23');
-compare('2007 10 24', Date_Calc::DaysToDate(2454398, "%Y %m %d"), '2454398');
-compare(2454398, Date_Calc::DateToDays(24, 10, 2007), '2007 10 24');
-compare('2007 10 25', Date_Calc::DaysToDate(2454399, "%Y %m %d"), '2454399');
-compare(2454399, Date_Calc::DateToDays(25, 10, 2007), '2007 10 25');
-compare('2007 10 26', Date_Calc::DaysToDate(2454400, "%Y %m %d"), '2454400');
-compare(2454400, Date_Calc::DateToDays(26, 10, 2007), '2007 10 26');
-compare('2007 10 27', Date_Calc::DaysToDate(2454401, "%Y %m %d"), '2454401');
-compare(2454401, Date_Calc::DateToDays(27, 10, 2007), '2007 10 27');
-compare('2007 10 28', Date_Calc::DaysToDate(2454402, "%Y %m %d"), '2454402');
-compare(2454402, Date_Calc::DateToDays(28, 10, 2007), '2007 10 28');
-compare('2007 10 29', Date_Calc::DaysToDate(2454403, "%Y %m %d"), '2454403');
-compare(2454403, Date_Calc::DateToDays(29, 10, 2007), '2007 10 29');
-compare('2007 10 30', Date_Calc::DaysToDate(2454404, "%Y %m %d"), '2454404');
-compare(2454404, Date_Calc::DateToDays(30, 10, 2007), '2007 10 30');
-compare('2007 10 31', Date_Calc::DaysToDate(2454405, "%Y %m %d"), '2454405');
-compare(2454405, Date_Calc::DateToDays(31, 10, 2007), '2007 10 31');
-compare('2007 11 01', Date_Calc::DaysToDate(2454406, "%Y %m %d"), '2454406');
-compare(2454406, Date_Calc::DateToDays(1, 11, 2007), '2007 11 01');
-compare('2007 11 02', Date_Calc::DaysToDate(2454407, "%Y %m %d"), '2454407');
-compare(2454407, Date_Calc::DateToDays(2, 11, 2007), '2007 11 02');
-compare('2007 11 03', Date_Calc::DaysToDate(2454408, "%Y %m %d"), '2454408');
-compare(2454408, Date_Calc::DateToDays(3, 11, 2007), '2007 11 03');
-compare('2007 11 04', Date_Calc::DaysToDate(2454409, "%Y %m %d"), '2454409');
-compare(2454409, Date_Calc::DateToDays(4, 11, 2007), '2007 11 04');
-compare('2007 11 05', Date_Calc::DaysToDate(2454410, "%Y %m %d"), '2454410');
-compare(2454410, Date_Calc::DateToDays(5, 11, 2007), '2007 11 05');
-compare('2007 11 06', Date_Calc::DaysToDate(2454411, "%Y %m %d"), '2454411');
-compare(2454411, Date_Calc::DateToDays(6, 11, 2007), '2007 11 06');
-compare('2007 11 07', Date_Calc::DaysToDate(2454412, "%Y %m %d"), '2454412');
-compare(2454412, Date_Calc::DateToDays(7, 11, 2007), '2007 11 07');
-compare('2007 11 08', Date_Calc::DaysToDate(2454413, "%Y %m %d"), '2454413');
-compare(2454413, Date_Calc::DateToDays(8, 11, 2007), '2007 11 08');
-compare('2007 11 09', Date_Calc::DaysToDate(2454414, "%Y %m %d"), '2454414');
-compare(2454414, Date_Calc::DateToDays(9, 11, 2007), '2007 11 09');
-compare('2007 11 10', Date_Calc::DaysToDate(2454415, "%Y %m %d"), '2454415');
-compare(2454415, Date_Calc::DateToDays(10, 11, 2007), '2007 11 10');
-compare('2007 11 11', Date_Calc::DaysToDate(2454416, "%Y %m %d"), '2454416');
-compare(2454416, Date_Calc::DateToDays(11, 11, 2007), '2007 11 11');
-compare('2007 11 12', Date_Calc::DaysToDate(2454417, "%Y %m %d"), '2454417');
-compare(2454417, Date_Calc::DateToDays(12, 11, 2007), '2007 11 12');
-compare('2007 11 13', Date_Calc::DaysToDate(2454418, "%Y %m %d"), '2454418');
-compare(2454418, Date_Calc::DateToDays(13, 11, 2007), '2007 11 13');
-compare('2007 11 14', Date_Calc::DaysToDate(2454419, "%Y %m %d"), '2454419');
-compare(2454419, Date_Calc::DateToDays(14, 11, 2007), '2007 11 14');
-compare('2007 11 15', Date_Calc::DaysToDate(2454420, "%Y %m %d"), '2454420');
-compare(2454420, Date_Calc::DateToDays(15, 11, 2007), '2007 11 15');
-compare('2007 11 16', Date_Calc::DaysToDate(2454421, "%Y %m %d"), '2454421');
-compare(2454421, Date_Calc::DateToDays(16, 11, 2007), '2007 11 16');
-compare('2007 11 17', Date_Calc::DaysToDate(2454422, "%Y %m %d"), '2454422');
-compare(2454422, Date_Calc::DateToDays(17, 11, 2007), '2007 11 17');
-compare('2007 11 18', Date_Calc::DaysToDate(2454423, "%Y %m %d"), '2454423');
-compare(2454423, Date_Calc::DateToDays(18, 11, 2007), '2007 11 18');
-compare('2007 11 19', Date_Calc::DaysToDate(2454424, "%Y %m %d"), '2454424');
-compare(2454424, Date_Calc::DateToDays(19, 11, 2007), '2007 11 19');
-compare('2007 11 20', Date_Calc::DaysToDate(2454425, "%Y %m %d"), '2454425');
-compare(2454425, Date_Calc::DateToDays(20, 11, 2007), '2007 11 20');
-compare('2007 11 21', Date_Calc::DaysToDate(2454426, "%Y %m %d"), '2454426');
-compare(2454426, Date_Calc::DateToDays(21, 11, 2007), '2007 11 21');
-compare('2007 11 22', Date_Calc::DaysToDate(2454427, "%Y %m %d"), '2454427');
-compare(2454427, Date_Calc::DateToDays(22, 11, 2007), '2007 11 22');
-compare('2007 11 23', Date_Calc::DaysToDate(2454428, "%Y %m %d"), '2454428');
-compare(2454428, Date_Calc::DateToDays(23, 11, 2007), '2007 11 23');
-compare('2007 11 24', Date_Calc::DaysToDate(2454429, "%Y %m %d"), '2454429');
-compare(2454429, Date_Calc::DateToDays(24, 11, 2007), '2007 11 24');
-compare('2007 11 25', Date_Calc::DaysToDate(2454430, "%Y %m %d"), '2454430');
-compare(2454430, Date_Calc::DateToDays(25, 11, 2007), '2007 11 25');
-compare('2007 11 26', Date_Calc::DaysToDate(2454431, "%Y %m %d"), '2454431');
-compare(2454431, Date_Calc::DateToDays(26, 11, 2007), '2007 11 26');
-compare('2007 11 27', Date_Calc::DaysToDate(2454432, "%Y %m %d"), '2454432');
-compare(2454432, Date_Calc::DateToDays(27, 11, 2007), '2007 11 27');
-compare('2007 11 28', Date_Calc::DaysToDate(2454433, "%Y %m %d"), '2454433');
-compare(2454433, Date_Calc::DateToDays(28, 11, 2007), '2007 11 28');
-compare('2007 11 29', Date_Calc::DaysToDate(2454434, "%Y %m %d"), '2454434');
-compare(2454434, Date_Calc::DateToDays(29, 11, 2007), '2007 11 29');
-compare('2007 11 30', Date_Calc::DaysToDate(2454435, "%Y %m %d"), '2454435');
-compare(2454435, Date_Calc::DateToDays(30, 11, 2007), '2007 11 30');
-compare('2007 12 01', Date_Calc::DaysToDate(2454436, "%Y %m %d"), '2454436');
-compare(2454436, Date_Calc::DateToDays(1, 12, 2007), '2007 12 01');
-compare('2007 12 02', Date_Calc::DaysToDate(2454437, "%Y %m %d"), '2454437');
-compare(2454437, Date_Calc::DateToDays(2, 12, 2007), '2007 12 02');
-compare('2007 12 03', Date_Calc::DaysToDate(2454438, "%Y %m %d"), '2454438');
-compare(2454438, Date_Calc::DateToDays(3, 12, 2007), '2007 12 03');
-compare('2007 12 04', Date_Calc::DaysToDate(2454439, "%Y %m %d"), '2454439');
-compare(2454439, Date_Calc::DateToDays(4, 12, 2007), '2007 12 04');
-compare('2007 12 05', Date_Calc::DaysToDate(2454440, "%Y %m %d"), '2454440');
-compare(2454440, Date_Calc::DateToDays(5, 12, 2007), '2007 12 05');
-compare('2007 12 06', Date_Calc::DaysToDate(2454441, "%Y %m %d"), '2454441');
-compare(2454441, Date_Calc::DateToDays(6, 12, 2007), '2007 12 06');
-compare('2007 12 07', Date_Calc::DaysToDate(2454442, "%Y %m %d"), '2454442');
-compare(2454442, Date_Calc::DateToDays(7, 12, 2007), '2007 12 07');
-compare('2007 12 08', Date_Calc::DaysToDate(2454443, "%Y %m %d"), '2454443');
-compare(2454443, Date_Calc::DateToDays(8, 12, 2007), '2007 12 08');
-compare('2007 12 09', Date_Calc::DaysToDate(2454444, "%Y %m %d"), '2454444');
-compare(2454444, Date_Calc::DateToDays(9, 12, 2007), '2007 12 09');
-compare('2007 12 10', Date_Calc::DaysToDate(2454445, "%Y %m %d"), '2454445');
-compare(2454445, Date_Calc::DateToDays(10, 12, 2007), '2007 12 10');
-compare('2007 12 11', Date_Calc::DaysToDate(2454446, "%Y %m %d"), '2454446');
-compare(2454446, Date_Calc::DateToDays(11, 12, 2007), '2007 12 11');
-compare('2007 12 12', Date_Calc::DaysToDate(2454447, "%Y %m %d"), '2454447');
-compare(2454447, Date_Calc::DateToDays(12, 12, 2007), '2007 12 12');
-compare('2007 12 13', Date_Calc::DaysToDate(2454448, "%Y %m %d"), '2454448');
-compare(2454448, Date_Calc::DateToDays(13, 12, 2007), '2007 12 13');
-compare('2007 12 14', Date_Calc::DaysToDate(2454449, "%Y %m %d"), '2454449');
-compare(2454449, Date_Calc::DateToDays(14, 12, 2007), '2007 12 14');
-compare('2007 12 15', Date_Calc::DaysToDate(2454450, "%Y %m %d"), '2454450');
-compare(2454450, Date_Calc::DateToDays(15, 12, 2007), '2007 12 15');
-compare('2007 12 16', Date_Calc::DaysToDate(2454451, "%Y %m %d"), '2454451');
-compare(2454451, Date_Calc::DateToDays(16, 12, 2007), '2007 12 16');
-compare('2007 12 17', Date_Calc::DaysToDate(2454452, "%Y %m %d"), '2454452');
-compare(2454452, Date_Calc::DateToDays(17, 12, 2007), '2007 12 17');
-compare('2007 12 18', Date_Calc::DaysToDate(2454453, "%Y %m %d"), '2454453');
-compare(2454453, Date_Calc::DateToDays(18, 12, 2007), '2007 12 18');
-compare('2007 12 19', Date_Calc::DaysToDate(2454454, "%Y %m %d"), '2454454');
-compare(2454454, Date_Calc::DateToDays(19, 12, 2007), '2007 12 19');
-compare('2007 12 20', Date_Calc::DaysToDate(2454455, "%Y %m %d"), '2454455');
-compare(2454455, Date_Calc::DateToDays(20, 12, 2007), '2007 12 20');
-compare('2007 12 21', Date_Calc::DaysToDate(2454456, "%Y %m %d"), '2454456');
-compare(2454456, Date_Calc::DateToDays(21, 12, 2007), '2007 12 21');
-compare('2007 12 22', Date_Calc::DaysToDate(2454457, "%Y %m %d"), '2454457');
-compare(2454457, Date_Calc::DateToDays(22, 12, 2007), '2007 12 22');
-compare('2007 12 23', Date_Calc::DaysToDate(2454458, "%Y %m %d"), '2454458');
-compare(2454458, Date_Calc::DateToDays(23, 12, 2007), '2007 12 23');
-compare('2007 12 24', Date_Calc::DaysToDate(2454459, "%Y %m %d"), '2454459');
-compare(2454459, Date_Calc::DateToDays(24, 12, 2007), '2007 12 24');
-compare('2007 12 25', Date_Calc::DaysToDate(2454460, "%Y %m %d"), '2454460');
-compare(2454460, Date_Calc::DateToDays(25, 12, 2007), '2007 12 25');
-compare('2007 12 26', Date_Calc::DaysToDate(2454461, "%Y %m %d"), '2454461');
-compare(2454461, Date_Calc::DateToDays(26, 12, 2007), '2007 12 26');
-compare('2007 12 27', Date_Calc::DaysToDate(2454462, "%Y %m %d"), '2454462');
-compare(2454462, Date_Calc::DateToDays(27, 12, 2007), '2007 12 27');
-compare('2007 12 28', Date_Calc::DaysToDate(2454463, "%Y %m %d"), '2454463');
-compare(2454463, Date_Calc::DateToDays(28, 12, 2007), '2007 12 28');
-compare('2007 12 29', Date_Calc::DaysToDate(2454464, "%Y %m %d"), '2454464');
-compare(2454464, Date_Calc::DateToDays(29, 12, 2007), '2007 12 29');
-compare('2007 12 30', Date_Calc::DaysToDate(2454465, "%Y %m %d"), '2454465');
-compare(2454465, Date_Calc::DateToDays(30, 12, 2007), '2007 12 30');
-compare('2007 12 31', Date_Calc::DaysToDate(2454466, "%Y %m %d"), '2454466');
-compare(2454466, Date_Calc::DateToDays(31, 12, 2007), '2007 12 31');
-compare('2008 01 01', Date_Calc::DaysToDate(2454467, "%Y %m %d"), '2454467');
-compare(2454467, Date_Calc::DateToDays(1, 1, 2008), '2008 01 01');
-compare('2008 01 02', Date_Calc::DaysToDate(2454468, "%Y %m %d"), '2454468');
-compare(2454468, Date_Calc::DateToDays(2, 1, 2008), '2008 01 02');
-compare('2008 01 03', Date_Calc::DaysToDate(2454469, "%Y %m %d"), '2454469');
-compare(2454469, Date_Calc::DateToDays(3, 1, 2008), '2008 01 03');
-compare('2008 01 04', Date_Calc::DaysToDate(2454470, "%Y %m %d"), '2454470');
-compare(2454470, Date_Calc::DateToDays(4, 1, 2008), '2008 01 04');
-compare('2008 01 05', Date_Calc::DaysToDate(2454471, "%Y %m %d"), '2454471');
-compare(2454471, Date_Calc::DateToDays(5, 1, 2008), '2008 01 05');
-compare('2008 01 06', Date_Calc::DaysToDate(2454472, "%Y %m %d"), '2454472');
-compare(2454472, Date_Calc::DateToDays(6, 1, 2008), '2008 01 06');
-compare('2008 01 07', Date_Calc::DaysToDate(2454473, "%Y %m %d"), '2454473');
-compare(2454473, Date_Calc::DateToDays(7, 1, 2008), '2008 01 07');
-compare('2008 01 08', Date_Calc::DaysToDate(2454474, "%Y %m %d"), '2454474');
-compare(2454474, Date_Calc::DateToDays(8, 1, 2008), '2008 01 08');
-compare('2008 01 09', Date_Calc::DaysToDate(2454475, "%Y %m %d"), '2454475');
-compare(2454475, Date_Calc::DateToDays(9, 1, 2008), '2008 01 09');
-compare('2008 01 10', Date_Calc::DaysToDate(2454476, "%Y %m %d"), '2454476');
-compare(2454476, Date_Calc::DateToDays(10, 1, 2008), '2008 01 10');
-compare('2008 01 11', Date_Calc::DaysToDate(2454477, "%Y %m %d"), '2454477');
-compare(2454477, Date_Calc::DateToDays(11, 1, 2008), '2008 01 11');
-compare('2008 01 12', Date_Calc::DaysToDate(2454478, "%Y %m %d"), '2454478');
-compare(2454478, Date_Calc::DateToDays(12, 1, 2008), '2008 01 12');
-compare('2008 01 13', Date_Calc::DaysToDate(2454479, "%Y %m %d"), '2454479');
-compare(2454479, Date_Calc::DateToDays(13, 1, 2008), '2008 01 13');
-compare('2008 01 14', Date_Calc::DaysToDate(2454480, "%Y %m %d"), '2454480');
-compare(2454480, Date_Calc::DateToDays(14, 1, 2008), '2008 01 14');
-compare('2008 01 15', Date_Calc::DaysToDate(2454481, "%Y %m %d"), '2454481');
-compare(2454481, Date_Calc::DateToDays(15, 1, 2008), '2008 01 15');
-compare('2008 01 16', Date_Calc::DaysToDate(2454482, "%Y %m %d"), '2454482');
-compare(2454482, Date_Calc::DateToDays(16, 1, 2008), '2008 01 16');
-compare('2008 01 17', Date_Calc::DaysToDate(2454483, "%Y %m %d"), '2454483');
-compare(2454483, Date_Calc::DateToDays(17, 1, 2008), '2008 01 17');
-compare('2008 01 18', Date_Calc::DaysToDate(2454484, "%Y %m %d"), '2454484');
-compare(2454484, Date_Calc::DateToDays(18, 1, 2008), '2008 01 18');
-compare('2008 01 19', Date_Calc::DaysToDate(2454485, "%Y %m %d"), '2454485');
-compare(2454485, Date_Calc::DateToDays(19, 1, 2008), '2008 01 19');
-compare('2008 01 20', Date_Calc::DaysToDate(2454486, "%Y %m %d"), '2454486');
-compare(2454486, Date_Calc::DateToDays(20, 1, 2008), '2008 01 20');
-compare('2008 01 21', Date_Calc::DaysToDate(2454487, "%Y %m %d"), '2454487');
-compare(2454487, Date_Calc::DateToDays(21, 1, 2008), '2008 01 21');
-compare('2008 01 22', Date_Calc::DaysToDate(2454488, "%Y %m %d"), '2454488');
-compare(2454488, Date_Calc::DateToDays(22, 1, 2008), '2008 01 22');
-compare('2008 01 23', Date_Calc::DaysToDate(2454489, "%Y %m %d"), '2454489');
-compare(2454489, Date_Calc::DateToDays(23, 1, 2008), '2008 01 23');
-compare('2008 01 24', Date_Calc::DaysToDate(2454490, "%Y %m %d"), '2454490');
-compare(2454490, Date_Calc::DateToDays(24, 1, 2008), '2008 01 24');
-compare('2008 01 25', Date_Calc::DaysToDate(2454491, "%Y %m %d"), '2454491');
-compare(2454491, Date_Calc::DateToDays(25, 1, 2008), '2008 01 25');
-compare('2008 01 26', Date_Calc::DaysToDate(2454492, "%Y %m %d"), '2454492');
-compare(2454492, Date_Calc::DateToDays(26, 1, 2008), '2008 01 26');
-compare('2008 01 27', Date_Calc::DaysToDate(2454493, "%Y %m %d"), '2454493');
-compare(2454493, Date_Calc::DateToDays(27, 1, 2008), '2008 01 27');
-compare('2008 01 28', Date_Calc::DaysToDate(2454494, "%Y %m %d"), '2454494');
-compare(2454494, Date_Calc::DateToDays(28, 1, 2008), '2008 01 28');
-compare('2008 01 29', Date_Calc::DaysToDate(2454495, "%Y %m %d"), '2454495');
-compare(2454495, Date_Calc::DateToDays(29, 1, 2008), '2008 01 29');
-compare('2008 01 30', Date_Calc::DaysToDate(2454496, "%Y %m %d"), '2454496');
-compare(2454496, Date_Calc::DateToDays(30, 1, 2008), '2008 01 30');
-compare('2008 01 31', Date_Calc::DaysToDate(2454497, "%Y %m %d"), '2454497');
-compare(2454497, Date_Calc::DateToDays(31, 1, 2008), '2008 01 31');
-compare('2008 02 01', Date_Calc::DaysToDate(2454498, "%Y %m %d"), '2454498');
-compare(2454498, Date_Calc::DateToDays(1, 2, 2008), '2008 02 01');
-compare('2008 02 02', Date_Calc::DaysToDate(2454499, "%Y %m %d"), '2454499');
-compare(2454499, Date_Calc::DateToDays(2, 2, 2008), '2008 02 02');
-compare('2008 02 03', Date_Calc::DaysToDate(2454500, "%Y %m %d"), '2454500');
-compare(2454500, Date_Calc::DateToDays(3, 2, 2008), '2008 02 03');
-compare('2008 02 04', Date_Calc::DaysToDate(2454501, "%Y %m %d"), '2454501');
-compare(2454501, Date_Calc::DateToDays(4, 2, 2008), '2008 02 04');
-compare('2008 02 05', Date_Calc::DaysToDate(2454502, "%Y %m %d"), '2454502');
-compare(2454502, Date_Calc::DateToDays(5, 2, 2008), '2008 02 05');
-compare('2008 02 06', Date_Calc::DaysToDate(2454503, "%Y %m %d"), '2454503');
-compare(2454503, Date_Calc::DateToDays(6, 2, 2008), '2008 02 06');
-compare('2008 02 07', Date_Calc::DaysToDate(2454504, "%Y %m %d"), '2454504');
-compare(2454504, Date_Calc::DateToDays(7, 2, 2008), '2008 02 07');
-compare('2008 02 08', Date_Calc::DaysToDate(2454505, "%Y %m %d"), '2454505');
-compare(2454505, Date_Calc::DateToDays(8, 2, 2008), '2008 02 08');
-compare('2008 02 09', Date_Calc::DaysToDate(2454506, "%Y %m %d"), '2454506');
-compare(2454506, Date_Calc::DateToDays(9, 2, 2008), '2008 02 09');
-compare('2008 02 10', Date_Calc::DaysToDate(2454507, "%Y %m %d"), '2454507');
-compare(2454507, Date_Calc::DateToDays(10, 2, 2008), '2008 02 10');
-compare('2008 02 11', Date_Calc::DaysToDate(2454508, "%Y %m %d"), '2454508');
-compare(2454508, Date_Calc::DateToDays(11, 2, 2008), '2008 02 11');
-compare('2008 02 12', Date_Calc::DaysToDate(2454509, "%Y %m %d"), '2454509');
-compare(2454509, Date_Calc::DateToDays(12, 2, 2008), '2008 02 12');
-compare('2008 02 13', Date_Calc::DaysToDate(2454510, "%Y %m %d"), '2454510');
-compare(2454510, Date_Calc::DateToDays(13, 2, 2008), '2008 02 13');
-compare('2008 02 14', Date_Calc::DaysToDate(2454511, "%Y %m %d"), '2454511');
-compare(2454511, Date_Calc::DateToDays(14, 2, 2008), '2008 02 14');
-compare('2008 02 15', Date_Calc::DaysToDate(2454512, "%Y %m %d"), '2454512');
-compare(2454512, Date_Calc::DateToDays(15, 2, 2008), '2008 02 15');
-compare('2008 02 16', Date_Calc::DaysToDate(2454513, "%Y %m %d"), '2454513');
-compare(2454513, Date_Calc::DateToDays(16, 2, 2008), '2008 02 16');
-compare('2008 02 17', Date_Calc::DaysToDate(2454514, "%Y %m %d"), '2454514');
-compare(2454514, Date_Calc::DateToDays(17, 2, 2008), '2008 02 17');
-compare('2008 02 18', Date_Calc::DaysToDate(2454515, "%Y %m %d"), '2454515');
-compare(2454515, Date_Calc::DateToDays(18, 2, 2008), '2008 02 18');
-compare('2008 02 19', Date_Calc::DaysToDate(2454516, "%Y %m %d"), '2454516');
-compare(2454516, Date_Calc::DateToDays(19, 2, 2008), '2008 02 19');
-compare('2008 02 20', Date_Calc::DaysToDate(2454517, "%Y %m %d"), '2454517');
-compare(2454517, Date_Calc::DateToDays(20, 2, 2008), '2008 02 20');
-compare('2008 02 21', Date_Calc::DaysToDate(2454518, "%Y %m %d"), '2454518');
-compare(2454518, Date_Calc::DateToDays(21, 2, 2008), '2008 02 21');
-compare('2008 02 22', Date_Calc::DaysToDate(2454519, "%Y %m %d"), '2454519');
-compare(2454519, Date_Calc::DateToDays(22, 2, 2008), '2008 02 22');
-compare('2008 02 23', Date_Calc::DaysToDate(2454520, "%Y %m %d"), '2454520');
-compare(2454520, Date_Calc::DateToDays(23, 2, 2008), '2008 02 23');
-compare('2008 02 24', Date_Calc::DaysToDate(2454521, "%Y %m %d"), '2454521');
-compare(2454521, Date_Calc::DateToDays(24, 2, 2008), '2008 02 24');
-compare('2008 02 25', Date_Calc::DaysToDate(2454522, "%Y %m %d"), '2454522');
-compare(2454522, Date_Calc::DateToDays(25, 2, 2008), '2008 02 25');
-compare('2008 02 26', Date_Calc::DaysToDate(2454523, "%Y %m %d"), '2454523');
-compare(2454523, Date_Calc::DateToDays(26, 2, 2008), '2008 02 26');
-compare('2008 02 27', Date_Calc::DaysToDate(2454524, "%Y %m %d"), '2454524');
-compare(2454524, Date_Calc::DateToDays(27, 2, 2008), '2008 02 27');
-compare('2008 02 28', Date_Calc::DaysToDate(2454525, "%Y %m %d"), '2454525');
-compare(2454525, Date_Calc::DateToDays(28, 2, 2008), '2008 02 28');
-compare('2008 02 29', Date_Calc::DaysToDate(2454526, "%Y %m %d"), '2454526');
-compare(2454526, Date_Calc::DateToDays(29, 2, 2008), '2008 02 29');
-compare('2008 03 01', Date_Calc::DaysToDate(2454527, "%Y %m %d"), '2454527');
-compare(2454527, Date_Calc::DateToDays(1, 3, 2008), '2008 03 01');
-compare('2008 03 02', Date_Calc::DaysToDate(2454528, "%Y %m %d"), '2454528');
-compare(2454528, Date_Calc::DateToDays(2, 3, 2008), '2008 03 02');
-compare('2008 03 03', Date_Calc::DaysToDate(2454529, "%Y %m %d"), '2454529');
-compare(2454529, Date_Calc::DateToDays(3, 3, 2008), '2008 03 03');
-compare('2008 03 04', Date_Calc::DaysToDate(2454530, "%Y %m %d"), '2454530');
-compare(2454530, Date_Calc::DateToDays(4, 3, 2008), '2008 03 04');
-compare('2008 03 05', Date_Calc::DaysToDate(2454531, "%Y %m %d"), '2454531');
-compare(2454531, Date_Calc::DateToDays(5, 3, 2008), '2008 03 05');
-compare('2008 03 06', Date_Calc::DaysToDate(2454532, "%Y %m %d"), '2454532');
-compare(2454532, Date_Calc::DateToDays(6, 3, 2008), '2008 03 06');
-compare('2008 03 07', Date_Calc::DaysToDate(2454533, "%Y %m %d"), '2454533');
-compare(2454533, Date_Calc::DateToDays(7, 3, 2008), '2008 03 07');
-compare('2008 03 08', Date_Calc::DaysToDate(2454534, "%Y %m %d"), '2454534');
-compare(2454534, Date_Calc::DateToDays(8, 3, 2008), '2008 03 08');
-compare('2008 03 09', Date_Calc::DaysToDate(2454535, "%Y %m %d"), '2454535');
-compare(2454535, Date_Calc::DateToDays(9, 3, 2008), '2008 03 09');
-compare('2008 03 10', Date_Calc::DaysToDate(2454536, "%Y %m %d"), '2454536');
-compare(2454536, Date_Calc::DateToDays(10, 3, 2008), '2008 03 10');
-compare('2008 03 11', Date_Calc::DaysToDate(2454537, "%Y %m %d"), '2454537');
-compare(2454537, Date_Calc::DateToDays(11, 3, 2008), '2008 03 11');
-compare('2008 03 12', Date_Calc::DaysToDate(2454538, "%Y %m %d"), '2454538');
-compare(2454538, Date_Calc::DateToDays(12, 3, 2008), '2008 03 12');
-compare('2008 03 13', Date_Calc::DaysToDate(2454539, "%Y %m %d"), '2454539');
-compare(2454539, Date_Calc::DateToDays(13, 3, 2008), '2008 03 13');
-compare('2008 03 14', Date_Calc::DaysToDate(2454540, "%Y %m %d"), '2454540');
-compare(2454540, Date_Calc::DateToDays(14, 3, 2008), '2008 03 14');
-compare('2008 03 15', Date_Calc::DaysToDate(2454541, "%Y %m %d"), '2454541');
-compare(2454541, Date_Calc::DateToDays(15, 3, 2008), '2008 03 15');
-compare('2008 03 16', Date_Calc::DaysToDate(2454542, "%Y %m %d"), '2454542');
-compare(2454542, Date_Calc::DateToDays(16, 3, 2008), '2008 03 16');
-compare('2008 03 17', Date_Calc::DaysToDate(2454543, "%Y %m %d"), '2454543');
-compare(2454543, Date_Calc::DateToDays(17, 3, 2008), '2008 03 17');
-compare('2008 03 18', Date_Calc::DaysToDate(2454544, "%Y %m %d"), '2454544');
-compare(2454544, Date_Calc::DateToDays(18, 3, 2008), '2008 03 18');
-compare('2008 03 19', Date_Calc::DaysToDate(2454545, "%Y %m %d"), '2454545');
-compare(2454545, Date_Calc::DateToDays(19, 3, 2008), '2008 03 19');
-compare('2008 03 20', Date_Calc::DaysToDate(2454546, "%Y %m %d"), '2454546');
-compare(2454546, Date_Calc::DateToDays(20, 3, 2008), '2008 03 20');
-compare('2008 03 21', Date_Calc::DaysToDate(2454547, "%Y %m %d"), '2454547');
-compare(2454547, Date_Calc::DateToDays(21, 3, 2008), '2008 03 21');
-compare('2008 03 22', Date_Calc::DaysToDate(2454548, "%Y %m %d"), '2454548');
-compare(2454548, Date_Calc::DateToDays(22, 3, 2008), '2008 03 22');
-compare('2008 03 23', Date_Calc::DaysToDate(2454549, "%Y %m %d"), '2454549');
-compare(2454549, Date_Calc::DateToDays(23, 3, 2008), '2008 03 23');
-compare('2008 03 24', Date_Calc::DaysToDate(2454550, "%Y %m %d"), '2454550');
-compare(2454550, Date_Calc::DateToDays(24, 3, 2008), '2008 03 24');
-compare('2008 03 25', Date_Calc::DaysToDate(2454551, "%Y %m %d"), '2454551');
-compare(2454551, Date_Calc::DateToDays(25, 3, 2008), '2008 03 25');
-compare('2008 03 26', Date_Calc::DaysToDate(2454552, "%Y %m %d"), '2454552');
-compare(2454552, Date_Calc::DateToDays(26, 3, 2008), '2008 03 26');
-compare('2008 03 27', Date_Calc::DaysToDate(2454553, "%Y %m %d"), '2454553');
-compare(2454553, Date_Calc::DateToDays(27, 3, 2008), '2008 03 27');
-compare('2008 03 28', Date_Calc::DaysToDate(2454554, "%Y %m %d"), '2454554');
-compare(2454554, Date_Calc::DateToDays(28, 3, 2008), '2008 03 28');
-compare('2008 03 29', Date_Calc::DaysToDate(2454555, "%Y %m %d"), '2454555');
-compare(2454555, Date_Calc::DateToDays(29, 3, 2008), '2008 03 29');
-compare('2008 03 30', Date_Calc::DaysToDate(2454556, "%Y %m %d"), '2454556');
-compare(2454556, Date_Calc::DateToDays(30, 3, 2008), '2008 03 30');
-compare('2008 03 31', Date_Calc::DaysToDate(2454557, "%Y %m %d"), '2454557');
-compare(2454557, Date_Calc::DateToDays(31, 3, 2008), '2008 03 31');
-compare('2008 04 01', Date_Calc::DaysToDate(2454558, "%Y %m %d"), '2454558');
-compare(2454558, Date_Calc::DateToDays(1, 4, 2008), '2008 04 01');
-compare('2008 04 02', Date_Calc::DaysToDate(2454559, "%Y %m %d"), '2454559');
-compare(2454559, Date_Calc::DateToDays(2, 4, 2008), '2008 04 02');
-compare('2008 04 03', Date_Calc::DaysToDate(2454560, "%Y %m %d"), '2454560');
-compare(2454560, Date_Calc::DateToDays(3, 4, 2008), '2008 04 03');
-compare('2008 04 04', Date_Calc::DaysToDate(2454561, "%Y %m %d"), '2454561');
-compare(2454561, Date_Calc::DateToDays(4, 4, 2008), '2008 04 04');
-compare('2008 04 05', Date_Calc::DaysToDate(2454562, "%Y %m %d"), '2454562');
-compare(2454562, Date_Calc::DateToDays(5, 4, 2008), '2008 04 05');
-compare('2008 04 06', Date_Calc::DaysToDate(2454563, "%Y %m %d"), '2454563');
-compare(2454563, Date_Calc::DateToDays(6, 4, 2008), '2008 04 06');
-compare('2008 04 07', Date_Calc::DaysToDate(2454564, "%Y %m %d"), '2454564');
-compare(2454564, Date_Calc::DateToDays(7, 4, 2008), '2008 04 07');
-compare('2008 04 08', Date_Calc::DaysToDate(2454565, "%Y %m %d"), '2454565');
-compare(2454565, Date_Calc::DateToDays(8, 4, 2008), '2008 04 08');
-compare('2008 04 09', Date_Calc::DaysToDate(2454566, "%Y %m %d"), '2454566');
-compare(2454566, Date_Calc::DateToDays(9, 4, 2008), '2008 04 09');
-compare('2008 04 10', Date_Calc::DaysToDate(2454567, "%Y %m %d"), '2454567');
-compare(2454567, Date_Calc::DateToDays(10, 4, 2008), '2008 04 10');
-compare('2008 04 11', Date_Calc::DaysToDate(2454568, "%Y %m %d"), '2454568');
-compare(2454568, Date_Calc::DateToDays(11, 4, 2008), '2008 04 11');
-compare('2008 04 12', Date_Calc::DaysToDate(2454569, "%Y %m %d"), '2454569');
-compare(2454569, Date_Calc::DateToDays(12, 4, 2008), '2008 04 12');
-compare('2008 04 13', Date_Calc::DaysToDate(2454570, "%Y %m %d"), '2454570');
-compare(2454570, Date_Calc::DateToDays(13, 4, 2008), '2008 04 13');
-compare('2008 04 14', Date_Calc::DaysToDate(2454571, "%Y %m %d"), '2454571');
-compare(2454571, Date_Calc::DateToDays(14, 4, 2008), '2008 04 14');
-compare('2008 04 15', Date_Calc::DaysToDate(2454572, "%Y %m %d"), '2454572');
-compare(2454572, Date_Calc::DateToDays(15, 4, 2008), '2008 04 15');
-compare('2008 04 16', Date_Calc::DaysToDate(2454573, "%Y %m %d"), '2454573');
-compare(2454573, Date_Calc::DateToDays(16, 4, 2008), '2008 04 16');
-compare('2008 04 17', Date_Calc::DaysToDate(2454574, "%Y %m %d"), '2454574');
-compare(2454574, Date_Calc::DateToDays(17, 4, 2008), '2008 04 17');
-compare('2008 04 18', Date_Calc::DaysToDate(2454575, "%Y %m %d"), '2454575');
-compare(2454575, Date_Calc::DateToDays(18, 4, 2008), '2008 04 18');
-compare('2008 04 19', Date_Calc::DaysToDate(2454576, "%Y %m %d"), '2454576');
-compare(2454576, Date_Calc::DateToDays(19, 4, 2008), '2008 04 19');
-compare('2008 04 20', Date_Calc::DaysToDate(2454577, "%Y %m %d"), '2454577');
-compare(2454577, Date_Calc::DateToDays(20, 4, 2008), '2008 04 20');
-compare('2008 04 21', Date_Calc::DaysToDate(2454578, "%Y %m %d"), '2454578');
-compare(2454578, Date_Calc::DateToDays(21, 4, 2008), '2008 04 21');
-compare('2008 04 22', Date_Calc::DaysToDate(2454579, "%Y %m %d"), '2454579');
-compare(2454579, Date_Calc::DateToDays(22, 4, 2008), '2008 04 22');
-compare('2008 04 23', Date_Calc::DaysToDate(2454580, "%Y %m %d"), '2454580');
-compare(2454580, Date_Calc::DateToDays(23, 4, 2008), '2008 04 23');
-compare('2008 04 24', Date_Calc::DaysToDate(2454581, "%Y %m %d"), '2454581');
-compare(2454581, Date_Calc::DateToDays(24, 4, 2008), '2008 04 24');
-compare('2008 04 25', Date_Calc::DaysToDate(2454582, "%Y %m %d"), '2454582');
-compare(2454582, Date_Calc::DateToDays(25, 4, 2008), '2008 04 25');
-compare('2008 04 26', Date_Calc::DaysToDate(2454583, "%Y %m %d"), '2454583');
-compare(2454583, Date_Calc::DateToDays(26, 4, 2008), '2008 04 26');
-compare('2008 04 27', Date_Calc::DaysToDate(2454584, "%Y %m %d"), '2454584');
-compare(2454584, Date_Calc::DateToDays(27, 4, 2008), '2008 04 27');
-compare('2008 04 28', Date_Calc::DaysToDate(2454585, "%Y %m %d"), '2454585');
-compare(2454585, Date_Calc::DateToDays(28, 4, 2008), '2008 04 28');
-compare('2008 04 29', Date_Calc::DaysToDate(2454586, "%Y %m %d"), '2454586');
-compare(2454586, Date_Calc::DateToDays(29, 4, 2008), '2008 04 29');
-compare('2008 04 30', Date_Calc::DaysToDate(2454587, "%Y %m %d"), '2454587');
-compare(2454587, Date_Calc::DateToDays(30, 4, 2008), '2008 04 30');
-compare('2008 05 01', Date_Calc::DaysToDate(2454588, "%Y %m %d"), '2454588');
-compare(2454588, Date_Calc::DateToDays(1, 5, 2008), '2008 05 01');
-compare('2008 05 02', Date_Calc::DaysToDate(2454589, "%Y %m %d"), '2454589');
-compare(2454589, Date_Calc::DateToDays(2, 5, 2008), '2008 05 02');
-compare('2008 05 03', Date_Calc::DaysToDate(2454590, "%Y %m %d"), '2454590');
-compare(2454590, Date_Calc::DateToDays(3, 5, 2008), '2008 05 03');
-compare('2008 05 04', Date_Calc::DaysToDate(2454591, "%Y %m %d"), '2454591');
-compare(2454591, Date_Calc::DateToDays(4, 5, 2008), '2008 05 04');
-compare('2008 05 05', Date_Calc::DaysToDate(2454592, "%Y %m %d"), '2454592');
-compare(2454592, Date_Calc::DateToDays(5, 5, 2008), '2008 05 05');
-compare('2008 05 06', Date_Calc::DaysToDate(2454593, "%Y %m %d"), '2454593');
-compare(2454593, Date_Calc::DateToDays(6, 5, 2008), '2008 05 06');
-compare('2008 05 07', Date_Calc::DaysToDate(2454594, "%Y %m %d"), '2454594');
-compare(2454594, Date_Calc::DateToDays(7, 5, 2008), '2008 05 07');
-compare('2008 05 08', Date_Calc::DaysToDate(2454595, "%Y %m %d"), '2454595');
-compare(2454595, Date_Calc::DateToDays(8, 5, 2008), '2008 05 08');
-compare('2008 05 09', Date_Calc::DaysToDate(2454596, "%Y %m %d"), '2454596');
-compare(2454596, Date_Calc::DateToDays(9, 5, 2008), '2008 05 09');
-compare('2008 05 10', Date_Calc::DaysToDate(2454597, "%Y %m %d"), '2454597');
-compare(2454597, Date_Calc::DateToDays(10, 5, 2008), '2008 05 10');
-compare('2008 05 11', Date_Calc::DaysToDate(2454598, "%Y %m %d"), '2454598');
-compare(2454598, Date_Calc::DateToDays(11, 5, 2008), '2008 05 11');
-compare('2008 05 12', Date_Calc::DaysToDate(2454599, "%Y %m %d"), '2454599');
-compare(2454599, Date_Calc::DateToDays(12, 5, 2008), '2008 05 12');
-compare('2008 05 13', Date_Calc::DaysToDate(2454600, "%Y %m %d"), '2454600');
-compare(2454600, Date_Calc::DateToDays(13, 5, 2008), '2008 05 13');
-compare('2008 05 14', Date_Calc::DaysToDate(2454601, "%Y %m %d"), '2454601');
-compare(2454601, Date_Calc::DateToDays(14, 5, 2008), '2008 05 14');
-compare('2008 05 15', Date_Calc::DaysToDate(2454602, "%Y %m %d"), '2454602');
-compare(2454602, Date_Calc::DateToDays(15, 5, 2008), '2008 05 15');
-compare('2008 05 16', Date_Calc::DaysToDate(2454603, "%Y %m %d"), '2454603');
-compare(2454603, Date_Calc::DateToDays(16, 5, 2008), '2008 05 16');
-compare('2008 05 17', Date_Calc::DaysToDate(2454604, "%Y %m %d"), '2454604');
-compare(2454604, Date_Calc::DateToDays(17, 5, 2008), '2008 05 17');
-compare('2008 05 18', Date_Calc::DaysToDate(2454605, "%Y %m %d"), '2454605');
-compare(2454605, Date_Calc::DateToDays(18, 5, 2008), '2008 05 18');
-compare('2008 05 19', Date_Calc::DaysToDate(2454606, "%Y %m %d"), '2454606');
-compare(2454606, Date_Calc::DateToDays(19, 5, 2008), '2008 05 19');
-compare('2008 05 20', Date_Calc::DaysToDate(2454607, "%Y %m %d"), '2454607');
-compare(2454607, Date_Calc::DateToDays(20, 5, 2008), '2008 05 20');
-compare('2008 05 21', Date_Calc::DaysToDate(2454608, "%Y %m %d"), '2454608');
-compare(2454608, Date_Calc::DateToDays(21, 5, 2008), '2008 05 21');
-compare('2008 05 22', Date_Calc::DaysToDate(2454609, "%Y %m %d"), '2454609');
-compare(2454609, Date_Calc::DateToDays(22, 5, 2008), '2008 05 22');
-compare('2008 05 23', Date_Calc::DaysToDate(2454610, "%Y %m %d"), '2454610');
-compare(2454610, Date_Calc::DateToDays(23, 5, 2008), '2008 05 23');
-compare('2008 05 24', Date_Calc::DaysToDate(2454611, "%Y %m %d"), '2454611');
-compare(2454611, Date_Calc::DateToDays(24, 5, 2008), '2008 05 24');
-compare('2008 05 25', Date_Calc::DaysToDate(2454612, "%Y %m %d"), '2454612');
-compare(2454612, Date_Calc::DateToDays(25, 5, 2008), '2008 05 25');
-compare('2008 05 26', Date_Calc::DaysToDate(2454613, "%Y %m %d"), '2454613');
-compare(2454613, Date_Calc::DateToDays(26, 5, 2008), '2008 05 26');
-compare('2008 05 27', Date_Calc::DaysToDate(2454614, "%Y %m %d"), '2454614');
-compare(2454614, Date_Calc::DateToDays(27, 5, 2008), '2008 05 27');
-compare('2008 05 28', Date_Calc::DaysToDate(2454615, "%Y %m %d"), '2454615');
-compare(2454615, Date_Calc::DateToDays(28, 5, 2008), '2008 05 28');
-compare('2008 05 29', Date_Calc::DaysToDate(2454616, "%Y %m %d"), '2454616');
-compare(2454616, Date_Calc::DateToDays(29, 5, 2008), '2008 05 29');
-compare('2008 05 30', Date_Calc::DaysToDate(2454617, "%Y %m %d"), '2454617');
-compare(2454617, Date_Calc::DateToDays(30, 5, 2008), '2008 05 30');
-compare('2008 05 31', Date_Calc::DaysToDate(2454618, "%Y %m %d"), '2454618');
-compare(2454618, Date_Calc::DateToDays(31, 5, 2008), '2008 05 31');
-compare('2008 06 01', Date_Calc::DaysToDate(2454619, "%Y %m %d"), '2454619');
-compare(2454619, Date_Calc::DateToDays(1, 6, 2008), '2008 06 01');
-compare('2008 06 02', Date_Calc::DaysToDate(2454620, "%Y %m %d"), '2454620');
-compare(2454620, Date_Calc::DateToDays(2, 6, 2008), '2008 06 02');
-compare('2008 06 03', Date_Calc::DaysToDate(2454621, "%Y %m %d"), '2454621');
-compare(2454621, Date_Calc::DateToDays(3, 6, 2008), '2008 06 03');
-compare('2008 06 04', Date_Calc::DaysToDate(2454622, "%Y %m %d"), '2454622');
-compare(2454622, Date_Calc::DateToDays(4, 6, 2008), '2008 06 04');
-compare('2008 06 05', Date_Calc::DaysToDate(2454623, "%Y %m %d"), '2454623');
-compare(2454623, Date_Calc::DateToDays(5, 6, 2008), '2008 06 05');
-compare('2008 06 06', Date_Calc::DaysToDate(2454624, "%Y %m %d"), '2454624');
-compare(2454624, Date_Calc::DateToDays(6, 6, 2008), '2008 06 06');
-compare('2008 06 07', Date_Calc::DaysToDate(2454625, "%Y %m %d"), '2454625');
-compare(2454625, Date_Calc::DateToDays(7, 6, 2008), '2008 06 07');
-compare('2008 06 08', Date_Calc::DaysToDate(2454626, "%Y %m %d"), '2454626');
-compare(2454626, Date_Calc::DateToDays(8, 6, 2008), '2008 06 08');
-compare('2008 06 09', Date_Calc::DaysToDate(2454627, "%Y %m %d"), '2454627');
-compare(2454627, Date_Calc::DateToDays(9, 6, 2008), '2008 06 09');
-compare('2008 06 10', Date_Calc::DaysToDate(2454628, "%Y %m %d"), '2454628');
-compare(2454628, Date_Calc::DateToDays(10, 6, 2008), '2008 06 10');
-compare('2008 06 11', Date_Calc::DaysToDate(2454629, "%Y %m %d"), '2454629');
-compare(2454629, Date_Calc::DateToDays(11, 6, 2008), '2008 06 11');
-compare('2008 06 12', Date_Calc::DaysToDate(2454630, "%Y %m %d"), '2454630');
-compare(2454630, Date_Calc::DateToDays(12, 6, 2008), '2008 06 12');
-compare('2008 06 13', Date_Calc::DaysToDate(2454631, "%Y %m %d"), '2454631');
-compare(2454631, Date_Calc::DateToDays(13, 6, 2008), '2008 06 13');
-compare('2008 06 14', Date_Calc::DaysToDate(2454632, "%Y %m %d"), '2454632');
-compare(2454632, Date_Calc::DateToDays(14, 6, 2008), '2008 06 14');
-compare('2008 06 15', Date_Calc::DaysToDate(2454633, "%Y %m %d"), '2454633');
-compare(2454633, Date_Calc::DateToDays(15, 6, 2008), '2008 06 15');
-compare('2008 06 16', Date_Calc::DaysToDate(2454634, "%Y %m %d"), '2454634');
-compare(2454634, Date_Calc::DateToDays(16, 6, 2008), '2008 06 16');
-compare('2008 06 17', Date_Calc::DaysToDate(2454635, "%Y %m %d"), '2454635');
-compare(2454635, Date_Calc::DateToDays(17, 6, 2008), '2008 06 17');
-compare('2008 06 18', Date_Calc::DaysToDate(2454636, "%Y %m %d"), '2454636');
-compare(2454636, Date_Calc::DateToDays(18, 6, 2008), '2008 06 18');
-compare('2008 06 19', Date_Calc::DaysToDate(2454637, "%Y %m %d"), '2454637');
-compare(2454637, Date_Calc::DateToDays(19, 6, 2008), '2008 06 19');
-compare('2008 06 20', Date_Calc::DaysToDate(2454638, "%Y %m %d"), '2454638');
-compare(2454638, Date_Calc::DateToDays(20, 6, 2008), '2008 06 20');
-compare('2008 06 21', Date_Calc::DaysToDate(2454639, "%Y %m %d"), '2454639');
-compare(2454639, Date_Calc::DateToDays(21, 6, 2008), '2008 06 21');
-compare('2008 06 22', Date_Calc::DaysToDate(2454640, "%Y %m %d"), '2454640');
-compare(2454640, Date_Calc::DateToDays(22, 6, 2008), '2008 06 22');
-compare('2008 06 23', Date_Calc::DaysToDate(2454641, "%Y %m %d"), '2454641');
-compare(2454641, Date_Calc::DateToDays(23, 6, 2008), '2008 06 23');
-compare('2008 06 24', Date_Calc::DaysToDate(2454642, "%Y %m %d"), '2454642');
-compare(2454642, Date_Calc::DateToDays(24, 6, 2008), '2008 06 24');
-compare('2008 06 25', Date_Calc::DaysToDate(2454643, "%Y %m %d"), '2454643');
-compare(2454643, Date_Calc::DateToDays(25, 6, 2008), '2008 06 25');
-compare('2008 06 26', Date_Calc::DaysToDate(2454644, "%Y %m %d"), '2454644');
-compare(2454644, Date_Calc::DateToDays(26, 6, 2008), '2008 06 26');
-compare('2008 06 27', Date_Calc::DaysToDate(2454645, "%Y %m %d"), '2454645');
-compare(2454645, Date_Calc::DateToDays(27, 6, 2008), '2008 06 27');
-compare('2008 06 28', Date_Calc::DaysToDate(2454646, "%Y %m %d"), '2454646');
-compare(2454646, Date_Calc::DateToDays(28, 6, 2008), '2008 06 28');
-compare('2008 06 29', Date_Calc::DaysToDate(2454647, "%Y %m %d"), '2454647');
-compare(2454647, Date_Calc::DateToDays(29, 6, 2008), '2008 06 29');
-compare('2008 06 30', Date_Calc::DaysToDate(2454648, "%Y %m %d"), '2454648');
-compare(2454648, Date_Calc::DateToDays(30, 6, 2008), '2008 06 30');
-compare('2008 07 01', Date_Calc::DaysToDate(2454649, "%Y %m %d"), '2454649');
-compare(2454649, Date_Calc::DateToDays(1, 7, 2008), '2008 07 01');
-compare('2008 07 02', Date_Calc::DaysToDate(2454650, "%Y %m %d"), '2454650');
-compare(2454650, Date_Calc::DateToDays(2, 7, 2008), '2008 07 02');
-compare('2008 07 03', Date_Calc::DaysToDate(2454651, "%Y %m %d"), '2454651');
-compare(2454651, Date_Calc::DateToDays(3, 7, 2008), '2008 07 03');
-compare('2008 07 04', Date_Calc::DaysToDate(2454652, "%Y %m %d"), '2454652');
-compare(2454652, Date_Calc::DateToDays(4, 7, 2008), '2008 07 04');
-compare('2008 07 05', Date_Calc::DaysToDate(2454653, "%Y %m %d"), '2454653');
-compare(2454653, Date_Calc::DateToDays(5, 7, 2008), '2008 07 05');
-compare('2008 07 06', Date_Calc::DaysToDate(2454654, "%Y %m %d"), '2454654');
-compare(2454654, Date_Calc::DateToDays(6, 7, 2008), '2008 07 06');
-compare('2008 07 07', Date_Calc::DaysToDate(2454655, "%Y %m %d"), '2454655');
-compare(2454655, Date_Calc::DateToDays(7, 7, 2008), '2008 07 07');
-compare('2008 07 08', Date_Calc::DaysToDate(2454656, "%Y %m %d"), '2454656');
-compare(2454656, Date_Calc::DateToDays(8, 7, 2008), '2008 07 08');
-compare('2008 07 09', Date_Calc::DaysToDate(2454657, "%Y %m %d"), '2454657');
-compare(2454657, Date_Calc::DateToDays(9, 7, 2008), '2008 07 09');
-compare('2008 07 10', Date_Calc::DaysToDate(2454658, "%Y %m %d"), '2454658');
-compare(2454658, Date_Calc::DateToDays(10, 7, 2008), '2008 07 10');
-compare('2008 07 11', Date_Calc::DaysToDate(2454659, "%Y %m %d"), '2454659');
-compare(2454659, Date_Calc::DateToDays(11, 7, 2008), '2008 07 11');
-compare('2008 07 12', Date_Calc::DaysToDate(2454660, "%Y %m %d"), '2454660');
-compare(2454660, Date_Calc::DateToDays(12, 7, 2008), '2008 07 12');
-compare('2008 07 13', Date_Calc::DaysToDate(2454661, "%Y %m %d"), '2454661');
-compare(2454661, Date_Calc::DateToDays(13, 7, 2008), '2008 07 13');
-compare('2008 07 14', Date_Calc::DaysToDate(2454662, "%Y %m %d"), '2454662');
-compare(2454662, Date_Calc::DateToDays(14, 7, 2008), '2008 07 14');
-compare('2008 07 15', Date_Calc::DaysToDate(2454663, "%Y %m %d"), '2454663');
-compare(2454663, Date_Calc::DateToDays(15, 7, 2008), '2008 07 15');
-compare('2008 07 16', Date_Calc::DaysToDate(2454664, "%Y %m %d"), '2454664');
-compare(2454664, Date_Calc::DateToDays(16, 7, 2008), '2008 07 16');
-compare('2008 07 17', Date_Calc::DaysToDate(2454665, "%Y %m %d"), '2454665');
-compare(2454665, Date_Calc::DateToDays(17, 7, 2008), '2008 07 17');
-compare('2008 07 18', Date_Calc::DaysToDate(2454666, "%Y %m %d"), '2454666');
-compare(2454666, Date_Calc::DateToDays(18, 7, 2008), '2008 07 18');
-compare('2008 07 19', Date_Calc::DaysToDate(2454667, "%Y %m %d"), '2454667');
-compare(2454667, Date_Calc::DateToDays(19, 7, 2008), '2008 07 19');
-compare('2008 07 20', Date_Calc::DaysToDate(2454668, "%Y %m %d"), '2454668');
-compare(2454668, Date_Calc::DateToDays(20, 7, 2008), '2008 07 20');
-compare('2008 07 21', Date_Calc::DaysToDate(2454669, "%Y %m %d"), '2454669');
-compare(2454669, Date_Calc::DateToDays(21, 7, 2008), '2008 07 21');
-compare('2008 07 22', Date_Calc::DaysToDate(2454670, "%Y %m %d"), '2454670');
-compare(2454670, Date_Calc::DateToDays(22, 7, 2008), '2008 07 22');
-compare('2008 07 23', Date_Calc::DaysToDate(2454671, "%Y %m %d"), '2454671');
-compare(2454671, Date_Calc::DateToDays(23, 7, 2008), '2008 07 23');
-compare('2008 07 24', Date_Calc::DaysToDate(2454672, "%Y %m %d"), '2454672');
-compare(2454672, Date_Calc::DateToDays(24, 7, 2008), '2008 07 24');
-compare('2008 07 25', Date_Calc::DaysToDate(2454673, "%Y %m %d"), '2454673');
-compare(2454673, Date_Calc::DateToDays(25, 7, 2008), '2008 07 25');
-compare('2008 07 26', Date_Calc::DaysToDate(2454674, "%Y %m %d"), '2454674');
-compare(2454674, Date_Calc::DateToDays(26, 7, 2008), '2008 07 26');
-compare('2008 07 27', Date_Calc::DaysToDate(2454675, "%Y %m %d"), '2454675');
-compare(2454675, Date_Calc::DateToDays(27, 7, 2008), '2008 07 27');
-compare('2008 07 28', Date_Calc::DaysToDate(2454676, "%Y %m %d"), '2454676');
-compare(2454676, Date_Calc::DateToDays(28, 7, 2008), '2008 07 28');
-compare('2008 07 29', Date_Calc::DaysToDate(2454677, "%Y %m %d"), '2454677');
-compare(2454677, Date_Calc::DateToDays(29, 7, 2008), '2008 07 29');
-compare('2008 07 30', Date_Calc::DaysToDate(2454678, "%Y %m %d"), '2454678');
-compare(2454678, Date_Calc::DateToDays(30, 7, 2008), '2008 07 30');
-compare('2008 07 31', Date_Calc::DaysToDate(2454679, "%Y %m %d"), '2454679');
-compare(2454679, Date_Calc::DateToDays(31, 7, 2008), '2008 07 31');
-compare('2008 08 01', Date_Calc::DaysToDate(2454680, "%Y %m %d"), '2454680');
-compare(2454680, Date_Calc::DateToDays(1, 8, 2008), '2008 08 01');
-compare('2008 08 02', Date_Calc::DaysToDate(2454681, "%Y %m %d"), '2454681');
-compare(2454681, Date_Calc::DateToDays(2, 8, 2008), '2008 08 02');
-compare('2008 08 03', Date_Calc::DaysToDate(2454682, "%Y %m %d"), '2454682');
-compare(2454682, Date_Calc::DateToDays(3, 8, 2008), '2008 08 03');
-compare('2008 08 04', Date_Calc::DaysToDate(2454683, "%Y %m %d"), '2454683');
-compare(2454683, Date_Calc::DateToDays(4, 8, 2008), '2008 08 04');
-compare('2008 08 05', Date_Calc::DaysToDate(2454684, "%Y %m %d"), '2454684');
-compare(2454684, Date_Calc::DateToDays(5, 8, 2008), '2008 08 05');
-compare('2008 08 06', Date_Calc::DaysToDate(2454685, "%Y %m %d"), '2454685');
-compare(2454685, Date_Calc::DateToDays(6, 8, 2008), '2008 08 06');
-compare('2008 08 07', Date_Calc::DaysToDate(2454686, "%Y %m %d"), '2454686');
-compare(2454686, Date_Calc::DateToDays(7, 8, 2008), '2008 08 07');
-compare('2008 08 08', Date_Calc::DaysToDate(2454687, "%Y %m %d"), '2454687');
-compare(2454687, Date_Calc::DateToDays(8, 8, 2008), '2008 08 08');
-compare('2008 08 09', Date_Calc::DaysToDate(2454688, "%Y %m %d"), '2454688');
-compare(2454688, Date_Calc::DateToDays(9, 8, 2008), '2008 08 09');
-compare('2008 08 10', Date_Calc::DaysToDate(2454689, "%Y %m %d"), '2454689');
-compare(2454689, Date_Calc::DateToDays(10, 8, 2008), '2008 08 10');
-compare('2008 08 11', Date_Calc::DaysToDate(2454690, "%Y %m %d"), '2454690');
-compare(2454690, Date_Calc::DateToDays(11, 8, 2008), '2008 08 11');
-compare('2008 08 12', Date_Calc::DaysToDate(2454691, "%Y %m %d"), '2454691');
-compare(2454691, Date_Calc::DateToDays(12, 8, 2008), '2008 08 12');
-compare('2008 08 13', Date_Calc::DaysToDate(2454692, "%Y %m %d"), '2454692');
-compare(2454692, Date_Calc::DateToDays(13, 8, 2008), '2008 08 13');
-compare('2008 08 14', Date_Calc::DaysToDate(2454693, "%Y %m %d"), '2454693');
-compare(2454693, Date_Calc::DateToDays(14, 8, 2008), '2008 08 14');
-compare('2008 08 15', Date_Calc::DaysToDate(2454694, "%Y %m %d"), '2454694');
-compare(2454694, Date_Calc::DateToDays(15, 8, 2008), '2008 08 15');
-compare('2008 08 16', Date_Calc::DaysToDate(2454695, "%Y %m %d"), '2454695');
-compare(2454695, Date_Calc::DateToDays(16, 8, 2008), '2008 08 16');
-compare('2008 08 17', Date_Calc::DaysToDate(2454696, "%Y %m %d"), '2454696');
-compare(2454696, Date_Calc::DateToDays(17, 8, 2008), '2008 08 17');
-compare('2008 08 18', Date_Calc::DaysToDate(2454697, "%Y %m %d"), '2454697');
-compare(2454697, Date_Calc::DateToDays(18, 8, 2008), '2008 08 18');
-compare('2008 08 19', Date_Calc::DaysToDate(2454698, "%Y %m %d"), '2454698');
-compare(2454698, Date_Calc::DateToDays(19, 8, 2008), '2008 08 19');
-compare('2008 08 20', Date_Calc::DaysToDate(2454699, "%Y %m %d"), '2454699');
-compare(2454699, Date_Calc::DateToDays(20, 8, 2008), '2008 08 20');
-compare('2008 08 21', Date_Calc::DaysToDate(2454700, "%Y %m %d"), '2454700');
-compare(2454700, Date_Calc::DateToDays(21, 8, 2008), '2008 08 21');
-compare('2008 08 22', Date_Calc::DaysToDate(2454701, "%Y %m %d"), '2454701');
-compare(2454701, Date_Calc::DateToDays(22, 8, 2008), '2008 08 22');
-compare('2008 08 23', Date_Calc::DaysToDate(2454702, "%Y %m %d"), '2454702');
-compare(2454702, Date_Calc::DateToDays(23, 8, 2008), '2008 08 23');
-compare('2008 08 24', Date_Calc::DaysToDate(2454703, "%Y %m %d"), '2454703');
-compare(2454703, Date_Calc::DateToDays(24, 8, 2008), '2008 08 24');
-compare('2008 08 25', Date_Calc::DaysToDate(2454704, "%Y %m %d"), '2454704');
-compare(2454704, Date_Calc::DateToDays(25, 8, 2008), '2008 08 25');
-compare('2008 08 26', Date_Calc::DaysToDate(2454705, "%Y %m %d"), '2454705');
-compare(2454705, Date_Calc::DateToDays(26, 8, 2008), '2008 08 26');
-compare('2008 08 27', Date_Calc::DaysToDate(2454706, "%Y %m %d"), '2454706');
-compare(2454706, Date_Calc::DateToDays(27, 8, 2008), '2008 08 27');
-compare('2008 08 28', Date_Calc::DaysToDate(2454707, "%Y %m %d"), '2454707');
-compare(2454707, Date_Calc::DateToDays(28, 8, 2008), '2008 08 28');
-compare('2008 08 29', Date_Calc::DaysToDate(2454708, "%Y %m %d"), '2454708');
-compare(2454708, Date_Calc::DateToDays(29, 8, 2008), '2008 08 29');
-compare('2008 08 30', Date_Calc::DaysToDate(2454709, "%Y %m %d"), '2454709');
-compare(2454709, Date_Calc::DateToDays(30, 8, 2008), '2008 08 30');
-compare('2008 08 31', Date_Calc::DaysToDate(2454710, "%Y %m %d"), '2454710');
-compare(2454710, Date_Calc::DateToDays(31, 8, 2008), '2008 08 31');
-compare('2008 09 01', Date_Calc::DaysToDate(2454711, "%Y %m %d"), '2454711');
-compare(2454711, Date_Calc::DateToDays(1, 9, 2008), '2008 09 01');
-compare('2008 09 02', Date_Calc::DaysToDate(2454712, "%Y %m %d"), '2454712');
-compare(2454712, Date_Calc::DateToDays(2, 9, 2008), '2008 09 02');
-compare('2008 09 03', Date_Calc::DaysToDate(2454713, "%Y %m %d"), '2454713');
-compare(2454713, Date_Calc::DateToDays(3, 9, 2008), '2008 09 03');
-compare('2008 09 04', Date_Calc::DaysToDate(2454714, "%Y %m %d"), '2454714');
-compare(2454714, Date_Calc::DateToDays(4, 9, 2008), '2008 09 04');
-compare('2008 09 05', Date_Calc::DaysToDate(2454715, "%Y %m %d"), '2454715');
-compare(2454715, Date_Calc::DateToDays(5, 9, 2008), '2008 09 05');
-compare('2008 09 06', Date_Calc::DaysToDate(2454716, "%Y %m %d"), '2454716');
-compare(2454716, Date_Calc::DateToDays(6, 9, 2008), '2008 09 06');
-compare('2008 09 07', Date_Calc::DaysToDate(2454717, "%Y %m %d"), '2454717');
-compare(2454717, Date_Calc::DateToDays(7, 9, 2008), '2008 09 07');
-compare('2008 09 08', Date_Calc::DaysToDate(2454718, "%Y %m %d"), '2454718');
-compare(2454718, Date_Calc::DateToDays(8, 9, 2008), '2008 09 08');
-compare('2008 09 09', Date_Calc::DaysToDate(2454719, "%Y %m %d"), '2454719');
-compare(2454719, Date_Calc::DateToDays(9, 9, 2008), '2008 09 09');
-compare('2008 09 10', Date_Calc::DaysToDate(2454720, "%Y %m %d"), '2454720');
-compare(2454720, Date_Calc::DateToDays(10, 9, 2008), '2008 09 10');
-compare('2008 09 11', Date_Calc::DaysToDate(2454721, "%Y %m %d"), '2454721');
-compare(2454721, Date_Calc::DateToDays(11, 9, 2008), '2008 09 11');
-compare('2008 09 12', Date_Calc::DaysToDate(2454722, "%Y %m %d"), '2454722');
-compare(2454722, Date_Calc::DateToDays(12, 9, 2008), '2008 09 12');
-compare('2008 09 13', Date_Calc::DaysToDate(2454723, "%Y %m %d"), '2454723');
-compare(2454723, Date_Calc::DateToDays(13, 9, 2008), '2008 09 13');
-compare('2008 09 14', Date_Calc::DaysToDate(2454724, "%Y %m %d"), '2454724');
-compare(2454724, Date_Calc::DateToDays(14, 9, 2008), '2008 09 14');
-compare('2008 09 15', Date_Calc::DaysToDate(2454725, "%Y %m %d"), '2454725');
-compare(2454725, Date_Calc::DateToDays(15, 9, 2008), '2008 09 15');
-compare('2008 09 16', Date_Calc::DaysToDate(2454726, "%Y %m %d"), '2454726');
-compare(2454726, Date_Calc::DateToDays(16, 9, 2008), '2008 09 16');
-compare('2008 09 17', Date_Calc::DaysToDate(2454727, "%Y %m %d"), '2454727');
-compare(2454727, Date_Calc::DateToDays(17, 9, 2008), '2008 09 17');
-compare('2008 09 18', Date_Calc::DaysToDate(2454728, "%Y %m %d"), '2454728');
-compare(2454728, Date_Calc::DateToDays(18, 9, 2008), '2008 09 18');
-compare('2008 09 19', Date_Calc::DaysToDate(2454729, "%Y %m %d"), '2454729');
-compare(2454729, Date_Calc::DateToDays(19, 9, 2008), '2008 09 19');
-compare('2008 09 20', Date_Calc::DaysToDate(2454730, "%Y %m %d"), '2454730');
-compare(2454730, Date_Calc::DateToDays(20, 9, 2008), '2008 09 20');
-compare('2008 09 21', Date_Calc::DaysToDate(2454731, "%Y %m %d"), '2454731');
-compare(2454731, Date_Calc::DateToDays(21, 9, 2008), '2008 09 21');
-compare('2008 09 22', Date_Calc::DaysToDate(2454732, "%Y %m %d"), '2454732');
-compare(2454732, Date_Calc::DateToDays(22, 9, 2008), '2008 09 22');
-compare('2008 09 23', Date_Calc::DaysToDate(2454733, "%Y %m %d"), '2454733');
-compare(2454733, Date_Calc::DateToDays(23, 9, 2008), '2008 09 23');
-compare('2008 09 24', Date_Calc::DaysToDate(2454734, "%Y %m %d"), '2454734');
-compare(2454734, Date_Calc::DateToDays(24, 9, 2008), '2008 09 24');
-compare('2008 09 25', Date_Calc::DaysToDate(2454735, "%Y %m %d"), '2454735');
-compare(2454735, Date_Calc::DateToDays(25, 9, 2008), '2008 09 25');
-compare('2008 09 26', Date_Calc::DaysToDate(2454736, "%Y %m %d"), '2454736');
-compare(2454736, Date_Calc::DateToDays(26, 9, 2008), '2008 09 26');
-compare('2008 09 27', Date_Calc::DaysToDate(2454737, "%Y %m %d"), '2454737');
-compare(2454737, Date_Calc::DateToDays(27, 9, 2008), '2008 09 27');
-compare('2008 09 28', Date_Calc::DaysToDate(2454738, "%Y %m %d"), '2454738');
-compare(2454738, Date_Calc::DateToDays(28, 9, 2008), '2008 09 28');
-compare('2008 09 29', Date_Calc::DaysToDate(2454739, "%Y %m %d"), '2454739');
-compare(2454739, Date_Calc::DateToDays(29, 9, 2008), '2008 09 29');
-compare('2008 09 30', Date_Calc::DaysToDate(2454740, "%Y %m %d"), '2454740');
-compare(2454740, Date_Calc::DateToDays(30, 9, 2008), '2008 09 30');
-compare('2008 10 01', Date_Calc::DaysToDate(2454741, "%Y %m %d"), '2454741');
-compare(2454741, Date_Calc::DateToDays(1, 10, 2008), '2008 10 01');
-compare('2008 10 02', Date_Calc::DaysToDate(2454742, "%Y %m %d"), '2454742');
-compare(2454742, Date_Calc::DateToDays(2, 10, 2008), '2008 10 02');
-compare('2008 10 03', Date_Calc::DaysToDate(2454743, "%Y %m %d"), '2454743');
-compare(2454743, Date_Calc::DateToDays(3, 10, 2008), '2008 10 03');
-compare('2008 10 04', Date_Calc::DaysToDate(2454744, "%Y %m %d"), '2454744');
-compare(2454744, Date_Calc::DateToDays(4, 10, 2008), '2008 10 04');
-compare('2008 10 05', Date_Calc::DaysToDate(2454745, "%Y %m %d"), '2454745');
-compare(2454745, Date_Calc::DateToDays(5, 10, 2008), '2008 10 05');
-compare('2008 10 06', Date_Calc::DaysToDate(2454746, "%Y %m %d"), '2454746');
-compare(2454746, Date_Calc::DateToDays(6, 10, 2008), '2008 10 06');
-compare('2008 10 07', Date_Calc::DaysToDate(2454747, "%Y %m %d"), '2454747');
-compare(2454747, Date_Calc::DateToDays(7, 10, 2008), '2008 10 07');
-compare('2008 10 08', Date_Calc::DaysToDate(2454748, "%Y %m %d"), '2454748');
-compare(2454748, Date_Calc::DateToDays(8, 10, 2008), '2008 10 08');
-compare('2008 10 09', Date_Calc::DaysToDate(2454749, "%Y %m %d"), '2454749');
-compare(2454749, Date_Calc::DateToDays(9, 10, 2008), '2008 10 09');
-compare('2008 10 10', Date_Calc::DaysToDate(2454750, "%Y %m %d"), '2454750');
-compare(2454750, Date_Calc::DateToDays(10, 10, 2008), '2008 10 10');
-compare('2008 10 11', Date_Calc::DaysToDate(2454751, "%Y %m %d"), '2454751');
-compare(2454751, Date_Calc::DateToDays(11, 10, 2008), '2008 10 11');
-compare('2008 10 12', Date_Calc::DaysToDate(2454752, "%Y %m %d"), '2454752');
-compare(2454752, Date_Calc::DateToDays(12, 10, 2008), '2008 10 12');
-compare('2008 10 13', Date_Calc::DaysToDate(2454753, "%Y %m %d"), '2454753');
-compare(2454753, Date_Calc::DateToDays(13, 10, 2008), '2008 10 13');
-compare('2008 10 14', Date_Calc::DaysToDate(2454754, "%Y %m %d"), '2454754');
-compare(2454754, Date_Calc::DateToDays(14, 10, 2008), '2008 10 14');
-compare('2008 10 15', Date_Calc::DaysToDate(2454755, "%Y %m %d"), '2454755');
-compare(2454755, Date_Calc::DateToDays(15, 10, 2008), '2008 10 15');
-compare('2008 10 16', Date_Calc::DaysToDate(2454756, "%Y %m %d"), '2454756');
-compare(2454756, Date_Calc::DateToDays(16, 10, 2008), '2008 10 16');
-compare('2008 10 17', Date_Calc::DaysToDate(2454757, "%Y %m %d"), '2454757');
-compare(2454757, Date_Calc::DateToDays(17, 10, 2008), '2008 10 17');
-compare('2008 10 18', Date_Calc::DaysToDate(2454758, "%Y %m %d"), '2454758');
-compare(2454758, Date_Calc::DateToDays(18, 10, 2008), '2008 10 18');
-compare('2008 10 19', Date_Calc::DaysToDate(2454759, "%Y %m %d"), '2454759');
-compare(2454759, Date_Calc::DateToDays(19, 10, 2008), '2008 10 19');
-compare('2008 10 20', Date_Calc::DaysToDate(2454760, "%Y %m %d"), '2454760');
-compare(2454760, Date_Calc::DateToDays(20, 10, 2008), '2008 10 20');
-compare('2008 10 21', Date_Calc::DaysToDate(2454761, "%Y %m %d"), '2454761');
-compare(2454761, Date_Calc::DateToDays(21, 10, 2008), '2008 10 21');
-compare('2008 10 22', Date_Calc::DaysToDate(2454762, "%Y %m %d"), '2454762');
-compare(2454762, Date_Calc::DateToDays(22, 10, 2008), '2008 10 22');
-compare('2008 10 23', Date_Calc::DaysToDate(2454763, "%Y %m %d"), '2454763');
-compare(2454763, Date_Calc::DateToDays(23, 10, 2008), '2008 10 23');
-compare('2008 10 24', Date_Calc::DaysToDate(2454764, "%Y %m %d"), '2454764');
-compare(2454764, Date_Calc::DateToDays(24, 10, 2008), '2008 10 24');
-compare('2008 10 25', Date_Calc::DaysToDate(2454765, "%Y %m %d"), '2454765');
-compare(2454765, Date_Calc::DateToDays(25, 10, 2008), '2008 10 25');
-compare('2008 10 26', Date_Calc::DaysToDate(2454766, "%Y %m %d"), '2454766');
-compare(2454766, Date_Calc::DateToDays(26, 10, 2008), '2008 10 26');
-compare('2008 10 27', Date_Calc::DaysToDate(2454767, "%Y %m %d"), '2454767');
-compare(2454767, Date_Calc::DateToDays(27, 10, 2008), '2008 10 27');
-compare('2008 10 28', Date_Calc::DaysToDate(2454768, "%Y %m %d"), '2454768');
-compare(2454768, Date_Calc::DateToDays(28, 10, 2008), '2008 10 28');
-compare('2008 10 29', Date_Calc::DaysToDate(2454769, "%Y %m %d"), '2454769');
-compare(2454769, Date_Calc::DateToDays(29, 10, 2008), '2008 10 29');
-compare('2008 10 30', Date_Calc::DaysToDate(2454770, "%Y %m %d"), '2454770');
-compare(2454770, Date_Calc::DateToDays(30, 10, 2008), '2008 10 30');
-compare('2008 10 31', Date_Calc::DaysToDate(2454771, "%Y %m %d"), '2454771');
-compare(2454771, Date_Calc::DateToDays(31, 10, 2008), '2008 10 31');
-compare('2008 11 01', Date_Calc::DaysToDate(2454772, "%Y %m %d"), '2454772');
-compare(2454772, Date_Calc::DateToDays(1, 11, 2008), '2008 11 01');
-compare('2008 11 02', Date_Calc::DaysToDate(2454773, "%Y %m %d"), '2454773');
-compare(2454773, Date_Calc::DateToDays(2, 11, 2008), '2008 11 02');
-compare('2008 11 03', Date_Calc::DaysToDate(2454774, "%Y %m %d"), '2454774');
-compare(2454774, Date_Calc::DateToDays(3, 11, 2008), '2008 11 03');
-compare('2008 11 04', Date_Calc::DaysToDate(2454775, "%Y %m %d"), '2454775');
-compare(2454775, Date_Calc::DateToDays(4, 11, 2008), '2008 11 04');
-compare('2008 11 05', Date_Calc::DaysToDate(2454776, "%Y %m %d"), '2454776');
-compare(2454776, Date_Calc::DateToDays(5, 11, 2008), '2008 11 05');
-compare('2008 11 06', Date_Calc::DaysToDate(2454777, "%Y %m %d"), '2454777');
-compare(2454777, Date_Calc::DateToDays(6, 11, 2008), '2008 11 06');
-compare('2008 11 07', Date_Calc::DaysToDate(2454778, "%Y %m %d"), '2454778');
-compare(2454778, Date_Calc::DateToDays(7, 11, 2008), '2008 11 07');
-
-compare('-0002 12 31', Date_Calc::DaysToDate(1720694, "%Y %m %d"), '1720694');
-compare(1720694, Date_Calc::DateToDays(31, 12, -2), '-0002 12 31');
-compare('-0001 01 01', Date_Calc::DaysToDate(1720695, "%Y %m %d"), '1720695');
-compare(1720695, Date_Calc::DateToDays(1, 1, -1), '-0001 01 01');
-compare('-0001 01 02', Date_Calc::DaysToDate(1720696, "%Y %m %d"), '1720696');
-compare(1720696, Date_Calc::DateToDays(2, 1, -1), '-0001 01 02');
-compare('-0001 01 03', Date_Calc::DaysToDate(1720697, "%Y %m %d"), '1720697');
-compare(1720697, Date_Calc::DateToDays(3, 1, -1), '-0001 01 03');
-compare('-0001 01 04', Date_Calc::DaysToDate(1720698, "%Y %m %d"), '1720698');
-compare(1720698, Date_Calc::DateToDays(4, 1, -1), '-0001 01 04');
-compare('-0001 01 05', Date_Calc::DaysToDate(1720699, "%Y %m %d"), '1720699');
-compare(1720699, Date_Calc::DateToDays(5, 1, -1), '-0001 01 05');
-compare('-0001 01 06', Date_Calc::DaysToDate(1720700, "%Y %m %d"), '1720700');
-compare(1720700, Date_Calc::DateToDays(6, 1, -1), '-0001 01 06');
-compare('-0001 01 07', Date_Calc::DaysToDate(1720701, "%Y %m %d"), '1720701');
-compare(1720701, Date_Calc::DateToDays(7, 1, -1), '-0001 01 07');
-compare('-0001 01 08', Date_Calc::DaysToDate(1720702, "%Y %m %d"), '1720702');
-compare(1720702, Date_Calc::DateToDays(8, 1, -1), '-0001 01 08');
-compare('-0001 01 09', Date_Calc::DaysToDate(1720703, "%Y %m %d"), '1720703');
-compare(1720703, Date_Calc::DateToDays(9, 1, -1), '-0001 01 09');
-compare('-0001 01 10', Date_Calc::DaysToDate(1720704, "%Y %m %d"), '1720704');
-compare(1720704, Date_Calc::DateToDays(10, 1, -1), '-0001 01 10');
-compare('-0001 01 11', Date_Calc::DaysToDate(1720705, "%Y %m %d"), '1720705');
-compare(1720705, Date_Calc::DateToDays(11, 1, -1), '-0001 01 11');
-compare('-0001 01 12', Date_Calc::DaysToDate(1720706, "%Y %m %d"), '1720706');
-compare(1720706, Date_Calc::DateToDays(12, 1, -1), '-0001 01 12');
-compare('-0001 01 13', Date_Calc::DaysToDate(1720707, "%Y %m %d"), '1720707');
-compare(1720707, Date_Calc::DateToDays(13, 1, -1), '-0001 01 13');
-compare('-0001 01 14', Date_Calc::DaysToDate(1720708, "%Y %m %d"), '1720708');
-compare(1720708, Date_Calc::DateToDays(14, 1, -1), '-0001 01 14');
-compare('-0001 01 15', Date_Calc::DaysToDate(1720709, "%Y %m %d"), '1720709');
-compare(1720709, Date_Calc::DateToDays(15, 1, -1), '-0001 01 15');
-compare('-0001 01 16', Date_Calc::DaysToDate(1720710, "%Y %m %d"), '1720710');
-compare(1720710, Date_Calc::DateToDays(16, 1, -1), '-0001 01 16');
-compare('-0001 01 17', Date_Calc::DaysToDate(1720711, "%Y %m %d"), '1720711');
-compare(1720711, Date_Calc::DateToDays(17, 1, -1), '-0001 01 17');
-compare('-0001 01 18', Date_Calc::DaysToDate(1720712, "%Y %m %d"), '1720712');
-compare(1720712, Date_Calc::DateToDays(18, 1, -1), '-0001 01 18');
-compare('-0001 01 19', Date_Calc::DaysToDate(1720713, "%Y %m %d"), '1720713');
-compare(1720713, Date_Calc::DateToDays(19, 1, -1), '-0001 01 19');
-compare('-0001 01 20', Date_Calc::DaysToDate(1720714, "%Y %m %d"), '1720714');
-compare(1720714, Date_Calc::DateToDays(20, 1, -1), '-0001 01 20');
-compare('-0001 01 21', Date_Calc::DaysToDate(1720715, "%Y %m %d"), '1720715');
-compare(1720715, Date_Calc::DateToDays(21, 1, -1), '-0001 01 21');
-compare('-0001 01 22', Date_Calc::DaysToDate(1720716, "%Y %m %d"), '1720716');
-compare(1720716, Date_Calc::DateToDays(22, 1, -1), '-0001 01 22');
-compare('-0001 01 23', Date_Calc::DaysToDate(1720717, "%Y %m %d"), '1720717');
-compare(1720717, Date_Calc::DateToDays(23, 1, -1), '-0001 01 23');
-compare('-0001 01 24', Date_Calc::DaysToDate(1720718, "%Y %m %d"), '1720718');
-compare(1720718, Date_Calc::DateToDays(24, 1, -1), '-0001 01 24');
-compare('-0001 01 25', Date_Calc::DaysToDate(1720719, "%Y %m %d"), '1720719');
-compare(1720719, Date_Calc::DateToDays(25, 1, -1), '-0001 01 25');
-compare('-0001 01 26', Date_Calc::DaysToDate(1720720, "%Y %m %d"), '1720720');
-compare(1720720, Date_Calc::DateToDays(26, 1, -1), '-0001 01 26');
-compare('-0001 01 27', Date_Calc::DaysToDate(1720721, "%Y %m %d"), '1720721');
-compare(1720721, Date_Calc::DateToDays(27, 1, -1), '-0001 01 27');
-compare('-0001 01 28', Date_Calc::DaysToDate(1720722, "%Y %m %d"), '1720722');
-compare(1720722, Date_Calc::DateToDays(28, 1, -1), '-0001 01 28');
-compare('-0001 01 29', Date_Calc::DaysToDate(1720723, "%Y %m %d"), '1720723');
-compare(1720723, Date_Calc::DateToDays(29, 1, -1), '-0001 01 29');
-compare('-0001 01 30', Date_Calc::DaysToDate(1720724, "%Y %m %d"), '1720724');
-compare(1720724, Date_Calc::DateToDays(30, 1, -1), '-0001 01 30');
-compare('-0001 01 31', Date_Calc::DaysToDate(1720725, "%Y %m %d"), '1720725');
-compare(1720725, Date_Calc::DateToDays(31, 1, -1), '-0001 01 31');
-compare('-0001 02 01', Date_Calc::DaysToDate(1720726, "%Y %m %d"), '1720726');
-compare(1720726, Date_Calc::DateToDays(1, 2, -1), '-0001 02 01');
-compare('-0001 02 02', Date_Calc::DaysToDate(1720727, "%Y %m %d"), '1720727');
-compare(1720727, Date_Calc::DateToDays(2, 2, -1), '-0001 02 02');
-compare('-0001 02 03', Date_Calc::DaysToDate(1720728, "%Y %m %d"), '1720728');
-compare(1720728, Date_Calc::DateToDays(3, 2, -1), '-0001 02 03');
-compare('-0001 02 04', Date_Calc::DaysToDate(1720729, "%Y %m %d"), '1720729');
-compare(1720729, Date_Calc::DateToDays(4, 2, -1), '-0001 02 04');
-compare('-0001 02 05', Date_Calc::DaysToDate(1720730, "%Y %m %d"), '1720730');
-compare(1720730, Date_Calc::DateToDays(5, 2, -1), '-0001 02 05');
-compare('-0001 02 06', Date_Calc::DaysToDate(1720731, "%Y %m %d"), '1720731');
-compare(1720731, Date_Calc::DateToDays(6, 2, -1), '-0001 02 06');
-compare('-0001 02 07', Date_Calc::DaysToDate(1720732, "%Y %m %d"), '1720732');
-compare(1720732, Date_Calc::DateToDays(7, 2, -1), '-0001 02 07');
-compare('-0001 02 08', Date_Calc::DaysToDate(1720733, "%Y %m %d"), '1720733');
-compare(1720733, Date_Calc::DateToDays(8, 2, -1), '-0001 02 08');
-compare('-0001 02 09', Date_Calc::DaysToDate(1720734, "%Y %m %d"), '1720734');
-compare(1720734, Date_Calc::DateToDays(9, 2, -1), '-0001 02 09');
-compare('-0001 02 10', Date_Calc::DaysToDate(1720735, "%Y %m %d"), '1720735');
-compare(1720735, Date_Calc::DateToDays(10, 2, -1), '-0001 02 10');
-compare('-0001 02 11', Date_Calc::DaysToDate(1720736, "%Y %m %d"), '1720736');
-compare(1720736, Date_Calc::DateToDays(11, 2, -1), '-0001 02 11');
-compare('-0001 02 12', Date_Calc::DaysToDate(1720737, "%Y %m %d"), '1720737');
-compare(1720737, Date_Calc::DateToDays(12, 2, -1), '-0001 02 12');
-compare('-0001 02 13', Date_Calc::DaysToDate(1720738, "%Y %m %d"), '1720738');
-compare(1720738, Date_Calc::DateToDays(13, 2, -1), '-0001 02 13');
-compare('-0001 02 14', Date_Calc::DaysToDate(1720739, "%Y %m %d"), '1720739');
-compare(1720739, Date_Calc::DateToDays(14, 2, -1), '-0001 02 14');
-compare('-0001 02 15', Date_Calc::DaysToDate(1720740, "%Y %m %d"), '1720740');
-compare(1720740, Date_Calc::DateToDays(15, 2, -1), '-0001 02 15');
-compare('-0001 02 16', Date_Calc::DaysToDate(1720741, "%Y %m %d"), '1720741');
-compare(1720741, Date_Calc::DateToDays(16, 2, -1), '-0001 02 16');
-compare('-0001 02 17', Date_Calc::DaysToDate(1720742, "%Y %m %d"), '1720742');
-compare(1720742, Date_Calc::DateToDays(17, 2, -1), '-0001 02 17');
-compare('-0001 02 18', Date_Calc::DaysToDate(1720743, "%Y %m %d"), '1720743');
-compare(1720743, Date_Calc::DateToDays(18, 2, -1), '-0001 02 18');
-compare('-0001 02 19', Date_Calc::DaysToDate(1720744, "%Y %m %d"), '1720744');
-compare(1720744, Date_Calc::DateToDays(19, 2, -1), '-0001 02 19');
-compare('-0001 02 20', Date_Calc::DaysToDate(1720745, "%Y %m %d"), '1720745');
-compare(1720745, Date_Calc::DateToDays(20, 2, -1), '-0001 02 20');
-compare('-0001 02 21', Date_Calc::DaysToDate(1720746, "%Y %m %d"), '1720746');
-compare(1720746, Date_Calc::DateToDays(21, 2, -1), '-0001 02 21');
-compare('-0001 02 22', Date_Calc::DaysToDate(1720747, "%Y %m %d"), '1720747');
-compare(1720747, Date_Calc::DateToDays(22, 2, -1), '-0001 02 22');
-compare('-0001 02 23', Date_Calc::DaysToDate(1720748, "%Y %m %d"), '1720748');
-compare(1720748, Date_Calc::DateToDays(23, 2, -1), '-0001 02 23');
-compare('-0001 02 24', Date_Calc::DaysToDate(1720749, "%Y %m %d"), '1720749');
-compare(1720749, Date_Calc::DateToDays(24, 2, -1), '-0001 02 24');
-compare('-0001 02 25', Date_Calc::DaysToDate(1720750, "%Y %m %d"), '1720750');
-compare(1720750, Date_Calc::DateToDays(25, 2, -1), '-0001 02 25');
-compare('-0001 02 26', Date_Calc::DaysToDate(1720751, "%Y %m %d"), '1720751');
-compare(1720751, Date_Calc::DateToDays(26, 2, -1), '-0001 02 26');
-compare('-0001 02 27', Date_Calc::DaysToDate(1720752, "%Y %m %d"), '1720752');
-compare(1720752, Date_Calc::DateToDays(27, 2, -1), '-0001 02 27');
-compare('-0001 02 28', Date_Calc::DaysToDate(1720753, "%Y %m %d"), '1720753');
-compare(1720753, Date_Calc::DateToDays(28, 2, -1), '-0001 02 28');
-compare('-0001 03 01', Date_Calc::DaysToDate(1720754, "%Y %m %d"), '1720754');
-compare(1720754, Date_Calc::DateToDays(1, 3, -1), '-0001 03 01');
-compare('-0001 03 02', Date_Calc::DaysToDate(1720755, "%Y %m %d"), '1720755');
-compare(1720755, Date_Calc::DateToDays(2, 3, -1), '-0001 03 02');
-compare('-0001 03 03', Date_Calc::DaysToDate(1720756, "%Y %m %d"), '1720756');
-compare(1720756, Date_Calc::DateToDays(3, 3, -1), '-0001 03 03');
-compare('-0001 03 04', Date_Calc::DaysToDate(1720757, "%Y %m %d"), '1720757');
-compare(1720757, Date_Calc::DateToDays(4, 3, -1), '-0001 03 04');
-compare('-0001 03 05', Date_Calc::DaysToDate(1720758, "%Y %m %d"), '1720758');
-compare(1720758, Date_Calc::DateToDays(5, 3, -1), '-0001 03 05');
-compare('-0001 03 06', Date_Calc::DaysToDate(1720759, "%Y %m %d"), '1720759');
-compare(1720759, Date_Calc::DateToDays(6, 3, -1), '-0001 03 06');
-compare('-0001 03 07', Date_Calc::DaysToDate(1720760, "%Y %m %d"), '1720760');
-compare(1720760, Date_Calc::DateToDays(7, 3, -1), '-0001 03 07');
-compare('-0001 03 08', Date_Calc::DaysToDate(1720761, "%Y %m %d"), '1720761');
-compare(1720761, Date_Calc::DateToDays(8, 3, -1), '-0001 03 08');
-compare('-0001 03 09', Date_Calc::DaysToDate(1720762, "%Y %m %d"), '1720762');
-compare(1720762, Date_Calc::DateToDays(9, 3, -1), '-0001 03 09');
-compare('-0001 03 10', Date_Calc::DaysToDate(1720763, "%Y %m %d"), '1720763');
-compare(1720763, Date_Calc::DateToDays(10, 3, -1), '-0001 03 10');
-compare('-0001 03 11', Date_Calc::DaysToDate(1720764, "%Y %m %d"), '1720764');
-compare(1720764, Date_Calc::DateToDays(11, 3, -1), '-0001 03 11');
-compare('-0001 03 12', Date_Calc::DaysToDate(1720765, "%Y %m %d"), '1720765');
-compare(1720765, Date_Calc::DateToDays(12, 3, -1), '-0001 03 12');
-compare('-0001 03 13', Date_Calc::DaysToDate(1720766, "%Y %m %d"), '1720766');
-compare(1720766, Date_Calc::DateToDays(13, 3, -1), '-0001 03 13');
-compare('-0001 03 14', Date_Calc::DaysToDate(1720767, "%Y %m %d"), '1720767');
-compare(1720767, Date_Calc::DateToDays(14, 3, -1), '-0001 03 14');
-compare('-0001 03 15', Date_Calc::DaysToDate(1720768, "%Y %m %d"), '1720768');
-compare(1720768, Date_Calc::DateToDays(15, 3, -1), '-0001 03 15');
-compare('-0001 03 16', Date_Calc::DaysToDate(1720769, "%Y %m %d"), '1720769');
-compare(1720769, Date_Calc::DateToDays(16, 3, -1), '-0001 03 16');
-compare('-0001 03 17', Date_Calc::DaysToDate(1720770, "%Y %m %d"), '1720770');
-compare(1720770, Date_Calc::DateToDays(17, 3, -1), '-0001 03 17');
-compare('-0001 03 18', Date_Calc::DaysToDate(1720771, "%Y %m %d"), '1720771');
-compare(1720771, Date_Calc::DateToDays(18, 3, -1), '-0001 03 18');
-compare('-0001 03 19', Date_Calc::DaysToDate(1720772, "%Y %m %d"), '1720772');
-compare(1720772, Date_Calc::DateToDays(19, 3, -1), '-0001 03 19');
-compare('-0001 03 20', Date_Calc::DaysToDate(1720773, "%Y %m %d"), '1720773');
-compare(1720773, Date_Calc::DateToDays(20, 3, -1), '-0001 03 20');
-compare('-0001 03 21', Date_Calc::DaysToDate(1720774, "%Y %m %d"), '1720774');
-compare(1720774, Date_Calc::DateToDays(21, 3, -1), '-0001 03 21');
-compare('-0001 03 22', Date_Calc::DaysToDate(1720775, "%Y %m %d"), '1720775');
-compare(1720775, Date_Calc::DateToDays(22, 3, -1), '-0001 03 22');
-compare('-0001 03 23', Date_Calc::DaysToDate(1720776, "%Y %m %d"), '1720776');
-compare(1720776, Date_Calc::DateToDays(23, 3, -1), '-0001 03 23');
-compare('-0001 03 24', Date_Calc::DaysToDate(1720777, "%Y %m %d"), '1720777');
-compare(1720777, Date_Calc::DateToDays(24, 3, -1), '-0001 03 24');
-compare('-0001 03 25', Date_Calc::DaysToDate(1720778, "%Y %m %d"), '1720778');
-compare(1720778, Date_Calc::DateToDays(25, 3, -1), '-0001 03 25');
-compare('-0001 03 26', Date_Calc::DaysToDate(1720779, "%Y %m %d"), '1720779');
-compare(1720779, Date_Calc::DateToDays(26, 3, -1), '-0001 03 26');
-compare('-0001 03 27', Date_Calc::DaysToDate(1720780, "%Y %m %d"), '1720780');
-compare(1720780, Date_Calc::DateToDays(27, 3, -1), '-0001 03 27');
-compare('-0001 03 28', Date_Calc::DaysToDate(1720781, "%Y %m %d"), '1720781');
-compare(1720781, Date_Calc::DateToDays(28, 3, -1), '-0001 03 28');
-compare('-0001 03 29', Date_Calc::DaysToDate(1720782, "%Y %m %d"), '1720782');
-compare(1720782, Date_Calc::DateToDays(29, 3, -1), '-0001 03 29');
-compare('-0001 03 30', Date_Calc::DaysToDate(1720783, "%Y %m %d"), '1720783');
-compare(1720783, Date_Calc::DateToDays(30, 3, -1), '-0001 03 30');
-compare('-0001 03 31', Date_Calc::DaysToDate(1720784, "%Y %m %d"), '1720784');
-compare(1720784, Date_Calc::DateToDays(31, 3, -1), '-0001 03 31');
-compare('-0001 04 01', Date_Calc::DaysToDate(1720785, "%Y %m %d"), '1720785');
-compare(1720785, Date_Calc::DateToDays(1, 4, -1), '-0001 04 01');
-compare('-0001 04 02', Date_Calc::DaysToDate(1720786, "%Y %m %d"), '1720786');
-compare(1720786, Date_Calc::DateToDays(2, 4, -1), '-0001 04 02');
-compare('-0001 04 03', Date_Calc::DaysToDate(1720787, "%Y %m %d"), '1720787');
-compare(1720787, Date_Calc::DateToDays(3, 4, -1), '-0001 04 03');
-compare('-0001 04 04', Date_Calc::DaysToDate(1720788, "%Y %m %d"), '1720788');
-compare(1720788, Date_Calc::DateToDays(4, 4, -1), '-0001 04 04');
-compare('-0001 04 05', Date_Calc::DaysToDate(1720789, "%Y %m %d"), '1720789');
-compare(1720789, Date_Calc::DateToDays(5, 4, -1), '-0001 04 05');
-compare('-0001 04 06', Date_Calc::DaysToDate(1720790, "%Y %m %d"), '1720790');
-compare(1720790, Date_Calc::DateToDays(6, 4, -1), '-0001 04 06');
-compare('-0001 04 07', Date_Calc::DaysToDate(1720791, "%Y %m %d"), '1720791');
-compare(1720791, Date_Calc::DateToDays(7, 4, -1), '-0001 04 07');
-compare('-0001 04 08', Date_Calc::DaysToDate(1720792, "%Y %m %d"), '1720792');
-compare(1720792, Date_Calc::DateToDays(8, 4, -1), '-0001 04 08');
-compare('-0001 04 09', Date_Calc::DaysToDate(1720793, "%Y %m %d"), '1720793');
-compare(1720793, Date_Calc::DateToDays(9, 4, -1), '-0001 04 09');
-compare('-0001 04 10', Date_Calc::DaysToDate(1720794, "%Y %m %d"), '1720794');
-compare(1720794, Date_Calc::DateToDays(10, 4, -1), '-0001 04 10');
-compare('-0001 04 11', Date_Calc::DaysToDate(1720795, "%Y %m %d"), '1720795');
-compare(1720795, Date_Calc::DateToDays(11, 4, -1), '-0001 04 11');
-compare('-0001 04 12', Date_Calc::DaysToDate(1720796, "%Y %m %d"), '1720796');
-compare(1720796, Date_Calc::DateToDays(12, 4, -1), '-0001 04 12');
-compare('-0001 04 13', Date_Calc::DaysToDate(1720797, "%Y %m %d"), '1720797');
-compare(1720797, Date_Calc::DateToDays(13, 4, -1), '-0001 04 13');
-compare('-0001 04 14', Date_Calc::DaysToDate(1720798, "%Y %m %d"), '1720798');
-compare(1720798, Date_Calc::DateToDays(14, 4, -1), '-0001 04 14');
-compare('-0001 04 15', Date_Calc::DaysToDate(1720799, "%Y %m %d"), '1720799');
-compare(1720799, Date_Calc::DateToDays(15, 4, -1), '-0001 04 15');
-compare('-0001 04 16', Date_Calc::DaysToDate(1720800, "%Y %m %d"), '1720800');
-compare(1720800, Date_Calc::DateToDays(16, 4, -1), '-0001 04 16');
-compare('-0001 04 17', Date_Calc::DaysToDate(1720801, "%Y %m %d"), '1720801');
-compare(1720801, Date_Calc::DateToDays(17, 4, -1), '-0001 04 17');
-compare('-0001 04 18', Date_Calc::DaysToDate(1720802, "%Y %m %d"), '1720802');
-compare(1720802, Date_Calc::DateToDays(18, 4, -1), '-0001 04 18');
-compare('-0001 04 19', Date_Calc::DaysToDate(1720803, "%Y %m %d"), '1720803');
-compare(1720803, Date_Calc::DateToDays(19, 4, -1), '-0001 04 19');
-compare('-0001 04 20', Date_Calc::DaysToDate(1720804, "%Y %m %d"), '1720804');
-compare(1720804, Date_Calc::DateToDays(20, 4, -1), '-0001 04 20');
-compare('-0001 04 21', Date_Calc::DaysToDate(1720805, "%Y %m %d"), '1720805');
-compare(1720805, Date_Calc::DateToDays(21, 4, -1), '-0001 04 21');
-compare('-0001 04 22', Date_Calc::DaysToDate(1720806, "%Y %m %d"), '1720806');
-compare(1720806, Date_Calc::DateToDays(22, 4, -1), '-0001 04 22');
-compare('-0001 04 23', Date_Calc::DaysToDate(1720807, "%Y %m %d"), '1720807');
-compare(1720807, Date_Calc::DateToDays(23, 4, -1), '-0001 04 23');
-compare('-0001 04 24', Date_Calc::DaysToDate(1720808, "%Y %m %d"), '1720808');
-compare(1720808, Date_Calc::DateToDays(24, 4, -1), '-0001 04 24');
-compare('-0001 04 25', Date_Calc::DaysToDate(1720809, "%Y %m %d"), '1720809');
-compare(1720809, Date_Calc::DateToDays(25, 4, -1), '-0001 04 25');
-compare('-0001 04 26', Date_Calc::DaysToDate(1720810, "%Y %m %d"), '1720810');
-compare(1720810, Date_Calc::DateToDays(26, 4, -1), '-0001 04 26');
-compare('-0001 04 27', Date_Calc::DaysToDate(1720811, "%Y %m %d"), '1720811');
-compare(1720811, Date_Calc::DateToDays(27, 4, -1), '-0001 04 27');
-compare('-0001 04 28', Date_Calc::DaysToDate(1720812, "%Y %m %d"), '1720812');
-compare(1720812, Date_Calc::DateToDays(28, 4, -1), '-0001 04 28');
-compare('-0001 04 29', Date_Calc::DaysToDate(1720813, "%Y %m %d"), '1720813');
-compare(1720813, Date_Calc::DateToDays(29, 4, -1), '-0001 04 29');
-compare('-0001 04 30', Date_Calc::DaysToDate(1720814, "%Y %m %d"), '1720814');
-compare(1720814, Date_Calc::DateToDays(30, 4, -1), '-0001 04 30');
-compare('-0001 05 01', Date_Calc::DaysToDate(1720815, "%Y %m %d"), '1720815');
-compare(1720815, Date_Calc::DateToDays(1, 5, -1), '-0001 05 01');
-compare('-0001 05 02', Date_Calc::DaysToDate(1720816, "%Y %m %d"), '1720816');
-compare(1720816, Date_Calc::DateToDays(2, 5, -1), '-0001 05 02');
-compare('-0001 05 03', Date_Calc::DaysToDate(1720817, "%Y %m %d"), '1720817');
-compare(1720817, Date_Calc::DateToDays(3, 5, -1), '-0001 05 03');
-compare('-0001 05 04', Date_Calc::DaysToDate(1720818, "%Y %m %d"), '1720818');
-compare(1720818, Date_Calc::DateToDays(4, 5, -1), '-0001 05 04');
-compare('-0001 05 05', Date_Calc::DaysToDate(1720819, "%Y %m %d"), '1720819');
-compare(1720819, Date_Calc::DateToDays(5, 5, -1), '-0001 05 05');
-compare('-0001 05 06', Date_Calc::DaysToDate(1720820, "%Y %m %d"), '1720820');
-compare(1720820, Date_Calc::DateToDays(6, 5, -1), '-0001 05 06');
-compare('-0001 05 07', Date_Calc::DaysToDate(1720821, "%Y %m %d"), '1720821');
-compare(1720821, Date_Calc::DateToDays(7, 5, -1), '-0001 05 07');
-compare('-0001 05 08', Date_Calc::DaysToDate(1720822, "%Y %m %d"), '1720822');
-compare(1720822, Date_Calc::DateToDays(8, 5, -1), '-0001 05 08');
-compare('-0001 05 09', Date_Calc::DaysToDate(1720823, "%Y %m %d"), '1720823');
-compare(1720823, Date_Calc::DateToDays(9, 5, -1), '-0001 05 09');
-compare('-0001 05 10', Date_Calc::DaysToDate(1720824, "%Y %m %d"), '1720824');
-compare(1720824, Date_Calc::DateToDays(10, 5, -1), '-0001 05 10');
-compare('-0001 05 11', Date_Calc::DaysToDate(1720825, "%Y %m %d"), '1720825');
-compare(1720825, Date_Calc::DateToDays(11, 5, -1), '-0001 05 11');
-compare('-0001 05 12', Date_Calc::DaysToDate(1720826, "%Y %m %d"), '1720826');
-compare(1720826, Date_Calc::DateToDays(12, 5, -1), '-0001 05 12');
-compare('-0001 05 13', Date_Calc::DaysToDate(1720827, "%Y %m %d"), '1720827');
-compare(1720827, Date_Calc::DateToDays(13, 5, -1), '-0001 05 13');
-compare('-0001 05 14', Date_Calc::DaysToDate(1720828, "%Y %m %d"), '1720828');
-compare(1720828, Date_Calc::DateToDays(14, 5, -1), '-0001 05 14');
-compare('-0001 05 15', Date_Calc::DaysToDate(1720829, "%Y %m %d"), '1720829');
-compare(1720829, Date_Calc::DateToDays(15, 5, -1), '-0001 05 15');
-compare('-0001 05 16', Date_Calc::DaysToDate(1720830, "%Y %m %d"), '1720830');
-compare(1720830, Date_Calc::DateToDays(16, 5, -1), '-0001 05 16');
-compare('-0001 05 17', Date_Calc::DaysToDate(1720831, "%Y %m %d"), '1720831');
-compare(1720831, Date_Calc::DateToDays(17, 5, -1), '-0001 05 17');
-compare('-0001 05 18', Date_Calc::DaysToDate(1720832, "%Y %m %d"), '1720832');
-compare(1720832, Date_Calc::DateToDays(18, 5, -1), '-0001 05 18');
-compare('-0001 05 19', Date_Calc::DaysToDate(1720833, "%Y %m %d"), '1720833');
-compare(1720833, Date_Calc::DateToDays(19, 5, -1), '-0001 05 19');
-compare('-0001 05 20', Date_Calc::DaysToDate(1720834, "%Y %m %d"), '1720834');
-compare(1720834, Date_Calc::DateToDays(20, 5, -1), '-0001 05 20');
-compare('-0001 05 21', Date_Calc::DaysToDate(1720835, "%Y %m %d"), '1720835');
-compare(1720835, Date_Calc::DateToDays(21, 5, -1), '-0001 05 21');
-compare('-0001 05 22', Date_Calc::DaysToDate(1720836, "%Y %m %d"), '1720836');
-compare(1720836, Date_Calc::DateToDays(22, 5, -1), '-0001 05 22');
-compare('-0001 05 23', Date_Calc::DaysToDate(1720837, "%Y %m %d"), '1720837');
-compare(1720837, Date_Calc::DateToDays(23, 5, -1), '-0001 05 23');
-compare('-0001 05 24', Date_Calc::DaysToDate(1720838, "%Y %m %d"), '1720838');
-compare(1720838, Date_Calc::DateToDays(24, 5, -1), '-0001 05 24');
-compare('-0001 05 25', Date_Calc::DaysToDate(1720839, "%Y %m %d"), '1720839');
-compare(1720839, Date_Calc::DateToDays(25, 5, -1), '-0001 05 25');
-compare('-0001 05 26', Date_Calc::DaysToDate(1720840, "%Y %m %d"), '1720840');
-compare(1720840, Date_Calc::DateToDays(26, 5, -1), '-0001 05 26');
-compare('-0001 05 27', Date_Calc::DaysToDate(1720841, "%Y %m %d"), '1720841');
-compare(1720841, Date_Calc::DateToDays(27, 5, -1), '-0001 05 27');
-compare('-0001 05 28', Date_Calc::DaysToDate(1720842, "%Y %m %d"), '1720842');
-compare(1720842, Date_Calc::DateToDays(28, 5, -1), '-0001 05 28');
-compare('-0001 05 29', Date_Calc::DaysToDate(1720843, "%Y %m %d"), '1720843');
-compare(1720843, Date_Calc::DateToDays(29, 5, -1), '-0001 05 29');
-compare('-0001 05 30', Date_Calc::DaysToDate(1720844, "%Y %m %d"), '1720844');
-compare(1720844, Date_Calc::DateToDays(30, 5, -1), '-0001 05 30');
-compare('-0001 05 31', Date_Calc::DaysToDate(1720845, "%Y %m %d"), '1720845');
-compare(1720845, Date_Calc::DateToDays(31, 5, -1), '-0001 05 31');
-compare('-0001 06 01', Date_Calc::DaysToDate(1720846, "%Y %m %d"), '1720846');
-compare(1720846, Date_Calc::DateToDays(1, 6, -1), '-0001 06 01');
-compare('-0001 06 02', Date_Calc::DaysToDate(1720847, "%Y %m %d"), '1720847');
-compare(1720847, Date_Calc::DateToDays(2, 6, -1), '-0001 06 02');
-compare('-0001 06 03', Date_Calc::DaysToDate(1720848, "%Y %m %d"), '1720848');
-compare(1720848, Date_Calc::DateToDays(3, 6, -1), '-0001 06 03');
-compare('-0001 06 04', Date_Calc::DaysToDate(1720849, "%Y %m %d"), '1720849');
-compare(1720849, Date_Calc::DateToDays(4, 6, -1), '-0001 06 04');
-compare('-0001 06 05', Date_Calc::DaysToDate(1720850, "%Y %m %d"), '1720850');
-compare(1720850, Date_Calc::DateToDays(5, 6, -1), '-0001 06 05');
-compare('-0001 06 06', Date_Calc::DaysToDate(1720851, "%Y %m %d"), '1720851');
-compare(1720851, Date_Calc::DateToDays(6, 6, -1), '-0001 06 06');
-compare('-0001 06 07', Date_Calc::DaysToDate(1720852, "%Y %m %d"), '1720852');
-compare(1720852, Date_Calc::DateToDays(7, 6, -1), '-0001 06 07');
-compare('-0001 06 08', Date_Calc::DaysToDate(1720853, "%Y %m %d"), '1720853');
-compare(1720853, Date_Calc::DateToDays(8, 6, -1), '-0001 06 08');
-compare('-0001 06 09', Date_Calc::DaysToDate(1720854, "%Y %m %d"), '1720854');
-compare(1720854, Date_Calc::DateToDays(9, 6, -1), '-0001 06 09');
-compare('-0001 06 10', Date_Calc::DaysToDate(1720855, "%Y %m %d"), '1720855');
-compare(1720855, Date_Calc::DateToDays(10, 6, -1), '-0001 06 10');
-compare('-0001 06 11', Date_Calc::DaysToDate(1720856, "%Y %m %d"), '1720856');
-compare(1720856, Date_Calc::DateToDays(11, 6, -1), '-0001 06 11');
-compare('-0001 06 12', Date_Calc::DaysToDate(1720857, "%Y %m %d"), '1720857');
-compare(1720857, Date_Calc::DateToDays(12, 6, -1), '-0001 06 12');
-compare('-0001 06 13', Date_Calc::DaysToDate(1720858, "%Y %m %d"), '1720858');
-compare(1720858, Date_Calc::DateToDays(13, 6, -1), '-0001 06 13');
-compare('-0001 06 14', Date_Calc::DaysToDate(1720859, "%Y %m %d"), '1720859');
-compare(1720859, Date_Calc::DateToDays(14, 6, -1), '-0001 06 14');
-compare('-0001 06 15', Date_Calc::DaysToDate(1720860, "%Y %m %d"), '1720860');
-compare(1720860, Date_Calc::DateToDays(15, 6, -1), '-0001 06 15');
-compare('-0001 06 16', Date_Calc::DaysToDate(1720861, "%Y %m %d"), '1720861');
-compare(1720861, Date_Calc::DateToDays(16, 6, -1), '-0001 06 16');
-compare('-0001 06 17', Date_Calc::DaysToDate(1720862, "%Y %m %d"), '1720862');
-compare(1720862, Date_Calc::DateToDays(17, 6, -1), '-0001 06 17');
-compare('-0001 06 18', Date_Calc::DaysToDate(1720863, "%Y %m %d"), '1720863');
-compare(1720863, Date_Calc::DateToDays(18, 6, -1), '-0001 06 18');
-compare('-0001 06 19', Date_Calc::DaysToDate(1720864, "%Y %m %d"), '1720864');
-compare(1720864, Date_Calc::DateToDays(19, 6, -1), '-0001 06 19');
-compare('-0001 06 20', Date_Calc::DaysToDate(1720865, "%Y %m %d"), '1720865');
-compare(1720865, Date_Calc::DateToDays(20, 6, -1), '-0001 06 20');
-compare('-0001 06 21', Date_Calc::DaysToDate(1720866, "%Y %m %d"), '1720866');
-compare(1720866, Date_Calc::DateToDays(21, 6, -1), '-0001 06 21');
-compare('-0001 06 22', Date_Calc::DaysToDate(1720867, "%Y %m %d"), '1720867');
-compare(1720867, Date_Calc::DateToDays(22, 6, -1), '-0001 06 22');
-compare('-0001 06 23', Date_Calc::DaysToDate(1720868, "%Y %m %d"), '1720868');
-compare(1720868, Date_Calc::DateToDays(23, 6, -1), '-0001 06 23');
-compare('-0001 06 24', Date_Calc::DaysToDate(1720869, "%Y %m %d"), '1720869');
-compare(1720869, Date_Calc::DateToDays(24, 6, -1), '-0001 06 24');
-compare('-0001 06 25', Date_Calc::DaysToDate(1720870, "%Y %m %d"), '1720870');
-compare(1720870, Date_Calc::DateToDays(25, 6, -1), '-0001 06 25');
-compare('-0001 06 26', Date_Calc::DaysToDate(1720871, "%Y %m %d"), '1720871');
-compare(1720871, Date_Calc::DateToDays(26, 6, -1), '-0001 06 26');
-compare('-0001 06 27', Date_Calc::DaysToDate(1720872, "%Y %m %d"), '1720872');
-compare(1720872, Date_Calc::DateToDays(27, 6, -1), '-0001 06 27');
-compare('-0001 06 28', Date_Calc::DaysToDate(1720873, "%Y %m %d"), '1720873');
-compare(1720873, Date_Calc::DateToDays(28, 6, -1), '-0001 06 28');
-compare('-0001 06 29', Date_Calc::DaysToDate(1720874, "%Y %m %d"), '1720874');
-compare(1720874, Date_Calc::DateToDays(29, 6, -1), '-0001 06 29');
-compare('-0001 06 30', Date_Calc::DaysToDate(1720875, "%Y %m %d"), '1720875');
-compare(1720875, Date_Calc::DateToDays(30, 6, -1), '-0001 06 30');
-compare('-0001 07 01', Date_Calc::DaysToDate(1720876, "%Y %m %d"), '1720876');
-compare(1720876, Date_Calc::DateToDays(1, 7, -1), '-0001 07 01');
-compare('-0001 07 02', Date_Calc::DaysToDate(1720877, "%Y %m %d"), '1720877');
-compare(1720877, Date_Calc::DateToDays(2, 7, -1), '-0001 07 02');
-compare('-0001 07 03', Date_Calc::DaysToDate(1720878, "%Y %m %d"), '1720878');
-compare(1720878, Date_Calc::DateToDays(3, 7, -1), '-0001 07 03');
-compare('-0001 07 04', Date_Calc::DaysToDate(1720879, "%Y %m %d"), '1720879');
-compare(1720879, Date_Calc::DateToDays(4, 7, -1), '-0001 07 04');
-compare('-0001 07 05', Date_Calc::DaysToDate(1720880, "%Y %m %d"), '1720880');
-compare(1720880, Date_Calc::DateToDays(5, 7, -1), '-0001 07 05');
-compare('-0001 07 06', Date_Calc::DaysToDate(1720881, "%Y %m %d"), '1720881');
-compare(1720881, Date_Calc::DateToDays(6, 7, -1), '-0001 07 06');
-compare('-0001 07 07', Date_Calc::DaysToDate(1720882, "%Y %m %d"), '1720882');
-compare(1720882, Date_Calc::DateToDays(7, 7, -1), '-0001 07 07');
-compare('-0001 07 08', Date_Calc::DaysToDate(1720883, "%Y %m %d"), '1720883');
-compare(1720883, Date_Calc::DateToDays(8, 7, -1), '-0001 07 08');
-compare('-0001 07 09', Date_Calc::DaysToDate(1720884, "%Y %m %d"), '1720884');
-compare(1720884, Date_Calc::DateToDays(9, 7, -1), '-0001 07 09');
-compare('-0001 07 10', Date_Calc::DaysToDate(1720885, "%Y %m %d"), '1720885');
-compare(1720885, Date_Calc::DateToDays(10, 7, -1), '-0001 07 10');
-compare('-0001 07 11', Date_Calc::DaysToDate(1720886, "%Y %m %d"), '1720886');
-compare(1720886, Date_Calc::DateToDays(11, 7, -1), '-0001 07 11');
-compare('-0001 07 12', Date_Calc::DaysToDate(1720887, "%Y %m %d"), '1720887');
-compare(1720887, Date_Calc::DateToDays(12, 7, -1), '-0001 07 12');
-compare('-0001 07 13', Date_Calc::DaysToDate(1720888, "%Y %m %d"), '1720888');
-compare(1720888, Date_Calc::DateToDays(13, 7, -1), '-0001 07 13');
-compare('-0001 07 14', Date_Calc::DaysToDate(1720889, "%Y %m %d"), '1720889');
-compare(1720889, Date_Calc::DateToDays(14, 7, -1), '-0001 07 14');
-compare('-0001 07 15', Date_Calc::DaysToDate(1720890, "%Y %m %d"), '1720890');
-compare(1720890, Date_Calc::DateToDays(15, 7, -1), '-0001 07 15');
-compare('-0001 07 16', Date_Calc::DaysToDate(1720891, "%Y %m %d"), '1720891');
-compare(1720891, Date_Calc::DateToDays(16, 7, -1), '-0001 07 16');
-compare('-0001 07 17', Date_Calc::DaysToDate(1720892, "%Y %m %d"), '1720892');
-compare(1720892, Date_Calc::DateToDays(17, 7, -1), '-0001 07 17');
-compare('-0001 07 18', Date_Calc::DaysToDate(1720893, "%Y %m %d"), '1720893');
-compare(1720893, Date_Calc::DateToDays(18, 7, -1), '-0001 07 18');
-compare('-0001 07 19', Date_Calc::DaysToDate(1720894, "%Y %m %d"), '1720894');
-compare(1720894, Date_Calc::DateToDays(19, 7, -1), '-0001 07 19');
-compare('-0001 07 20', Date_Calc::DaysToDate(1720895, "%Y %m %d"), '1720895');
-compare(1720895, Date_Calc::DateToDays(20, 7, -1), '-0001 07 20');
-compare('-0001 07 21', Date_Calc::DaysToDate(1720896, "%Y %m %d"), '1720896');
-compare(1720896, Date_Calc::DateToDays(21, 7, -1), '-0001 07 21');
-compare('-0001 07 22', Date_Calc::DaysToDate(1720897, "%Y %m %d"), '1720897');
-compare(1720897, Date_Calc::DateToDays(22, 7, -1), '-0001 07 22');
-compare('-0001 07 23', Date_Calc::DaysToDate(1720898, "%Y %m %d"), '1720898');
-compare(1720898, Date_Calc::DateToDays(23, 7, -1), '-0001 07 23');
-compare('-0001 07 24', Date_Calc::DaysToDate(1720899, "%Y %m %d"), '1720899');
-compare(1720899, Date_Calc::DateToDays(24, 7, -1), '-0001 07 24');
-compare('-0001 07 25', Date_Calc::DaysToDate(1720900, "%Y %m %d"), '1720900');
-compare(1720900, Date_Calc::DateToDays(25, 7, -1), '-0001 07 25');
-compare('-0001 07 26', Date_Calc::DaysToDate(1720901, "%Y %m %d"), '1720901');
-compare(1720901, Date_Calc::DateToDays(26, 7, -1), '-0001 07 26');
-compare('-0001 07 27', Date_Calc::DaysToDate(1720902, "%Y %m %d"), '1720902');
-compare(1720902, Date_Calc::DateToDays(27, 7, -1), '-0001 07 27');
-compare('-0001 07 28', Date_Calc::DaysToDate(1720903, "%Y %m %d"), '1720903');
-compare(1720903, Date_Calc::DateToDays(28, 7, -1), '-0001 07 28');
-compare('-0001 07 29', Date_Calc::DaysToDate(1720904, "%Y %m %d"), '1720904');
-compare(1720904, Date_Calc::DateToDays(29, 7, -1), '-0001 07 29');
-compare('-0001 07 30', Date_Calc::DaysToDate(1720905, "%Y %m %d"), '1720905');
-compare(1720905, Date_Calc::DateToDays(30, 7, -1), '-0001 07 30');
-compare('-0001 07 31', Date_Calc::DaysToDate(1720906, "%Y %m %d"), '1720906');
-compare(1720906, Date_Calc::DateToDays(31, 7, -1), '-0001 07 31');
-compare('-0001 08 01', Date_Calc::DaysToDate(1720907, "%Y %m %d"), '1720907');
-compare(1720907, Date_Calc::DateToDays(1, 8, -1), '-0001 08 01');
-compare('-0001 08 02', Date_Calc::DaysToDate(1720908, "%Y %m %d"), '1720908');
-compare(1720908, Date_Calc::DateToDays(2, 8, -1), '-0001 08 02');
-compare('-0001 08 03', Date_Calc::DaysToDate(1720909, "%Y %m %d"), '1720909');
-compare(1720909, Date_Calc::DateToDays(3, 8, -1), '-0001 08 03');
-compare('-0001 08 04', Date_Calc::DaysToDate(1720910, "%Y %m %d"), '1720910');
-compare(1720910, Date_Calc::DateToDays(4, 8, -1), '-0001 08 04');
-compare('-0001 08 05', Date_Calc::DaysToDate(1720911, "%Y %m %d"), '1720911');
-compare(1720911, Date_Calc::DateToDays(5, 8, -1), '-0001 08 05');
-compare('-0001 08 06', Date_Calc::DaysToDate(1720912, "%Y %m %d"), '1720912');
-compare(1720912, Date_Calc::DateToDays(6, 8, -1), '-0001 08 06');
-compare('-0001 08 07', Date_Calc::DaysToDate(1720913, "%Y %m %d"), '1720913');
-compare(1720913, Date_Calc::DateToDays(7, 8, -1), '-0001 08 07');
-compare('-0001 08 08', Date_Calc::DaysToDate(1720914, "%Y %m %d"), '1720914');
-compare(1720914, Date_Calc::DateToDays(8, 8, -1), '-0001 08 08');
-compare('-0001 08 09', Date_Calc::DaysToDate(1720915, "%Y %m %d"), '1720915');
-compare(1720915, Date_Calc::DateToDays(9, 8, -1), '-0001 08 09');
-compare('-0001 08 10', Date_Calc::DaysToDate(1720916, "%Y %m %d"), '1720916');
-compare(1720916, Date_Calc::DateToDays(10, 8, -1), '-0001 08 10');
-compare('-0001 08 11', Date_Calc::DaysToDate(1720917, "%Y %m %d"), '1720917');
-compare(1720917, Date_Calc::DateToDays(11, 8, -1), '-0001 08 11');
-compare('-0001 08 12', Date_Calc::DaysToDate(1720918, "%Y %m %d"), '1720918');
-compare(1720918, Date_Calc::DateToDays(12, 8, -1), '-0001 08 12');
-compare('-0001 08 13', Date_Calc::DaysToDate(1720919, "%Y %m %d"), '1720919');
-compare(1720919, Date_Calc::DateToDays(13, 8, -1), '-0001 08 13');
-compare('-0001 08 14', Date_Calc::DaysToDate(1720920, "%Y %m %d"), '1720920');
-compare(1720920, Date_Calc::DateToDays(14, 8, -1), '-0001 08 14');
-compare('-0001 08 15', Date_Calc::DaysToDate(1720921, "%Y %m %d"), '1720921');
-compare(1720921, Date_Calc::DateToDays(15, 8, -1), '-0001 08 15');
-compare('-0001 08 16', Date_Calc::DaysToDate(1720922, "%Y %m %d"), '1720922');
-compare(1720922, Date_Calc::DateToDays(16, 8, -1), '-0001 08 16');
-compare('-0001 08 17', Date_Calc::DaysToDate(1720923, "%Y %m %d"), '1720923');
-compare(1720923, Date_Calc::DateToDays(17, 8, -1), '-0001 08 17');
-compare('-0001 08 18', Date_Calc::DaysToDate(1720924, "%Y %m %d"), '1720924');
-compare(1720924, Date_Calc::DateToDays(18, 8, -1), '-0001 08 18');
-compare('-0001 08 19', Date_Calc::DaysToDate(1720925, "%Y %m %d"), '1720925');
-compare(1720925, Date_Calc::DateToDays(19, 8, -1), '-0001 08 19');
-compare('-0001 08 20', Date_Calc::DaysToDate(1720926, "%Y %m %d"), '1720926');
-compare(1720926, Date_Calc::DateToDays(20, 8, -1), '-0001 08 20');
-compare('-0001 08 21', Date_Calc::DaysToDate(1720927, "%Y %m %d"), '1720927');
-compare(1720927, Date_Calc::DateToDays(21, 8, -1), '-0001 08 21');
-compare('-0001 08 22', Date_Calc::DaysToDate(1720928, "%Y %m %d"), '1720928');
-compare(1720928, Date_Calc::DateToDays(22, 8, -1), '-0001 08 22');
-compare('-0001 08 23', Date_Calc::DaysToDate(1720929, "%Y %m %d"), '1720929');
-compare(1720929, Date_Calc::DateToDays(23, 8, -1), '-0001 08 23');
-compare('-0001 08 24', Date_Calc::DaysToDate(1720930, "%Y %m %d"), '1720930');
-compare(1720930, Date_Calc::DateToDays(24, 8, -1), '-0001 08 24');
-compare('-0001 08 25', Date_Calc::DaysToDate(1720931, "%Y %m %d"), '1720931');
-compare(1720931, Date_Calc::DateToDays(25, 8, -1), '-0001 08 25');
-compare('-0001 08 26', Date_Calc::DaysToDate(1720932, "%Y %m %d"), '1720932');
-compare(1720932, Date_Calc::DateToDays(26, 8, -1), '-0001 08 26');
-compare('-0001 08 27', Date_Calc::DaysToDate(1720933, "%Y %m %d"), '1720933');
-compare(1720933, Date_Calc::DateToDays(27, 8, -1), '-0001 08 27');
-compare('-0001 08 28', Date_Calc::DaysToDate(1720934, "%Y %m %d"), '1720934');
-compare(1720934, Date_Calc::DateToDays(28, 8, -1), '-0001 08 28');
-compare('-0001 08 29', Date_Calc::DaysToDate(1720935, "%Y %m %d"), '1720935');
-compare(1720935, Date_Calc::DateToDays(29, 8, -1), '-0001 08 29');
-compare('-0001 08 30', Date_Calc::DaysToDate(1720936, "%Y %m %d"), '1720936');
-compare(1720936, Date_Calc::DateToDays(30, 8, -1), '-0001 08 30');
-compare('-0001 08 31', Date_Calc::DaysToDate(1720937, "%Y %m %d"), '1720937');
-compare(1720937, Date_Calc::DateToDays(31, 8, -1), '-0001 08 31');
-compare('-0001 09 01', Date_Calc::DaysToDate(1720938, "%Y %m %d"), '1720938');
-compare(1720938, Date_Calc::DateToDays(1, 9, -1), '-0001 09 01');
-compare('-0001 09 02', Date_Calc::DaysToDate(1720939, "%Y %m %d"), '1720939');
-compare(1720939, Date_Calc::DateToDays(2, 9, -1), '-0001 09 02');
-compare('-0001 09 03', Date_Calc::DaysToDate(1720940, "%Y %m %d"), '1720940');
-compare(1720940, Date_Calc::DateToDays(3, 9, -1), '-0001 09 03');
-compare('-0001 09 04', Date_Calc::DaysToDate(1720941, "%Y %m %d"), '1720941');
-compare(1720941, Date_Calc::DateToDays(4, 9, -1), '-0001 09 04');
-compare('-0001 09 05', Date_Calc::DaysToDate(1720942, "%Y %m %d"), '1720942');
-compare(1720942, Date_Calc::DateToDays(5, 9, -1), '-0001 09 05');
-compare('-0001 09 06', Date_Calc::DaysToDate(1720943, "%Y %m %d"), '1720943');
-compare(1720943, Date_Calc::DateToDays(6, 9, -1), '-0001 09 06');
-compare('-0001 09 07', Date_Calc::DaysToDate(1720944, "%Y %m %d"), '1720944');
-compare(1720944, Date_Calc::DateToDays(7, 9, -1), '-0001 09 07');
-compare('-0001 09 08', Date_Calc::DaysToDate(1720945, "%Y %m %d"), '1720945');
-compare(1720945, Date_Calc::DateToDays(8, 9, -1), '-0001 09 08');
-compare('-0001 09 09', Date_Calc::DaysToDate(1720946, "%Y %m %d"), '1720946');
-compare(1720946, Date_Calc::DateToDays(9, 9, -1), '-0001 09 09');
-compare('-0001 09 10', Date_Calc::DaysToDate(1720947, "%Y %m %d"), '1720947');
-compare(1720947, Date_Calc::DateToDays(10, 9, -1), '-0001 09 10');
-compare('-0001 09 11', Date_Calc::DaysToDate(1720948, "%Y %m %d"), '1720948');
-compare(1720948, Date_Calc::DateToDays(11, 9, -1), '-0001 09 11');
-compare('-0001 09 12', Date_Calc::DaysToDate(1720949, "%Y %m %d"), '1720949');
-compare(1720949, Date_Calc::DateToDays(12, 9, -1), '-0001 09 12');
-compare('-0001 09 13', Date_Calc::DaysToDate(1720950, "%Y %m %d"), '1720950');
-compare(1720950, Date_Calc::DateToDays(13, 9, -1), '-0001 09 13');
-compare('-0001 09 14', Date_Calc::DaysToDate(1720951, "%Y %m %d"), '1720951');
-compare(1720951, Date_Calc::DateToDays(14, 9, -1), '-0001 09 14');
-compare('-0001 09 15', Date_Calc::DaysToDate(1720952, "%Y %m %d"), '1720952');
-compare(1720952, Date_Calc::DateToDays(15, 9, -1), '-0001 09 15');
-compare('-0001 09 16', Date_Calc::DaysToDate(1720953, "%Y %m %d"), '1720953');
-compare(1720953, Date_Calc::DateToDays(16, 9, -1), '-0001 09 16');
-compare('-0001 09 17', Date_Calc::DaysToDate(1720954, "%Y %m %d"), '1720954');
-compare(1720954, Date_Calc::DateToDays(17, 9, -1), '-0001 09 17');
-compare('-0001 09 18', Date_Calc::DaysToDate(1720955, "%Y %m %d"), '1720955');
-compare(1720955, Date_Calc::DateToDays(18, 9, -1), '-0001 09 18');
-compare('-0001 09 19', Date_Calc::DaysToDate(1720956, "%Y %m %d"), '1720956');
-compare(1720956, Date_Calc::DateToDays(19, 9, -1), '-0001 09 19');
-compare('-0001 09 20', Date_Calc::DaysToDate(1720957, "%Y %m %d"), '1720957');
-compare(1720957, Date_Calc::DateToDays(20, 9, -1), '-0001 09 20');
-compare('-0001 09 21', Date_Calc::DaysToDate(1720958, "%Y %m %d"), '1720958');
-compare(1720958, Date_Calc::DateToDays(21, 9, -1), '-0001 09 21');
-compare('-0001 09 22', Date_Calc::DaysToDate(1720959, "%Y %m %d"), '1720959');
-compare(1720959, Date_Calc::DateToDays(22, 9, -1), '-0001 09 22');
-compare('-0001 09 23', Date_Calc::DaysToDate(1720960, "%Y %m %d"), '1720960');
-compare(1720960, Date_Calc::DateToDays(23, 9, -1), '-0001 09 23');
-compare('-0001 09 24', Date_Calc::DaysToDate(1720961, "%Y %m %d"), '1720961');
-compare(1720961, Date_Calc::DateToDays(24, 9, -1), '-0001 09 24');
-compare('-0001 09 25', Date_Calc::DaysToDate(1720962, "%Y %m %d"), '1720962');
-compare(1720962, Date_Calc::DateToDays(25, 9, -1), '-0001 09 25');
-compare('-0001 09 26', Date_Calc::DaysToDate(1720963, "%Y %m %d"), '1720963');
-compare(1720963, Date_Calc::DateToDays(26, 9, -1), '-0001 09 26');
-compare('-0001 09 27', Date_Calc::DaysToDate(1720964, "%Y %m %d"), '1720964');
-compare(1720964, Date_Calc::DateToDays(27, 9, -1), '-0001 09 27');
-compare('-0001 09 28', Date_Calc::DaysToDate(1720965, "%Y %m %d"), '1720965');
-compare(1720965, Date_Calc::DateToDays(28, 9, -1), '-0001 09 28');
-compare('-0001 09 29', Date_Calc::DaysToDate(1720966, "%Y %m %d"), '1720966');
-compare(1720966, Date_Calc::DateToDays(29, 9, -1), '-0001 09 29');
-compare('-0001 09 30', Date_Calc::DaysToDate(1720967, "%Y %m %d"), '1720967');
-compare(1720967, Date_Calc::DateToDays(30, 9, -1), '-0001 09 30');
-compare('-0001 10 01', Date_Calc::DaysToDate(1720968, "%Y %m %d"), '1720968');
-compare(1720968, Date_Calc::DateToDays(1, 10, -1), '-0001 10 01');
-compare('-0001 10 02', Date_Calc::DaysToDate(1720969, "%Y %m %d"), '1720969');
-compare(1720969, Date_Calc::DateToDays(2, 10, -1), '-0001 10 02');
-compare('-0001 10 03', Date_Calc::DaysToDate(1720970, "%Y %m %d"), '1720970');
-compare(1720970, Date_Calc::DateToDays(3, 10, -1), '-0001 10 03');
-compare('-0001 10 04', Date_Calc::DaysToDate(1720971, "%Y %m %d"), '1720971');
-compare(1720971, Date_Calc::DateToDays(4, 10, -1), '-0001 10 04');
-compare('-0001 10 05', Date_Calc::DaysToDate(1720972, "%Y %m %d"), '1720972');
-compare(1720972, Date_Calc::DateToDays(5, 10, -1), '-0001 10 05');
-compare('-0001 10 06', Date_Calc::DaysToDate(1720973, "%Y %m %d"), '1720973');
-compare(1720973, Date_Calc::DateToDays(6, 10, -1), '-0001 10 06');
-compare('-0001 10 07', Date_Calc::DaysToDate(1720974, "%Y %m %d"), '1720974');
-compare(1720974, Date_Calc::DateToDays(7, 10, -1), '-0001 10 07');
-compare('-0001 10 08', Date_Calc::DaysToDate(1720975, "%Y %m %d"), '1720975');
-compare(1720975, Date_Calc::DateToDays(8, 10, -1), '-0001 10 08');
-compare('-0001 10 09', Date_Calc::DaysToDate(1720976, "%Y %m %d"), '1720976');
-compare(1720976, Date_Calc::DateToDays(9, 10, -1), '-0001 10 09');
-compare('-0001 10 10', Date_Calc::DaysToDate(1720977, "%Y %m %d"), '1720977');
-compare(1720977, Date_Calc::DateToDays(10, 10, -1), '-0001 10 10');
-compare('-0001 10 11', Date_Calc::DaysToDate(1720978, "%Y %m %d"), '1720978');
-compare(1720978, Date_Calc::DateToDays(11, 10, -1), '-0001 10 11');
-compare('-0001 10 12', Date_Calc::DaysToDate(1720979, "%Y %m %d"), '1720979');
-compare(1720979, Date_Calc::DateToDays(12, 10, -1), '-0001 10 12');
-compare('-0001 10 13', Date_Calc::DaysToDate(1720980, "%Y %m %d"), '1720980');
-compare(1720980, Date_Calc::DateToDays(13, 10, -1), '-0001 10 13');
-compare('-0001 10 14', Date_Calc::DaysToDate(1720981, "%Y %m %d"), '1720981');
-compare(1720981, Date_Calc::DateToDays(14, 10, -1), '-0001 10 14');
-compare('-0001 10 15', Date_Calc::DaysToDate(1720982, "%Y %m %d"), '1720982');
-compare(1720982, Date_Calc::DateToDays(15, 10, -1), '-0001 10 15');
-compare('-0001 10 16', Date_Calc::DaysToDate(1720983, "%Y %m %d"), '1720983');
-compare(1720983, Date_Calc::DateToDays(16, 10, -1), '-0001 10 16');
-compare('-0001 10 17', Date_Calc::DaysToDate(1720984, "%Y %m %d"), '1720984');
-compare(1720984, Date_Calc::DateToDays(17, 10, -1), '-0001 10 17');
-compare('-0001 10 18', Date_Calc::DaysToDate(1720985, "%Y %m %d"), '1720985');
-compare(1720985, Date_Calc::DateToDays(18, 10, -1), '-0001 10 18');
-compare('-0001 10 19', Date_Calc::DaysToDate(1720986, "%Y %m %d"), '1720986');
-compare(1720986, Date_Calc::DateToDays(19, 10, -1), '-0001 10 19');
-compare('-0001 10 20', Date_Calc::DaysToDate(1720987, "%Y %m %d"), '1720987');
-compare(1720987, Date_Calc::DateToDays(20, 10, -1), '-0001 10 20');
-compare('-0001 10 21', Date_Calc::DaysToDate(1720988, "%Y %m %d"), '1720988');
-compare(1720988, Date_Calc::DateToDays(21, 10, -1), '-0001 10 21');
-compare('-0001 10 22', Date_Calc::DaysToDate(1720989, "%Y %m %d"), '1720989');
-compare(1720989, Date_Calc::DateToDays(22, 10, -1), '-0001 10 22');
-compare('-0001 10 23', Date_Calc::DaysToDate(1720990, "%Y %m %d"), '1720990');
-compare(1720990, Date_Calc::DateToDays(23, 10, -1), '-0001 10 23');
-compare('-0001 10 24', Date_Calc::DaysToDate(1720991, "%Y %m %d"), '1720991');
-compare(1720991, Date_Calc::DateToDays(24, 10, -1), '-0001 10 24');
-compare('-0001 10 25', Date_Calc::DaysToDate(1720992, "%Y %m %d"), '1720992');
-compare(1720992, Date_Calc::DateToDays(25, 10, -1), '-0001 10 25');
-compare('-0001 10 26', Date_Calc::DaysToDate(1720993, "%Y %m %d"), '1720993');
-compare(1720993, Date_Calc::DateToDays(26, 10, -1), '-0001 10 26');
-compare('-0001 10 27', Date_Calc::DaysToDate(1720994, "%Y %m %d"), '1720994');
-compare(1720994, Date_Calc::DateToDays(27, 10, -1), '-0001 10 27');
-compare('-0001 10 28', Date_Calc::DaysToDate(1720995, "%Y %m %d"), '1720995');
-compare(1720995, Date_Calc::DateToDays(28, 10, -1), '-0001 10 28');
-compare('-0001 10 29', Date_Calc::DaysToDate(1720996, "%Y %m %d"), '1720996');
-compare(1720996, Date_Calc::DateToDays(29, 10, -1), '-0001 10 29');
-compare('-0001 10 30', Date_Calc::DaysToDate(1720997, "%Y %m %d"), '1720997');
-compare(1720997, Date_Calc::DateToDays(30, 10, -1), '-0001 10 30');
-compare('-0001 10 31', Date_Calc::DaysToDate(1720998, "%Y %m %d"), '1720998');
-compare(1720998, Date_Calc::DateToDays(31, 10, -1), '-0001 10 31');
-compare('-0001 11 01', Date_Calc::DaysToDate(1720999, "%Y %m %d"), '1720999');
-compare(1720999, Date_Calc::DateToDays(1, 11, -1), '-0001 11 01');
-compare('-0001 11 02', Date_Calc::DaysToDate(1721000, "%Y %m %d"), '1721000');
-compare(1721000, Date_Calc::DateToDays(2, 11, -1), '-0001 11 02');
-compare('-0001 11 03', Date_Calc::DaysToDate(1721001, "%Y %m %d"), '1721001');
-compare(1721001, Date_Calc::DateToDays(3, 11, -1), '-0001 11 03');
-compare('-0001 11 04', Date_Calc::DaysToDate(1721002, "%Y %m %d"), '1721002');
-compare(1721002, Date_Calc::DateToDays(4, 11, -1), '-0001 11 04');
-compare('-0001 11 05', Date_Calc::DaysToDate(1721003, "%Y %m %d"), '1721003');
-compare(1721003, Date_Calc::DateToDays(5, 11, -1), '-0001 11 05');
-compare('-0001 11 06', Date_Calc::DaysToDate(1721004, "%Y %m %d"), '1721004');
-compare(1721004, Date_Calc::DateToDays(6, 11, -1), '-0001 11 06');
-compare('-0001 11 07', Date_Calc::DaysToDate(1721005, "%Y %m %d"), '1721005');
-compare(1721005, Date_Calc::DateToDays(7, 11, -1), '-0001 11 07');
-compare('-0001 11 08', Date_Calc::DaysToDate(1721006, "%Y %m %d"), '1721006');
-compare(1721006, Date_Calc::DateToDays(8, 11, -1), '-0001 11 08');
-compare('-0001 11 09', Date_Calc::DaysToDate(1721007, "%Y %m %d"), '1721007');
-compare(1721007, Date_Calc::DateToDays(9, 11, -1), '-0001 11 09');
-compare('-0001 11 10', Date_Calc::DaysToDate(1721008, "%Y %m %d"), '1721008');
-compare(1721008, Date_Calc::DateToDays(10, 11, -1), '-0001 11 10');
-compare('-0001 11 11', Date_Calc::DaysToDate(1721009, "%Y %m %d"), '1721009');
-compare(1721009, Date_Calc::DateToDays(11, 11, -1), '-0001 11 11');
-compare('-0001 11 12', Date_Calc::DaysToDate(1721010, "%Y %m %d"), '1721010');
-compare(1721010, Date_Calc::DateToDays(12, 11, -1), '-0001 11 12');
-compare('-0001 11 13', Date_Calc::DaysToDate(1721011, "%Y %m %d"), '1721011');
-compare(1721011, Date_Calc::DateToDays(13, 11, -1), '-0001 11 13');
-compare('-0001 11 14', Date_Calc::DaysToDate(1721012, "%Y %m %d"), '1721012');
-compare(1721012, Date_Calc::DateToDays(14, 11, -1), '-0001 11 14');
-compare('-0001 11 15', Date_Calc::DaysToDate(1721013, "%Y %m %d"), '1721013');
-compare(1721013, Date_Calc::DateToDays(15, 11, -1), '-0001 11 15');
-compare('-0001 11 16', Date_Calc::DaysToDate(1721014, "%Y %m %d"), '1721014');
-compare(1721014, Date_Calc::DateToDays(16, 11, -1), '-0001 11 16');
-compare('-0001 11 17', Date_Calc::DaysToDate(1721015, "%Y %m %d"), '1721015');
-compare(1721015, Date_Calc::DateToDays(17, 11, -1), '-0001 11 17');
-compare('-0001 11 18', Date_Calc::DaysToDate(1721016, "%Y %m %d"), '1721016');
-compare(1721016, Date_Calc::DateToDays(18, 11, -1), '-0001 11 18');
-compare('-0001 11 19', Date_Calc::DaysToDate(1721017, "%Y %m %d"), '1721017');
-compare(1721017, Date_Calc::DateToDays(19, 11, -1), '-0001 11 19');
-compare('-0001 11 20', Date_Calc::DaysToDate(1721018, "%Y %m %d"), '1721018');
-compare(1721018, Date_Calc::DateToDays(20, 11, -1), '-0001 11 20');
-compare('-0001 11 21', Date_Calc::DaysToDate(1721019, "%Y %m %d"), '1721019');
-compare(1721019, Date_Calc::DateToDays(21, 11, -1), '-0001 11 21');
-compare('-0001 11 22', Date_Calc::DaysToDate(1721020, "%Y %m %d"), '1721020');
-compare(1721020, Date_Calc::DateToDays(22, 11, -1), '-0001 11 22');
-compare('-0001 11 23', Date_Calc::DaysToDate(1721021, "%Y %m %d"), '1721021');
-compare(1721021, Date_Calc::DateToDays(23, 11, -1), '-0001 11 23');
-compare('-0001 11 24', Date_Calc::DaysToDate(1721022, "%Y %m %d"), '1721022');
-compare(1721022, Date_Calc::DateToDays(24, 11, -1), '-0001 11 24');
-compare('-0001 11 25', Date_Calc::DaysToDate(1721023, "%Y %m %d"), '1721023');
-compare(1721023, Date_Calc::DateToDays(25, 11, -1), '-0001 11 25');
-compare('-0001 11 26', Date_Calc::DaysToDate(1721024, "%Y %m %d"), '1721024');
-compare(1721024, Date_Calc::DateToDays(26, 11, -1), '-0001 11 26');
-compare('-0001 11 27', Date_Calc::DaysToDate(1721025, "%Y %m %d"), '1721025');
-compare(1721025, Date_Calc::DateToDays(27, 11, -1), '-0001 11 27');
-compare('-0001 11 28', Date_Calc::DaysToDate(1721026, "%Y %m %d"), '1721026');
-compare(1721026, Date_Calc::DateToDays(28, 11, -1), '-0001 11 28');
-compare('-0001 11 29', Date_Calc::DaysToDate(1721027, "%Y %m %d"), '1721027');
-compare(1721027, Date_Calc::DateToDays(29, 11, -1), '-0001 11 29');
-compare('-0001 11 30', Date_Calc::DaysToDate(1721028, "%Y %m %d"), '1721028');
-compare(1721028, Date_Calc::DateToDays(30, 11, -1), '-0001 11 30');
-compare('-0001 12 01', Date_Calc::DaysToDate(1721029, "%Y %m %d"), '1721029');
-compare(1721029, Date_Calc::DateToDays(1, 12, -1), '-0001 12 01');
-compare('-0001 12 02', Date_Calc::DaysToDate(1721030, "%Y %m %d"), '1721030');
-compare(1721030, Date_Calc::DateToDays(2, 12, -1), '-0001 12 02');
-compare('-0001 12 03', Date_Calc::DaysToDate(1721031, "%Y %m %d"), '1721031');
-compare(1721031, Date_Calc::DateToDays(3, 12, -1), '-0001 12 03');
-compare('-0001 12 04', Date_Calc::DaysToDate(1721032, "%Y %m %d"), '1721032');
-compare(1721032, Date_Calc::DateToDays(4, 12, -1), '-0001 12 04');
-compare('-0001 12 05', Date_Calc::DaysToDate(1721033, "%Y %m %d"), '1721033');
-compare(1721033, Date_Calc::DateToDays(5, 12, -1), '-0001 12 05');
-compare('-0001 12 06', Date_Calc::DaysToDate(1721034, "%Y %m %d"), '1721034');
-compare(1721034, Date_Calc::DateToDays(6, 12, -1), '-0001 12 06');
-compare('-0001 12 07', Date_Calc::DaysToDate(1721035, "%Y %m %d"), '1721035');
-compare(1721035, Date_Calc::DateToDays(7, 12, -1), '-0001 12 07');
-compare('-0001 12 08', Date_Calc::DaysToDate(1721036, "%Y %m %d"), '1721036');
-compare(1721036, Date_Calc::DateToDays(8, 12, -1), '-0001 12 08');
-compare('-0001 12 09', Date_Calc::DaysToDate(1721037, "%Y %m %d"), '1721037');
-compare(1721037, Date_Calc::DateToDays(9, 12, -1), '-0001 12 09');
-compare('-0001 12 10', Date_Calc::DaysToDate(1721038, "%Y %m %d"), '1721038');
-compare(1721038, Date_Calc::DateToDays(10, 12, -1), '-0001 12 10');
-compare('-0001 12 11', Date_Calc::DaysToDate(1721039, "%Y %m %d"), '1721039');
-compare(1721039, Date_Calc::DateToDays(11, 12, -1), '-0001 12 11');
-compare('-0001 12 12', Date_Calc::DaysToDate(1721040, "%Y %m %d"), '1721040');
-compare(1721040, Date_Calc::DateToDays(12, 12, -1), '-0001 12 12');
-compare('-0001 12 13', Date_Calc::DaysToDate(1721041, "%Y %m %d"), '1721041');
-compare(1721041, Date_Calc::DateToDays(13, 12, -1), '-0001 12 13');
-compare('-0001 12 14', Date_Calc::DaysToDate(1721042, "%Y %m %d"), '1721042');
-compare(1721042, Date_Calc::DateToDays(14, 12, -1), '-0001 12 14');
-compare('-0001 12 15', Date_Calc::DaysToDate(1721043, "%Y %m %d"), '1721043');
-compare(1721043, Date_Calc::DateToDays(15, 12, -1), '-0001 12 15');
-compare('-0001 12 16', Date_Calc::DaysToDate(1721044, "%Y %m %d"), '1721044');
-compare(1721044, Date_Calc::DateToDays(16, 12, -1), '-0001 12 16');
-compare('-0001 12 17', Date_Calc::DaysToDate(1721045, "%Y %m %d"), '1721045');
-compare(1721045, Date_Calc::DateToDays(17, 12, -1), '-0001 12 17');
-compare('-0001 12 18', Date_Calc::DaysToDate(1721046, "%Y %m %d"), '1721046');
-compare(1721046, Date_Calc::DateToDays(18, 12, -1), '-0001 12 18');
-compare('-0001 12 19', Date_Calc::DaysToDate(1721047, "%Y %m %d"), '1721047');
-compare(1721047, Date_Calc::DateToDays(19, 12, -1), '-0001 12 19');
-compare('-0001 12 20', Date_Calc::DaysToDate(1721048, "%Y %m %d"), '1721048');
-compare(1721048, Date_Calc::DateToDays(20, 12, -1), '-0001 12 20');
-compare('-0001 12 21', Date_Calc::DaysToDate(1721049, "%Y %m %d"), '1721049');
-compare(1721049, Date_Calc::DateToDays(21, 12, -1), '-0001 12 21');
-compare('-0001 12 22', Date_Calc::DaysToDate(1721050, "%Y %m %d"), '1721050');
-compare(1721050, Date_Calc::DateToDays(22, 12, -1), '-0001 12 22');
-compare('-0001 12 23', Date_Calc::DaysToDate(1721051, "%Y %m %d"), '1721051');
-compare(1721051, Date_Calc::DateToDays(23, 12, -1), '-0001 12 23');
-compare('-0001 12 24', Date_Calc::DaysToDate(1721052, "%Y %m %d"), '1721052');
-compare(1721052, Date_Calc::DateToDays(24, 12, -1), '-0001 12 24');
-compare('-0001 12 25', Date_Calc::DaysToDate(1721053, "%Y %m %d"), '1721053');
-compare(1721053, Date_Calc::DateToDays(25, 12, -1), '-0001 12 25');
-compare('-0001 12 26', Date_Calc::DaysToDate(1721054, "%Y %m %d"), '1721054');
-compare(1721054, Date_Calc::DateToDays(26, 12, -1), '-0001 12 26');
-compare('-0001 12 27', Date_Calc::DaysToDate(1721055, "%Y %m %d"), '1721055');
-compare(1721055, Date_Calc::DateToDays(27, 12, -1), '-0001 12 27');
-compare('-0001 12 28', Date_Calc::DaysToDate(1721056, "%Y %m %d"), '1721056');
-compare(1721056, Date_Calc::DateToDays(28, 12, -1), '-0001 12 28');
-compare('-0001 12 29', Date_Calc::DaysToDate(1721057, "%Y %m %d"), '1721057');
-compare(1721057, Date_Calc::DateToDays(29, 12, -1), '-0001 12 29');
-compare('-0001 12 30', Date_Calc::DaysToDate(1721058, "%Y %m %d"), '1721058');
-compare(1721058, Date_Calc::DateToDays(30, 12, -1), '-0001 12 30');
-compare('-0001 12 31', Date_Calc::DaysToDate(1721059, "%Y %m %d"), '1721059');
-compare(1721059, Date_Calc::DateToDays(31, 12, -1), '-0001 12 31');
-compare('0000 01 01', Date_Calc::DaysToDate(1721060, "%Y %m %d"), '1721060');
-compare(1721060, Date_Calc::DateToDays(1, 1, 0), '0000 01 01');
-compare('0000 01 02', Date_Calc::DaysToDate(1721061, "%Y %m %d"), '1721061');
-compare(1721061, Date_Calc::DateToDays(2, 1, 0), '0000 01 02');
-compare('0000 01 03', Date_Calc::DaysToDate(1721062, "%Y %m %d"), '1721062');
-compare(1721062, Date_Calc::DateToDays(3, 1, 0), '0000 01 03');
-compare('0000 01 04', Date_Calc::DaysToDate(1721063, "%Y %m %d"), '1721063');
-compare(1721063, Date_Calc::DateToDays(4, 1, 0), '0000 01 04');
-compare('0000 01 05', Date_Calc::DaysToDate(1721064, "%Y %m %d"), '1721064');
-compare(1721064, Date_Calc::DateToDays(5, 1, 0), '0000 01 05');
-compare('0000 01 06', Date_Calc::DaysToDate(1721065, "%Y %m %d"), '1721065');
-compare(1721065, Date_Calc::DateToDays(6, 1, 0), '0000 01 06');
-compare('0000 01 07', Date_Calc::DaysToDate(1721066, "%Y %m %d"), '1721066');
-compare(1721066, Date_Calc::DateToDays(7, 1, 0), '0000 01 07');
-compare('0000 01 08', Date_Calc::DaysToDate(1721067, "%Y %m %d"), '1721067');
-compare(1721067, Date_Calc::DateToDays(8, 1, 0), '0000 01 08');
-compare('0000 01 09', Date_Calc::DaysToDate(1721068, "%Y %m %d"), '1721068');
-compare(1721068, Date_Calc::DateToDays(9, 1, 0), '0000 01 09');
-compare('0000 01 10', Date_Calc::DaysToDate(1721069, "%Y %m %d"), '1721069');
-compare(1721069, Date_Calc::DateToDays(10, 1, 0), '0000 01 10');
-compare('0000 01 11', Date_Calc::DaysToDate(1721070, "%Y %m %d"), '1721070');
-compare(1721070, Date_Calc::DateToDays(11, 1, 0), '0000 01 11');
-compare('0000 01 12', Date_Calc::DaysToDate(1721071, "%Y %m %d"), '1721071');
-compare(1721071, Date_Calc::DateToDays(12, 1, 0), '0000 01 12');
-compare('0000 01 13', Date_Calc::DaysToDate(1721072, "%Y %m %d"), '1721072');
-compare(1721072, Date_Calc::DateToDays(13, 1, 0), '0000 01 13');
-compare('0000 01 14', Date_Calc::DaysToDate(1721073, "%Y %m %d"), '1721073');
-compare(1721073, Date_Calc::DateToDays(14, 1, 0), '0000 01 14');
-compare('0000 01 15', Date_Calc::DaysToDate(1721074, "%Y %m %d"), '1721074');
-compare(1721074, Date_Calc::DateToDays(15, 1, 0), '0000 01 15');
-compare('0000 01 16', Date_Calc::DaysToDate(1721075, "%Y %m %d"), '1721075');
-compare(1721075, Date_Calc::DateToDays(16, 1, 0), '0000 01 16');
-compare('0000 01 17', Date_Calc::DaysToDate(1721076, "%Y %m %d"), '1721076');
-compare(1721076, Date_Calc::DateToDays(17, 1, 0), '0000 01 17');
-compare('0000 01 18', Date_Calc::DaysToDate(1721077, "%Y %m %d"), '1721077');
-compare(1721077, Date_Calc::DateToDays(18, 1, 0), '0000 01 18');
-compare('0000 01 19', Date_Calc::DaysToDate(1721078, "%Y %m %d"), '1721078');
-compare(1721078, Date_Calc::DateToDays(19, 1, 0), '0000 01 19');
-compare('0000 01 20', Date_Calc::DaysToDate(1721079, "%Y %m %d"), '1721079');
-compare(1721079, Date_Calc::DateToDays(20, 1, 0), '0000 01 20');
-compare('0000 01 21', Date_Calc::DaysToDate(1721080, "%Y %m %d"), '1721080');
-compare(1721080, Date_Calc::DateToDays(21, 1, 0), '0000 01 21');
-compare('0000 01 22', Date_Calc::DaysToDate(1721081, "%Y %m %d"), '1721081');
-compare(1721081, Date_Calc::DateToDays(22, 1, 0), '0000 01 22');
-compare('0000 01 23', Date_Calc::DaysToDate(1721082, "%Y %m %d"), '1721082');
-compare(1721082, Date_Calc::DateToDays(23, 1, 0), '0000 01 23');
-compare('0000 01 24', Date_Calc::DaysToDate(1721083, "%Y %m %d"), '1721083');
-compare(1721083, Date_Calc::DateToDays(24, 1, 0), '0000 01 24');
-compare('0000 01 25', Date_Calc::DaysToDate(1721084, "%Y %m %d"), '1721084');
-compare(1721084, Date_Calc::DateToDays(25, 1, 0), '0000 01 25');
-compare('0000 01 26', Date_Calc::DaysToDate(1721085, "%Y %m %d"), '1721085');
-compare(1721085, Date_Calc::DateToDays(26, 1, 0), '0000 01 26');
-compare('0000 01 27', Date_Calc::DaysToDate(1721086, "%Y %m %d"), '1721086');
-compare(1721086, Date_Calc::DateToDays(27, 1, 0), '0000 01 27');
-compare('0000 01 28', Date_Calc::DaysToDate(1721087, "%Y %m %d"), '1721087');
-compare(1721087, Date_Calc::DateToDays(28, 1, 0), '0000 01 28');
-compare('0000 01 29', Date_Calc::DaysToDate(1721088, "%Y %m %d"), '1721088');
-compare(1721088, Date_Calc::DateToDays(29, 1, 0), '0000 01 29');
-compare('0000 01 30', Date_Calc::DaysToDate(1721089, "%Y %m %d"), '1721089');
-compare(1721089, Date_Calc::DateToDays(30, 1, 0), '0000 01 30');
-compare('0000 01 31', Date_Calc::DaysToDate(1721090, "%Y %m %d"), '1721090');
-compare(1721090, Date_Calc::DateToDays(31, 1, 0), '0000 01 31');
-compare('0000 02 01', Date_Calc::DaysToDate(1721091, "%Y %m %d"), '1721091');
-compare(1721091, Date_Calc::DateToDays(1, 2, 0), '0000 02 01');
-compare('0000 02 02', Date_Calc::DaysToDate(1721092, "%Y %m %d"), '1721092');
-compare(1721092, Date_Calc::DateToDays(2, 2, 0), '0000 02 02');
-compare('0000 02 03', Date_Calc::DaysToDate(1721093, "%Y %m %d"), '1721093');
-compare(1721093, Date_Calc::DateToDays(3, 2, 0), '0000 02 03');
-compare('0000 02 04', Date_Calc::DaysToDate(1721094, "%Y %m %d"), '1721094');
-compare(1721094, Date_Calc::DateToDays(4, 2, 0), '0000 02 04');
-compare('0000 02 05', Date_Calc::DaysToDate(1721095, "%Y %m %d"), '1721095');
-compare(1721095, Date_Calc::DateToDays(5, 2, 0), '0000 02 05');
-compare('0000 02 06', Date_Calc::DaysToDate(1721096, "%Y %m %d"), '1721096');
-compare(1721096, Date_Calc::DateToDays(6, 2, 0), '0000 02 06');
-compare('0000 02 07', Date_Calc::DaysToDate(1721097, "%Y %m %d"), '1721097');
-compare(1721097, Date_Calc::DateToDays(7, 2, 0), '0000 02 07');
-compare('0000 02 08', Date_Calc::DaysToDate(1721098, "%Y %m %d"), '1721098');
-compare(1721098, Date_Calc::DateToDays(8, 2, 0), '0000 02 08');
-compare('0000 02 09', Date_Calc::DaysToDate(1721099, "%Y %m %d"), '1721099');
-compare(1721099, Date_Calc::DateToDays(9, 2, 0), '0000 02 09');
-compare('0000 02 10', Date_Calc::DaysToDate(1721100, "%Y %m %d"), '1721100');
-compare(1721100, Date_Calc::DateToDays(10, 2, 0), '0000 02 10');
-compare('0000 02 11', Date_Calc::DaysToDate(1721101, "%Y %m %d"), '1721101');
-compare(1721101, Date_Calc::DateToDays(11, 2, 0), '0000 02 11');
-compare('0000 02 12', Date_Calc::DaysToDate(1721102, "%Y %m %d"), '1721102');
-compare(1721102, Date_Calc::DateToDays(12, 2, 0), '0000 02 12');
-compare('0000 02 13', Date_Calc::DaysToDate(1721103, "%Y %m %d"), '1721103');
-compare(1721103, Date_Calc::DateToDays(13, 2, 0), '0000 02 13');
-compare('0000 02 14', Date_Calc::DaysToDate(1721104, "%Y %m %d"), '1721104');
-compare(1721104, Date_Calc::DateToDays(14, 2, 0), '0000 02 14');
-compare('0000 02 15', Date_Calc::DaysToDate(1721105, "%Y %m %d"), '1721105');
-compare(1721105, Date_Calc::DateToDays(15, 2, 0), '0000 02 15');
-compare('0000 02 16', Date_Calc::DaysToDate(1721106, "%Y %m %d"), '1721106');
-compare(1721106, Date_Calc::DateToDays(16, 2, 0), '0000 02 16');
-compare('0000 02 17', Date_Calc::DaysToDate(1721107, "%Y %m %d"), '1721107');
-compare(1721107, Date_Calc::DateToDays(17, 2, 0), '0000 02 17');
-compare('0000 02 18', Date_Calc::DaysToDate(1721108, "%Y %m %d"), '1721108');
-compare(1721108, Date_Calc::DateToDays(18, 2, 0), '0000 02 18');
-compare('0000 02 19', Date_Calc::DaysToDate(1721109, "%Y %m %d"), '1721109');
-compare(1721109, Date_Calc::DateToDays(19, 2, 0), '0000 02 19');
-compare('0000 02 20', Date_Calc::DaysToDate(1721110, "%Y %m %d"), '1721110');
-compare(1721110, Date_Calc::DateToDays(20, 2, 0), '0000 02 20');
-compare('0000 02 21', Date_Calc::DaysToDate(1721111, "%Y %m %d"), '1721111');
-compare(1721111, Date_Calc::DateToDays(21, 2, 0), '0000 02 21');
-compare('0000 02 22', Date_Calc::DaysToDate(1721112, "%Y %m %d"), '1721112');
-compare(1721112, Date_Calc::DateToDays(22, 2, 0), '0000 02 22');
-compare('0000 02 23', Date_Calc::DaysToDate(1721113, "%Y %m %d"), '1721113');
-compare(1721113, Date_Calc::DateToDays(23, 2, 0), '0000 02 23');
-compare('0000 02 24', Date_Calc::DaysToDate(1721114, "%Y %m %d"), '1721114');
-compare(1721114, Date_Calc::DateToDays(24, 2, 0), '0000 02 24');
-compare('0000 02 25', Date_Calc::DaysToDate(1721115, "%Y %m %d"), '1721115');
-compare(1721115, Date_Calc::DateToDays(25, 2, 0), '0000 02 25');
-compare('0000 02 26', Date_Calc::DaysToDate(1721116, "%Y %m %d"), '1721116');
-compare(1721116, Date_Calc::DateToDays(26, 2, 0), '0000 02 26');
-compare('0000 02 27', Date_Calc::DaysToDate(1721117, "%Y %m %d"), '1721117');
-compare(1721117, Date_Calc::DateToDays(27, 2, 0), '0000 02 27');
-compare('0000 02 28', Date_Calc::DaysToDate(1721118, "%Y %m %d"), '1721118');
-compare(1721118, Date_Calc::DateToDays(28, 2, 0), '0000 02 28');
-compare('0000 02 29', Date_Calc::DaysToDate(1721119, "%Y %m %d"), '1721119');
-compare(1721119, Date_Calc::DateToDays(29, 2, 0), '0000 02 29');
-compare('0000 03 01', Date_Calc::DaysToDate(1721120, "%Y %m %d"), '1721120');
-compare(1721120, Date_Calc::DateToDays(1, 3, 0), '0000 03 01');
-compare('0000 03 02', Date_Calc::DaysToDate(1721121, "%Y %m %d"), '1721121');
-compare(1721121, Date_Calc::DateToDays(2, 3, 0), '0000 03 02');
-compare('0000 03 03', Date_Calc::DaysToDate(1721122, "%Y %m %d"), '1721122');
-compare(1721122, Date_Calc::DateToDays(3, 3, 0), '0000 03 03');
-compare('0000 03 04', Date_Calc::DaysToDate(1721123, "%Y %m %d"), '1721123');
-compare(1721123, Date_Calc::DateToDays(4, 3, 0), '0000 03 04');
-compare('0000 03 05', Date_Calc::DaysToDate(1721124, "%Y %m %d"), '1721124');
-compare(1721124, Date_Calc::DateToDays(5, 3, 0), '0000 03 05');
-compare('0000 03 06', Date_Calc::DaysToDate(1721125, "%Y %m %d"), '1721125');
-compare(1721125, Date_Calc::DateToDays(6, 3, 0), '0000 03 06');
-compare('0000 03 07', Date_Calc::DaysToDate(1721126, "%Y %m %d"), '1721126');
-compare(1721126, Date_Calc::DateToDays(7, 3, 0), '0000 03 07');
-compare('0000 03 08', Date_Calc::DaysToDate(1721127, "%Y %m %d"), '1721127');
-compare(1721127, Date_Calc::DateToDays(8, 3, 0), '0000 03 08');
-compare('0000 03 09', Date_Calc::DaysToDate(1721128, "%Y %m %d"), '1721128');
-compare(1721128, Date_Calc::DateToDays(9, 3, 0), '0000 03 09');
-compare('0000 03 10', Date_Calc::DaysToDate(1721129, "%Y %m %d"), '1721129');
-compare(1721129, Date_Calc::DateToDays(10, 3, 0), '0000 03 10');
-compare('0000 03 11', Date_Calc::DaysToDate(1721130, "%Y %m %d"), '1721130');
-compare(1721130, Date_Calc::DateToDays(11, 3, 0), '0000 03 11');
-compare('0000 03 12', Date_Calc::DaysToDate(1721131, "%Y %m %d"), '1721131');
-compare(1721131, Date_Calc::DateToDays(12, 3, 0), '0000 03 12');
-compare('0000 03 13', Date_Calc::DaysToDate(1721132, "%Y %m %d"), '1721132');
-compare(1721132, Date_Calc::DateToDays(13, 3, 0), '0000 03 13');
-compare('0000 03 14', Date_Calc::DaysToDate(1721133, "%Y %m %d"), '1721133');
-compare(1721133, Date_Calc::DateToDays(14, 3, 0), '0000 03 14');
-compare('0000 03 15', Date_Calc::DaysToDate(1721134, "%Y %m %d"), '1721134');
-compare(1721134, Date_Calc::DateToDays(15, 3, 0), '0000 03 15');
-compare('0000 03 16', Date_Calc::DaysToDate(1721135, "%Y %m %d"), '1721135');
-compare(1721135, Date_Calc::DateToDays(16, 3, 0), '0000 03 16');
-compare('0000 03 17', Date_Calc::DaysToDate(1721136, "%Y %m %d"), '1721136');
-compare(1721136, Date_Calc::DateToDays(17, 3, 0), '0000 03 17');
-compare('0000 03 18', Date_Calc::DaysToDate(1721137, "%Y %m %d"), '1721137');
-compare(1721137, Date_Calc::DateToDays(18, 3, 0), '0000 03 18');
-compare('0000 03 19', Date_Calc::DaysToDate(1721138, "%Y %m %d"), '1721138');
-compare(1721138, Date_Calc::DateToDays(19, 3, 0), '0000 03 19');
-compare('0000 03 20', Date_Calc::DaysToDate(1721139, "%Y %m %d"), '1721139');
-compare(1721139, Date_Calc::DateToDays(20, 3, 0), '0000 03 20');
-compare('0000 03 21', Date_Calc::DaysToDate(1721140, "%Y %m %d"), '1721140');
-compare(1721140, Date_Calc::DateToDays(21, 3, 0), '0000 03 21');
-compare('0000 03 22', Date_Calc::DaysToDate(1721141, "%Y %m %d"), '1721141');
-compare(1721141, Date_Calc::DateToDays(22, 3, 0), '0000 03 22');
-compare('0000 03 23', Date_Calc::DaysToDate(1721142, "%Y %m %d"), '1721142');
-compare(1721142, Date_Calc::DateToDays(23, 3, 0), '0000 03 23');
-compare('0000 03 24', Date_Calc::DaysToDate(1721143, "%Y %m %d"), '1721143');
-compare(1721143, Date_Calc::DateToDays(24, 3, 0), '0000 03 24');
-compare('0000 03 25', Date_Calc::DaysToDate(1721144, "%Y %m %d"), '1721144');
-compare(1721144, Date_Calc::DateToDays(25, 3, 0), '0000 03 25');
-compare('0000 03 26', Date_Calc::DaysToDate(1721145, "%Y %m %d"), '1721145');
-compare(1721145, Date_Calc::DateToDays(26, 3, 0), '0000 03 26');
-compare('0000 03 27', Date_Calc::DaysToDate(1721146, "%Y %m %d"), '1721146');
-compare(1721146, Date_Calc::DateToDays(27, 3, 0), '0000 03 27');
-compare('0000 03 28', Date_Calc::DaysToDate(1721147, "%Y %m %d"), '1721147');
-compare(1721147, Date_Calc::DateToDays(28, 3, 0), '0000 03 28');
-compare('0000 03 29', Date_Calc::DaysToDate(1721148, "%Y %m %d"), '1721148');
-compare(1721148, Date_Calc::DateToDays(29, 3, 0), '0000 03 29');
-compare('0000 03 30', Date_Calc::DaysToDate(1721149, "%Y %m %d"), '1721149');
-compare(1721149, Date_Calc::DateToDays(30, 3, 0), '0000 03 30');
-compare('0000 03 31', Date_Calc::DaysToDate(1721150, "%Y %m %d"), '1721150');
-compare(1721150, Date_Calc::DateToDays(31, 3, 0), '0000 03 31');
-compare('0000 04 01', Date_Calc::DaysToDate(1721151, "%Y %m %d"), '1721151');
-compare(1721151, Date_Calc::DateToDays(1, 4, 0), '0000 04 01');
-compare('0000 04 02', Date_Calc::DaysToDate(1721152, "%Y %m %d"), '1721152');
-compare(1721152, Date_Calc::DateToDays(2, 4, 0), '0000 04 02');
-compare('0000 04 03', Date_Calc::DaysToDate(1721153, "%Y %m %d"), '1721153');
-compare(1721153, Date_Calc::DateToDays(3, 4, 0), '0000 04 03');
-compare('0000 04 04', Date_Calc::DaysToDate(1721154, "%Y %m %d"), '1721154');
-compare(1721154, Date_Calc::DateToDays(4, 4, 0), '0000 04 04');
-compare('0000 04 05', Date_Calc::DaysToDate(1721155, "%Y %m %d"), '1721155');
-compare(1721155, Date_Calc::DateToDays(5, 4, 0), '0000 04 05');
-compare('0000 04 06', Date_Calc::DaysToDate(1721156, "%Y %m %d"), '1721156');
-compare(1721156, Date_Calc::DateToDays(6, 4, 0), '0000 04 06');
-compare('0000 04 07', Date_Calc::DaysToDate(1721157, "%Y %m %d"), '1721157');
-compare(1721157, Date_Calc::DateToDays(7, 4, 0), '0000 04 07');
-compare('0000 04 08', Date_Calc::DaysToDate(1721158, "%Y %m %d"), '1721158');
-compare(1721158, Date_Calc::DateToDays(8, 4, 0), '0000 04 08');
-compare('0000 04 09', Date_Calc::DaysToDate(1721159, "%Y %m %d"), '1721159');
-compare(1721159, Date_Calc::DateToDays(9, 4, 0), '0000 04 09');
-compare('0000 04 10', Date_Calc::DaysToDate(1721160, "%Y %m %d"), '1721160');
-compare(1721160, Date_Calc::DateToDays(10, 4, 0), '0000 04 10');
-compare('0000 04 11', Date_Calc::DaysToDate(1721161, "%Y %m %d"), '1721161');
-compare(1721161, Date_Calc::DateToDays(11, 4, 0), '0000 04 11');
-compare('0000 04 12', Date_Calc::DaysToDate(1721162, "%Y %m %d"), '1721162');
-compare(1721162, Date_Calc::DateToDays(12, 4, 0), '0000 04 12');
-compare('0000 04 13', Date_Calc::DaysToDate(1721163, "%Y %m %d"), '1721163');
-compare(1721163, Date_Calc::DateToDays(13, 4, 0), '0000 04 13');
-compare('0000 04 14', Date_Calc::DaysToDate(1721164, "%Y %m %d"), '1721164');
-compare(1721164, Date_Calc::DateToDays(14, 4, 0), '0000 04 14');
-compare('0000 04 15', Date_Calc::DaysToDate(1721165, "%Y %m %d"), '1721165');
-compare(1721165, Date_Calc::DateToDays(15, 4, 0), '0000 04 15');
-compare('0000 04 16', Date_Calc::DaysToDate(1721166, "%Y %m %d"), '1721166');
-compare(1721166, Date_Calc::DateToDays(16, 4, 0), '0000 04 16');
-compare('0000 04 17', Date_Calc::DaysToDate(1721167, "%Y %m %d"), '1721167');
-compare(1721167, Date_Calc::DateToDays(17, 4, 0), '0000 04 17');
-compare('0000 04 18', Date_Calc::DaysToDate(1721168, "%Y %m %d"), '1721168');
-compare(1721168, Date_Calc::DateToDays(18, 4, 0), '0000 04 18');
-compare('0000 04 19', Date_Calc::DaysToDate(1721169, "%Y %m %d"), '1721169');
-compare(1721169, Date_Calc::DateToDays(19, 4, 0), '0000 04 19');
-compare('0000 04 20', Date_Calc::DaysToDate(1721170, "%Y %m %d"), '1721170');
-compare(1721170, Date_Calc::DateToDays(20, 4, 0), '0000 04 20');
-compare('0000 04 21', Date_Calc::DaysToDate(1721171, "%Y %m %d"), '1721171');
-compare(1721171, Date_Calc::DateToDays(21, 4, 0), '0000 04 21');
-compare('0000 04 22', Date_Calc::DaysToDate(1721172, "%Y %m %d"), '1721172');
-compare(1721172, Date_Calc::DateToDays(22, 4, 0), '0000 04 22');
-compare('0000 04 23', Date_Calc::DaysToDate(1721173, "%Y %m %d"), '1721173');
-compare(1721173, Date_Calc::DateToDays(23, 4, 0), '0000 04 23');
-compare('0000 04 24', Date_Calc::DaysToDate(1721174, "%Y %m %d"), '1721174');
-compare(1721174, Date_Calc::DateToDays(24, 4, 0), '0000 04 24');
-compare('0000 04 25', Date_Calc::DaysToDate(1721175, "%Y %m %d"), '1721175');
-compare(1721175, Date_Calc::DateToDays(25, 4, 0), '0000 04 25');
-compare('0000 04 26', Date_Calc::DaysToDate(1721176, "%Y %m %d"), '1721176');
-compare(1721176, Date_Calc::DateToDays(26, 4, 0), '0000 04 26');
-compare('0000 04 27', Date_Calc::DaysToDate(1721177, "%Y %m %d"), '1721177');
-compare(1721177, Date_Calc::DateToDays(27, 4, 0), '0000 04 27');
-compare('0000 04 28', Date_Calc::DaysToDate(1721178, "%Y %m %d"), '1721178');
-compare(1721178, Date_Calc::DateToDays(28, 4, 0), '0000 04 28');
-compare('0000 04 29', Date_Calc::DaysToDate(1721179, "%Y %m %d"), '1721179');
-compare(1721179, Date_Calc::DateToDays(29, 4, 0), '0000 04 29');
-compare('0000 04 30', Date_Calc::DaysToDate(1721180, "%Y %m %d"), '1721180');
-compare(1721180, Date_Calc::DateToDays(30, 4, 0), '0000 04 30');
-compare('0000 05 01', Date_Calc::DaysToDate(1721181, "%Y %m %d"), '1721181');
-compare(1721181, Date_Calc::DateToDays(1, 5, 0), '0000 05 01');
-compare('0000 05 02', Date_Calc::DaysToDate(1721182, "%Y %m %d"), '1721182');
-compare(1721182, Date_Calc::DateToDays(2, 5, 0), '0000 05 02');
-compare('0000 05 03', Date_Calc::DaysToDate(1721183, "%Y %m %d"), '1721183');
-compare(1721183, Date_Calc::DateToDays(3, 5, 0), '0000 05 03');
-compare('0000 05 04', Date_Calc::DaysToDate(1721184, "%Y %m %d"), '1721184');
-compare(1721184, Date_Calc::DateToDays(4, 5, 0), '0000 05 04');
-compare('0000 05 05', Date_Calc::DaysToDate(1721185, "%Y %m %d"), '1721185');
-compare(1721185, Date_Calc::DateToDays(5, 5, 0), '0000 05 05');
-compare('0000 05 06', Date_Calc::DaysToDate(1721186, "%Y %m %d"), '1721186');
-compare(1721186, Date_Calc::DateToDays(6, 5, 0), '0000 05 06');
-compare('0000 05 07', Date_Calc::DaysToDate(1721187, "%Y %m %d"), '1721187');
-compare(1721187, Date_Calc::DateToDays(7, 5, 0), '0000 05 07');
-compare('0000 05 08', Date_Calc::DaysToDate(1721188, "%Y %m %d"), '1721188');
-compare(1721188, Date_Calc::DateToDays(8, 5, 0), '0000 05 08');
-compare('0000 05 09', Date_Calc::DaysToDate(1721189, "%Y %m %d"), '1721189');
-compare(1721189, Date_Calc::DateToDays(9, 5, 0), '0000 05 09');
-compare('0000 05 10', Date_Calc::DaysToDate(1721190, "%Y %m %d"), '1721190');
-compare(1721190, Date_Calc::DateToDays(10, 5, 0), '0000 05 10');
-compare('0000 05 11', Date_Calc::DaysToDate(1721191, "%Y %m %d"), '1721191');
-compare(1721191, Date_Calc::DateToDays(11, 5, 0), '0000 05 11');
-compare('0000 05 12', Date_Calc::DaysToDate(1721192, "%Y %m %d"), '1721192');
-compare(1721192, Date_Calc::DateToDays(12, 5, 0), '0000 05 12');
-compare('0000 05 13', Date_Calc::DaysToDate(1721193, "%Y %m %d"), '1721193');
-compare(1721193, Date_Calc::DateToDays(13, 5, 0), '0000 05 13');
-compare('0000 05 14', Date_Calc::DaysToDate(1721194, "%Y %m %d"), '1721194');
-compare(1721194, Date_Calc::DateToDays(14, 5, 0), '0000 05 14');
-compare('0000 05 15', Date_Calc::DaysToDate(1721195, "%Y %m %d"), '1721195');
-compare(1721195, Date_Calc::DateToDays(15, 5, 0), '0000 05 15');
-compare('0000 05 16', Date_Calc::DaysToDate(1721196, "%Y %m %d"), '1721196');
-compare(1721196, Date_Calc::DateToDays(16, 5, 0), '0000 05 16');
-compare('0000 05 17', Date_Calc::DaysToDate(1721197, "%Y %m %d"), '1721197');
-compare(1721197, Date_Calc::DateToDays(17, 5, 0), '0000 05 17');
-compare('0000 05 18', Date_Calc::DaysToDate(1721198, "%Y %m %d"), '1721198');
-compare(1721198, Date_Calc::DateToDays(18, 5, 0), '0000 05 18');
-compare('0000 05 19', Date_Calc::DaysToDate(1721199, "%Y %m %d"), '1721199');
-compare(1721199, Date_Calc::DateToDays(19, 5, 0), '0000 05 19');
-compare('0000 05 20', Date_Calc::DaysToDate(1721200, "%Y %m %d"), '1721200');
-compare(1721200, Date_Calc::DateToDays(20, 5, 0), '0000 05 20');
-compare('0000 05 21', Date_Calc::DaysToDate(1721201, "%Y %m %d"), '1721201');
-compare(1721201, Date_Calc::DateToDays(21, 5, 0), '0000 05 21');
-compare('0000 05 22', Date_Calc::DaysToDate(1721202, "%Y %m %d"), '1721202');
-compare(1721202, Date_Calc::DateToDays(22, 5, 0), '0000 05 22');
-compare('0000 05 23', Date_Calc::DaysToDate(1721203, "%Y %m %d"), '1721203');
-compare(1721203, Date_Calc::DateToDays(23, 5, 0), '0000 05 23');
-compare('0000 05 24', Date_Calc::DaysToDate(1721204, "%Y %m %d"), '1721204');
-compare(1721204, Date_Calc::DateToDays(24, 5, 0), '0000 05 24');
-compare('0000 05 25', Date_Calc::DaysToDate(1721205, "%Y %m %d"), '1721205');
-compare(1721205, Date_Calc::DateToDays(25, 5, 0), '0000 05 25');
-compare('0000 05 26', Date_Calc::DaysToDate(1721206, "%Y %m %d"), '1721206');
-compare(1721206, Date_Calc::DateToDays(26, 5, 0), '0000 05 26');
-compare('0000 05 27', Date_Calc::DaysToDate(1721207, "%Y %m %d"), '1721207');
-compare(1721207, Date_Calc::DateToDays(27, 5, 0), '0000 05 27');
-compare('0000 05 28', Date_Calc::DaysToDate(1721208, "%Y %m %d"), '1721208');
-compare(1721208, Date_Calc::DateToDays(28, 5, 0), '0000 05 28');
-compare('0000 05 29', Date_Calc::DaysToDate(1721209, "%Y %m %d"), '1721209');
-compare(1721209, Date_Calc::DateToDays(29, 5, 0), '0000 05 29');
-compare('0000 05 30', Date_Calc::DaysToDate(1721210, "%Y %m %d"), '1721210');
-compare(1721210, Date_Calc::DateToDays(30, 5, 0), '0000 05 30');
-compare('0000 05 31', Date_Calc::DaysToDate(1721211, "%Y %m %d"), '1721211');
-compare(1721211, Date_Calc::DateToDays(31, 5, 0), '0000 05 31');
-compare('0000 06 01', Date_Calc::DaysToDate(1721212, "%Y %m %d"), '1721212');
-compare(1721212, Date_Calc::DateToDays(1, 6, 0), '0000 06 01');
-compare('0000 06 02', Date_Calc::DaysToDate(1721213, "%Y %m %d"), '1721213');
-compare(1721213, Date_Calc::DateToDays(2, 6, 0), '0000 06 02');
-compare('0000 06 03', Date_Calc::DaysToDate(1721214, "%Y %m %d"), '1721214');
-compare(1721214, Date_Calc::DateToDays(3, 6, 0), '0000 06 03');
-compare('0000 06 04', Date_Calc::DaysToDate(1721215, "%Y %m %d"), '1721215');
-compare(1721215, Date_Calc::DateToDays(4, 6, 0), '0000 06 04');
-compare('0000 06 05', Date_Calc::DaysToDate(1721216, "%Y %m %d"), '1721216');
-compare(1721216, Date_Calc::DateToDays(5, 6, 0), '0000 06 05');
-compare('0000 06 06', Date_Calc::DaysToDate(1721217, "%Y %m %d"), '1721217');
-compare(1721217, Date_Calc::DateToDays(6, 6, 0), '0000 06 06');
-compare('0000 06 07', Date_Calc::DaysToDate(1721218, "%Y %m %d"), '1721218');
-compare(1721218, Date_Calc::DateToDays(7, 6, 0), '0000 06 07');
-compare('0000 06 08', Date_Calc::DaysToDate(1721219, "%Y %m %d"), '1721219');
-compare(1721219, Date_Calc::DateToDays(8, 6, 0), '0000 06 08');
-compare('0000 06 09', Date_Calc::DaysToDate(1721220, "%Y %m %d"), '1721220');
-compare(1721220, Date_Calc::DateToDays(9, 6, 0), '0000 06 09');
-compare('0000 06 10', Date_Calc::DaysToDate(1721221, "%Y %m %d"), '1721221');
-compare(1721221, Date_Calc::DateToDays(10, 6, 0), '0000 06 10');
-compare('0000 06 11', Date_Calc::DaysToDate(1721222, "%Y %m %d"), '1721222');
-compare(1721222, Date_Calc::DateToDays(11, 6, 0), '0000 06 11');
-compare('0000 06 12', Date_Calc::DaysToDate(1721223, "%Y %m %d"), '1721223');
-compare(1721223, Date_Calc::DateToDays(12, 6, 0), '0000 06 12');
-compare('0000 06 13', Date_Calc::DaysToDate(1721224, "%Y %m %d"), '1721224');
-compare(1721224, Date_Calc::DateToDays(13, 6, 0), '0000 06 13');
-compare('0000 06 14', Date_Calc::DaysToDate(1721225, "%Y %m %d"), '1721225');
-compare(1721225, Date_Calc::DateToDays(14, 6, 0), '0000 06 14');
-compare('0000 06 15', Date_Calc::DaysToDate(1721226, "%Y %m %d"), '1721226');
-compare(1721226, Date_Calc::DateToDays(15, 6, 0), '0000 06 15');
-compare('0000 06 16', Date_Calc::DaysToDate(1721227, "%Y %m %d"), '1721227');
-compare(1721227, Date_Calc::DateToDays(16, 6, 0), '0000 06 16');
-compare('0000 06 17', Date_Calc::DaysToDate(1721228, "%Y %m %d"), '1721228');
-compare(1721228, Date_Calc::DateToDays(17, 6, 0), '0000 06 17');
-compare('0000 06 18', Date_Calc::DaysToDate(1721229, "%Y %m %d"), '1721229');
-compare(1721229, Date_Calc::DateToDays(18, 6, 0), '0000 06 18');
-compare('0000 06 19', Date_Calc::DaysToDate(1721230, "%Y %m %d"), '1721230');
-compare(1721230, Date_Calc::DateToDays(19, 6, 0), '0000 06 19');
-compare('0000 06 20', Date_Calc::DaysToDate(1721231, "%Y %m %d"), '1721231');
-compare(1721231, Date_Calc::DateToDays(20, 6, 0), '0000 06 20');
-compare('0000 06 21', Date_Calc::DaysToDate(1721232, "%Y %m %d"), '1721232');
-compare(1721232, Date_Calc::DateToDays(21, 6, 0), '0000 06 21');
-compare('0000 06 22', Date_Calc::DaysToDate(1721233, "%Y %m %d"), '1721233');
-compare(1721233, Date_Calc::DateToDays(22, 6, 0), '0000 06 22');
-compare('0000 06 23', Date_Calc::DaysToDate(1721234, "%Y %m %d"), '1721234');
-compare(1721234, Date_Calc::DateToDays(23, 6, 0), '0000 06 23');
-compare('0000 06 24', Date_Calc::DaysToDate(1721235, "%Y %m %d"), '1721235');
-compare(1721235, Date_Calc::DateToDays(24, 6, 0), '0000 06 24');
-compare('0000 06 25', Date_Calc::DaysToDate(1721236, "%Y %m %d"), '1721236');
-compare(1721236, Date_Calc::DateToDays(25, 6, 0), '0000 06 25');
-compare('0000 06 26', Date_Calc::DaysToDate(1721237, "%Y %m %d"), '1721237');
-compare(1721237, Date_Calc::DateToDays(26, 6, 0), '0000 06 26');
-compare('0000 06 27', Date_Calc::DaysToDate(1721238, "%Y %m %d"), '1721238');
-compare(1721238, Date_Calc::DateToDays(27, 6, 0), '0000 06 27');
-compare('0000 06 28', Date_Calc::DaysToDate(1721239, "%Y %m %d"), '1721239');
-compare(1721239, Date_Calc::DateToDays(28, 6, 0), '0000 06 28');
-compare('0000 06 29', Date_Calc::DaysToDate(1721240, "%Y %m %d"), '1721240');
-compare(1721240, Date_Calc::DateToDays(29, 6, 0), '0000 06 29');
-compare('0000 06 30', Date_Calc::DaysToDate(1721241, "%Y %m %d"), '1721241');
-compare(1721241, Date_Calc::DateToDays(30, 6, 0), '0000 06 30');
-compare('0000 07 01', Date_Calc::DaysToDate(1721242, "%Y %m %d"), '1721242');
-compare(1721242, Date_Calc::DateToDays(1, 7, 0), '0000 07 01');
-compare('0000 07 02', Date_Calc::DaysToDate(1721243, "%Y %m %d"), '1721243');
-compare(1721243, Date_Calc::DateToDays(2, 7, 0), '0000 07 02');
-compare('0000 07 03', Date_Calc::DaysToDate(1721244, "%Y %m %d"), '1721244');
-compare(1721244, Date_Calc::DateToDays(3, 7, 0), '0000 07 03');
-compare('0000 07 04', Date_Calc::DaysToDate(1721245, "%Y %m %d"), '1721245');
-compare(1721245, Date_Calc::DateToDays(4, 7, 0), '0000 07 04');
-compare('0000 07 05', Date_Calc::DaysToDate(1721246, "%Y %m %d"), '1721246');
-compare(1721246, Date_Calc::DateToDays(5, 7, 0), '0000 07 05');
-compare('0000 07 06', Date_Calc::DaysToDate(1721247, "%Y %m %d"), '1721247');
-compare(1721247, Date_Calc::DateToDays(6, 7, 0), '0000 07 06');
-compare('0000 07 07', Date_Calc::DaysToDate(1721248, "%Y %m %d"), '1721248');
-compare(1721248, Date_Calc::DateToDays(7, 7, 0), '0000 07 07');
-compare('0000 07 08', Date_Calc::DaysToDate(1721249, "%Y %m %d"), '1721249');
-compare(1721249, Date_Calc::DateToDays(8, 7, 0), '0000 07 08');
-compare('0000 07 09', Date_Calc::DaysToDate(1721250, "%Y %m %d"), '1721250');
-compare(1721250, Date_Calc::DateToDays(9, 7, 0), '0000 07 09');
-compare('0000 07 10', Date_Calc::DaysToDate(1721251, "%Y %m %d"), '1721251');
-compare(1721251, Date_Calc::DateToDays(10, 7, 0), '0000 07 10');
-compare('0000 07 11', Date_Calc::DaysToDate(1721252, "%Y %m %d"), '1721252');
-compare(1721252, Date_Calc::DateToDays(11, 7, 0), '0000 07 11');
-compare('0000 07 12', Date_Calc::DaysToDate(1721253, "%Y %m %d"), '1721253');
-compare(1721253, Date_Calc::DateToDays(12, 7, 0), '0000 07 12');
-compare('0000 07 13', Date_Calc::DaysToDate(1721254, "%Y %m %d"), '1721254');
-compare(1721254, Date_Calc::DateToDays(13, 7, 0), '0000 07 13');
-compare('0000 07 14', Date_Calc::DaysToDate(1721255, "%Y %m %d"), '1721255');
-compare(1721255, Date_Calc::DateToDays(14, 7, 0), '0000 07 14');
-compare('0000 07 15', Date_Calc::DaysToDate(1721256, "%Y %m %d"), '1721256');
-compare(1721256, Date_Calc::DateToDays(15, 7, 0), '0000 07 15');
-compare('0000 07 16', Date_Calc::DaysToDate(1721257, "%Y %m %d"), '1721257');
-compare(1721257, Date_Calc::DateToDays(16, 7, 0), '0000 07 16');
-compare('0000 07 17', Date_Calc::DaysToDate(1721258, "%Y %m %d"), '1721258');
-compare(1721258, Date_Calc::DateToDays(17, 7, 0), '0000 07 17');
-compare('0000 07 18', Date_Calc::DaysToDate(1721259, "%Y %m %d"), '1721259');
-compare(1721259, Date_Calc::DateToDays(18, 7, 0), '0000 07 18');
-compare('0000 07 19', Date_Calc::DaysToDate(1721260, "%Y %m %d"), '1721260');
-compare(1721260, Date_Calc::DateToDays(19, 7, 0), '0000 07 19');
-compare('0000 07 20', Date_Calc::DaysToDate(1721261, "%Y %m %d"), '1721261');
-compare(1721261, Date_Calc::DateToDays(20, 7, 0), '0000 07 20');
-compare('0000 07 21', Date_Calc::DaysToDate(1721262, "%Y %m %d"), '1721262');
-compare(1721262, Date_Calc::DateToDays(21, 7, 0), '0000 07 21');
-compare('0000 07 22', Date_Calc::DaysToDate(1721263, "%Y %m %d"), '1721263');
-compare(1721263, Date_Calc::DateToDays(22, 7, 0), '0000 07 22');
-compare('0000 07 23', Date_Calc::DaysToDate(1721264, "%Y %m %d"), '1721264');
-compare(1721264, Date_Calc::DateToDays(23, 7, 0), '0000 07 23');
-compare('0000 07 24', Date_Calc::DaysToDate(1721265, "%Y %m %d"), '1721265');
-compare(1721265, Date_Calc::DateToDays(24, 7, 0), '0000 07 24');
-compare('0000 07 25', Date_Calc::DaysToDate(1721266, "%Y %m %d"), '1721266');
-compare(1721266, Date_Calc::DateToDays(25, 7, 0), '0000 07 25');
-compare('0000 07 26', Date_Calc::DaysToDate(1721267, "%Y %m %d"), '1721267');
-compare(1721267, Date_Calc::DateToDays(26, 7, 0), '0000 07 26');
-compare('0000 07 27', Date_Calc::DaysToDate(1721268, "%Y %m %d"), '1721268');
-compare(1721268, Date_Calc::DateToDays(27, 7, 0), '0000 07 27');
-compare('0000 07 28', Date_Calc::DaysToDate(1721269, "%Y %m %d"), '1721269');
-compare(1721269, Date_Calc::DateToDays(28, 7, 0), '0000 07 28');
-compare('0000 07 29', Date_Calc::DaysToDate(1721270, "%Y %m %d"), '1721270');
-compare(1721270, Date_Calc::DateToDays(29, 7, 0), '0000 07 29');
-compare('0000 07 30', Date_Calc::DaysToDate(1721271, "%Y %m %d"), '1721271');
-compare(1721271, Date_Calc::DateToDays(30, 7, 0), '0000 07 30');
-compare('0000 07 31', Date_Calc::DaysToDate(1721272, "%Y %m %d"), '1721272');
-compare(1721272, Date_Calc::DateToDays(31, 7, 0), '0000 07 31');
-compare('0000 08 01', Date_Calc::DaysToDate(1721273, "%Y %m %d"), '1721273');
-compare(1721273, Date_Calc::DateToDays(1, 8, 0), '0000 08 01');
-compare('0000 08 02', Date_Calc::DaysToDate(1721274, "%Y %m %d"), '1721274');
-compare(1721274, Date_Calc::DateToDays(2, 8, 0), '0000 08 02');
-compare('0000 08 03', Date_Calc::DaysToDate(1721275, "%Y %m %d"), '1721275');
-compare(1721275, Date_Calc::DateToDays(3, 8, 0), '0000 08 03');
-compare('0000 08 04', Date_Calc::DaysToDate(1721276, "%Y %m %d"), '1721276');
-compare(1721276, Date_Calc::DateToDays(4, 8, 0), '0000 08 04');
-compare('0000 08 05', Date_Calc::DaysToDate(1721277, "%Y %m %d"), '1721277');
-compare(1721277, Date_Calc::DateToDays(5, 8, 0), '0000 08 05');
-compare('0000 08 06', Date_Calc::DaysToDate(1721278, "%Y %m %d"), '1721278');
-compare(1721278, Date_Calc::DateToDays(6, 8, 0), '0000 08 06');
-compare('0000 08 07', Date_Calc::DaysToDate(1721279, "%Y %m %d"), '1721279');
-compare(1721279, Date_Calc::DateToDays(7, 8, 0), '0000 08 07');
-compare('0000 08 08', Date_Calc::DaysToDate(1721280, "%Y %m %d"), '1721280');
-compare(1721280, Date_Calc::DateToDays(8, 8, 0), '0000 08 08');
-compare('0000 08 09', Date_Calc::DaysToDate(1721281, "%Y %m %d"), '1721281');
-compare(1721281, Date_Calc::DateToDays(9, 8, 0), '0000 08 09');
-compare('0000 08 10', Date_Calc::DaysToDate(1721282, "%Y %m %d"), '1721282');
-compare(1721282, Date_Calc::DateToDays(10, 8, 0), '0000 08 10');
-compare('0000 08 11', Date_Calc::DaysToDate(1721283, "%Y %m %d"), '1721283');
-compare(1721283, Date_Calc::DateToDays(11, 8, 0), '0000 08 11');
-compare('0000 08 12', Date_Calc::DaysToDate(1721284, "%Y %m %d"), '1721284');
-compare(1721284, Date_Calc::DateToDays(12, 8, 0), '0000 08 12');
-compare('0000 08 13', Date_Calc::DaysToDate(1721285, "%Y %m %d"), '1721285');
-compare(1721285, Date_Calc::DateToDays(13, 8, 0), '0000 08 13');
-compare('0000 08 14', Date_Calc::DaysToDate(1721286, "%Y %m %d"), '1721286');
-compare(1721286, Date_Calc::DateToDays(14, 8, 0), '0000 08 14');
-compare('0000 08 15', Date_Calc::DaysToDate(1721287, "%Y %m %d"), '1721287');
-compare(1721287, Date_Calc::DateToDays(15, 8, 0), '0000 08 15');
-compare('0000 08 16', Date_Calc::DaysToDate(1721288, "%Y %m %d"), '1721288');
-compare(1721288, Date_Calc::DateToDays(16, 8, 0), '0000 08 16');
-compare('0000 08 17', Date_Calc::DaysToDate(1721289, "%Y %m %d"), '1721289');
-compare(1721289, Date_Calc::DateToDays(17, 8, 0), '0000 08 17');
-compare('0000 08 18', Date_Calc::DaysToDate(1721290, "%Y %m %d"), '1721290');
-compare(1721290, Date_Calc::DateToDays(18, 8, 0), '0000 08 18');
-compare('0000 08 19', Date_Calc::DaysToDate(1721291, "%Y %m %d"), '1721291');
-compare(1721291, Date_Calc::DateToDays(19, 8, 0), '0000 08 19');
-compare('0000 08 20', Date_Calc::DaysToDate(1721292, "%Y %m %d"), '1721292');
-compare(1721292, Date_Calc::DateToDays(20, 8, 0), '0000 08 20');
-compare('0000 08 21', Date_Calc::DaysToDate(1721293, "%Y %m %d"), '1721293');
-compare(1721293, Date_Calc::DateToDays(21, 8, 0), '0000 08 21');
-compare('0000 08 22', Date_Calc::DaysToDate(1721294, "%Y %m %d"), '1721294');
-compare(1721294, Date_Calc::DateToDays(22, 8, 0), '0000 08 22');
-compare('0000 08 23', Date_Calc::DaysToDate(1721295, "%Y %m %d"), '1721295');
-compare(1721295, Date_Calc::DateToDays(23, 8, 0), '0000 08 23');
-compare('0000 08 24', Date_Calc::DaysToDate(1721296, "%Y %m %d"), '1721296');
-compare(1721296, Date_Calc::DateToDays(24, 8, 0), '0000 08 24');
-compare('0000 08 25', Date_Calc::DaysToDate(1721297, "%Y %m %d"), '1721297');
-compare(1721297, Date_Calc::DateToDays(25, 8, 0), '0000 08 25');
-compare('0000 08 26', Date_Calc::DaysToDate(1721298, "%Y %m %d"), '1721298');
-compare(1721298, Date_Calc::DateToDays(26, 8, 0), '0000 08 26');
-compare('0000 08 27', Date_Calc::DaysToDate(1721299, "%Y %m %d"), '1721299');
-compare(1721299, Date_Calc::DateToDays(27, 8, 0), '0000 08 27');
-compare('0000 08 28', Date_Calc::DaysToDate(1721300, "%Y %m %d"), '1721300');
-compare(1721300, Date_Calc::DateToDays(28, 8, 0), '0000 08 28');
-compare('0000 08 29', Date_Calc::DaysToDate(1721301, "%Y %m %d"), '1721301');
-compare(1721301, Date_Calc::DateToDays(29, 8, 0), '0000 08 29');
-compare('0000 08 30', Date_Calc::DaysToDate(1721302, "%Y %m %d"), '1721302');
-compare(1721302, Date_Calc::DateToDays(30, 8, 0), '0000 08 30');
-compare('0000 08 31', Date_Calc::DaysToDate(1721303, "%Y %m %d"), '1721303');
-compare(1721303, Date_Calc::DateToDays(31, 8, 0), '0000 08 31');
-compare('0000 09 01', Date_Calc::DaysToDate(1721304, "%Y %m %d"), '1721304');
-compare(1721304, Date_Calc::DateToDays(1, 9, 0), '0000 09 01');
-compare('0000 09 02', Date_Calc::DaysToDate(1721305, "%Y %m %d"), '1721305');
-compare(1721305, Date_Calc::DateToDays(2, 9, 0), '0000 09 02');
-compare('0000 09 03', Date_Calc::DaysToDate(1721306, "%Y %m %d"), '1721306');
-compare(1721306, Date_Calc::DateToDays(3, 9, 0), '0000 09 03');
-compare('0000 09 04', Date_Calc::DaysToDate(1721307, "%Y %m %d"), '1721307');
-compare(1721307, Date_Calc::DateToDays(4, 9, 0), '0000 09 04');
-compare('0000 09 05', Date_Calc::DaysToDate(1721308, "%Y %m %d"), '1721308');
-compare(1721308, Date_Calc::DateToDays(5, 9, 0), '0000 09 05');
-compare('0000 09 06', Date_Calc::DaysToDate(1721309, "%Y %m %d"), '1721309');
-compare(1721309, Date_Calc::DateToDays(6, 9, 0), '0000 09 06');
-compare('0000 09 07', Date_Calc::DaysToDate(1721310, "%Y %m %d"), '1721310');
-compare(1721310, Date_Calc::DateToDays(7, 9, 0), '0000 09 07');
-compare('0000 09 08', Date_Calc::DaysToDate(1721311, "%Y %m %d"), '1721311');
-compare(1721311, Date_Calc::DateToDays(8, 9, 0), '0000 09 08');
-compare('0000 09 09', Date_Calc::DaysToDate(1721312, "%Y %m %d"), '1721312');
-compare(1721312, Date_Calc::DateToDays(9, 9, 0), '0000 09 09');
-compare('0000 09 10', Date_Calc::DaysToDate(1721313, "%Y %m %d"), '1721313');
-compare(1721313, Date_Calc::DateToDays(10, 9, 0), '0000 09 10');
-compare('0000 09 11', Date_Calc::DaysToDate(1721314, "%Y %m %d"), '1721314');
-compare(1721314, Date_Calc::DateToDays(11, 9, 0), '0000 09 11');
-compare('0000 09 12', Date_Calc::DaysToDate(1721315, "%Y %m %d"), '1721315');
-compare(1721315, Date_Calc::DateToDays(12, 9, 0), '0000 09 12');
-compare('0000 09 13', Date_Calc::DaysToDate(1721316, "%Y %m %d"), '1721316');
-compare(1721316, Date_Calc::DateToDays(13, 9, 0), '0000 09 13');
-compare('0000 09 14', Date_Calc::DaysToDate(1721317, "%Y %m %d"), '1721317');
-compare(1721317, Date_Calc::DateToDays(14, 9, 0), '0000 09 14');
-compare('0000 09 15', Date_Calc::DaysToDate(1721318, "%Y %m %d"), '1721318');
-compare(1721318, Date_Calc::DateToDays(15, 9, 0), '0000 09 15');
-compare('0000 09 16', Date_Calc::DaysToDate(1721319, "%Y %m %d"), '1721319');
-compare(1721319, Date_Calc::DateToDays(16, 9, 0), '0000 09 16');
-compare('0000 09 17', Date_Calc::DaysToDate(1721320, "%Y %m %d"), '1721320');
-compare(1721320, Date_Calc::DateToDays(17, 9, 0), '0000 09 17');
-compare('0000 09 18', Date_Calc::DaysToDate(1721321, "%Y %m %d"), '1721321');
-compare(1721321, Date_Calc::DateToDays(18, 9, 0), '0000 09 18');
-compare('0000 09 19', Date_Calc::DaysToDate(1721322, "%Y %m %d"), '1721322');
-compare(1721322, Date_Calc::DateToDays(19, 9, 0), '0000 09 19');
-compare('0000 09 20', Date_Calc::DaysToDate(1721323, "%Y %m %d"), '1721323');
-compare(1721323, Date_Calc::DateToDays(20, 9, 0), '0000 09 20');
-compare('0000 09 21', Date_Calc::DaysToDate(1721324, "%Y %m %d"), '1721324');
-compare(1721324, Date_Calc::DateToDays(21, 9, 0), '0000 09 21');
-compare('0000 09 22', Date_Calc::DaysToDate(1721325, "%Y %m %d"), '1721325');
-compare(1721325, Date_Calc::DateToDays(22, 9, 0), '0000 09 22');
-compare('0000 09 23', Date_Calc::DaysToDate(1721326, "%Y %m %d"), '1721326');
-compare(1721326, Date_Calc::DateToDays(23, 9, 0), '0000 09 23');
-compare('0000 09 24', Date_Calc::DaysToDate(1721327, "%Y %m %d"), '1721327');
-compare(1721327, Date_Calc::DateToDays(24, 9, 0), '0000 09 24');
-compare('0000 09 25', Date_Calc::DaysToDate(1721328, "%Y %m %d"), '1721328');
-compare(1721328, Date_Calc::DateToDays(25, 9, 0), '0000 09 25');
-compare('0000 09 26', Date_Calc::DaysToDate(1721329, "%Y %m %d"), '1721329');
-compare(1721329, Date_Calc::DateToDays(26, 9, 0), '0000 09 26');
-compare('0000 09 27', Date_Calc::DaysToDate(1721330, "%Y %m %d"), '1721330');
-compare(1721330, Date_Calc::DateToDays(27, 9, 0), '0000 09 27');
-compare('0000 09 28', Date_Calc::DaysToDate(1721331, "%Y %m %d"), '1721331');
-compare(1721331, Date_Calc::DateToDays(28, 9, 0), '0000 09 28');
-compare('0000 09 29', Date_Calc::DaysToDate(1721332, "%Y %m %d"), '1721332');
-compare(1721332, Date_Calc::DateToDays(29, 9, 0), '0000 09 29');
-compare('0000 09 30', Date_Calc::DaysToDate(1721333, "%Y %m %d"), '1721333');
-compare(1721333, Date_Calc::DateToDays(30, 9, 0), '0000 09 30');
-compare('0000 10 01', Date_Calc::DaysToDate(1721334, "%Y %m %d"), '1721334');
-compare(1721334, Date_Calc::DateToDays(1, 10, 0), '0000 10 01');
-compare('0000 10 02', Date_Calc::DaysToDate(1721335, "%Y %m %d"), '1721335');
-compare(1721335, Date_Calc::DateToDays(2, 10, 0), '0000 10 02');
-compare('0000 10 03', Date_Calc::DaysToDate(1721336, "%Y %m %d"), '1721336');
-compare(1721336, Date_Calc::DateToDays(3, 10, 0), '0000 10 03');
-compare('0000 10 04', Date_Calc::DaysToDate(1721337, "%Y %m %d"), '1721337');
-compare(1721337, Date_Calc::DateToDays(4, 10, 0), '0000 10 04');
-compare('0000 10 05', Date_Calc::DaysToDate(1721338, "%Y %m %d"), '1721338');
-compare(1721338, Date_Calc::DateToDays(5, 10, 0), '0000 10 05');
-compare('0000 10 06', Date_Calc::DaysToDate(1721339, "%Y %m %d"), '1721339');
-compare(1721339, Date_Calc::DateToDays(6, 10, 0), '0000 10 06');
-compare('0000 10 07', Date_Calc::DaysToDate(1721340, "%Y %m %d"), '1721340');
-compare(1721340, Date_Calc::DateToDays(7, 10, 0), '0000 10 07');
-compare('0000 10 08', Date_Calc::DaysToDate(1721341, "%Y %m %d"), '1721341');
-compare(1721341, Date_Calc::DateToDays(8, 10, 0), '0000 10 08');
-compare('0000 10 09', Date_Calc::DaysToDate(1721342, "%Y %m %d"), '1721342');
-compare(1721342, Date_Calc::DateToDays(9, 10, 0), '0000 10 09');
-compare('0000 10 10', Date_Calc::DaysToDate(1721343, "%Y %m %d"), '1721343');
-compare(1721343, Date_Calc::DateToDays(10, 10, 0), '0000 10 10');
-compare('0000 10 11', Date_Calc::DaysToDate(1721344, "%Y %m %d"), '1721344');
-compare(1721344, Date_Calc::DateToDays(11, 10, 0), '0000 10 11');
-compare('0000 10 12', Date_Calc::DaysToDate(1721345, "%Y %m %d"), '1721345');
-compare(1721345, Date_Calc::DateToDays(12, 10, 0), '0000 10 12');
-compare('0000 10 13', Date_Calc::DaysToDate(1721346, "%Y %m %d"), '1721346');
-compare(1721346, Date_Calc::DateToDays(13, 10, 0), '0000 10 13');
-compare('0000 10 14', Date_Calc::DaysToDate(1721347, "%Y %m %d"), '1721347');
-compare(1721347, Date_Calc::DateToDays(14, 10, 0), '0000 10 14');
-compare('0000 10 15', Date_Calc::DaysToDate(1721348, "%Y %m %d"), '1721348');
-compare(1721348, Date_Calc::DateToDays(15, 10, 0), '0000 10 15');
-compare('0000 10 16', Date_Calc::DaysToDate(1721349, "%Y %m %d"), '1721349');
-compare(1721349, Date_Calc::DateToDays(16, 10, 0), '0000 10 16');
-compare('0000 10 17', Date_Calc::DaysToDate(1721350, "%Y %m %d"), '1721350');
-compare(1721350, Date_Calc::DateToDays(17, 10, 0), '0000 10 17');
-compare('0000 10 18', Date_Calc::DaysToDate(1721351, "%Y %m %d"), '1721351');
-compare(1721351, Date_Calc::DateToDays(18, 10, 0), '0000 10 18');
-compare('0000 10 19', Date_Calc::DaysToDate(1721352, "%Y %m %d"), '1721352');
-compare(1721352, Date_Calc::DateToDays(19, 10, 0), '0000 10 19');
-compare('0000 10 20', Date_Calc::DaysToDate(1721353, "%Y %m %d"), '1721353');
-compare(1721353, Date_Calc::DateToDays(20, 10, 0), '0000 10 20');
-compare('0000 10 21', Date_Calc::DaysToDate(1721354, "%Y %m %d"), '1721354');
-compare(1721354, Date_Calc::DateToDays(21, 10, 0), '0000 10 21');
-compare('0000 10 22', Date_Calc::DaysToDate(1721355, "%Y %m %d"), '1721355');
-compare(1721355, Date_Calc::DateToDays(22, 10, 0), '0000 10 22');
-compare('0000 10 23', Date_Calc::DaysToDate(1721356, "%Y %m %d"), '1721356');
-compare(1721356, Date_Calc::DateToDays(23, 10, 0), '0000 10 23');
-compare('0000 10 24', Date_Calc::DaysToDate(1721357, "%Y %m %d"), '1721357');
-compare(1721357, Date_Calc::DateToDays(24, 10, 0), '0000 10 24');
-compare('0000 10 25', Date_Calc::DaysToDate(1721358, "%Y %m %d"), '1721358');
-compare(1721358, Date_Calc::DateToDays(25, 10, 0), '0000 10 25');
-compare('0000 10 26', Date_Calc::DaysToDate(1721359, "%Y %m %d"), '1721359');
-compare(1721359, Date_Calc::DateToDays(26, 10, 0), '0000 10 26');
-compare('0000 10 27', Date_Calc::DaysToDate(1721360, "%Y %m %d"), '1721360');
-compare(1721360, Date_Calc::DateToDays(27, 10, 0), '0000 10 27');
-compare('0000 10 28', Date_Calc::DaysToDate(1721361, "%Y %m %d"), '1721361');
-compare(1721361, Date_Calc::DateToDays(28, 10, 0), '0000 10 28');
-compare('0000 10 29', Date_Calc::DaysToDate(1721362, "%Y %m %d"), '1721362');
-compare(1721362, Date_Calc::DateToDays(29, 10, 0), '0000 10 29');
-compare('0000 10 30', Date_Calc::DaysToDate(1721363, "%Y %m %d"), '1721363');
-compare(1721363, Date_Calc::DateToDays(30, 10, 0), '0000 10 30');
-compare('0000 10 31', Date_Calc::DaysToDate(1721364, "%Y %m %d"), '1721364');
-compare(1721364, Date_Calc::DateToDays(31, 10, 0), '0000 10 31');
-compare('0000 11 01', Date_Calc::DaysToDate(1721365, "%Y %m %d"), '1721365');
-compare(1721365, Date_Calc::DateToDays(1, 11, 0), '0000 11 01');
-compare('0000 11 02', Date_Calc::DaysToDate(1721366, "%Y %m %d"), '1721366');
-compare(1721366, Date_Calc::DateToDays(2, 11, 0), '0000 11 02');
-compare('0000 11 03', Date_Calc::DaysToDate(1721367, "%Y %m %d"), '1721367');
-compare(1721367, Date_Calc::DateToDays(3, 11, 0), '0000 11 03');
-compare('0000 11 04', Date_Calc::DaysToDate(1721368, "%Y %m %d"), '1721368');
-compare(1721368, Date_Calc::DateToDays(4, 11, 0), '0000 11 04');
-compare('0000 11 05', Date_Calc::DaysToDate(1721369, "%Y %m %d"), '1721369');
-compare(1721369, Date_Calc::DateToDays(5, 11, 0), '0000 11 05');
-compare('0000 11 06', Date_Calc::DaysToDate(1721370, "%Y %m %d"), '1721370');
-compare(1721370, Date_Calc::DateToDays(6, 11, 0), '0000 11 06');
-compare('0000 11 07', Date_Calc::DaysToDate(1721371, "%Y %m %d"), '1721371');
-compare(1721371, Date_Calc::DateToDays(7, 11, 0), '0000 11 07');
-compare('0000 11 08', Date_Calc::DaysToDate(1721372, "%Y %m %d"), '1721372');
-compare(1721372, Date_Calc::DateToDays(8, 11, 0), '0000 11 08');
-compare('0000 11 09', Date_Calc::DaysToDate(1721373, "%Y %m %d"), '1721373');
-compare(1721373, Date_Calc::DateToDays(9, 11, 0), '0000 11 09');
-compare('0000 11 10', Date_Calc::DaysToDate(1721374, "%Y %m %d"), '1721374');
-compare(1721374, Date_Calc::DateToDays(10, 11, 0), '0000 11 10');
-compare('0000 11 11', Date_Calc::DaysToDate(1721375, "%Y %m %d"), '1721375');
-compare(1721375, Date_Calc::DateToDays(11, 11, 0), '0000 11 11');
-compare('0000 11 12', Date_Calc::DaysToDate(1721376, "%Y %m %d"), '1721376');
-compare(1721376, Date_Calc::DateToDays(12, 11, 0), '0000 11 12');
-compare('0000 11 13', Date_Calc::DaysToDate(1721377, "%Y %m %d"), '1721377');
-compare(1721377, Date_Calc::DateToDays(13, 11, 0), '0000 11 13');
-compare('0000 11 14', Date_Calc::DaysToDate(1721378, "%Y %m %d"), '1721378');
-compare(1721378, Date_Calc::DateToDays(14, 11, 0), '0000 11 14');
-compare('0000 11 15', Date_Calc::DaysToDate(1721379, "%Y %m %d"), '1721379');
-compare(1721379, Date_Calc::DateToDays(15, 11, 0), '0000 11 15');
-compare('0000 11 16', Date_Calc::DaysToDate(1721380, "%Y %m %d"), '1721380');
-compare(1721380, Date_Calc::DateToDays(16, 11, 0), '0000 11 16');
-compare('0000 11 17', Date_Calc::DaysToDate(1721381, "%Y %m %d"), '1721381');
-compare(1721381, Date_Calc::DateToDays(17, 11, 0), '0000 11 17');
-compare('0000 11 18', Date_Calc::DaysToDate(1721382, "%Y %m %d"), '1721382');
-compare(1721382, Date_Calc::DateToDays(18, 11, 0), '0000 11 18');
-compare('0000 11 19', Date_Calc::DaysToDate(1721383, "%Y %m %d"), '1721383');
-compare(1721383, Date_Calc::DateToDays(19, 11, 0), '0000 11 19');
-compare('0000 11 20', Date_Calc::DaysToDate(1721384, "%Y %m %d"), '1721384');
-compare(1721384, Date_Calc::DateToDays(20, 11, 0), '0000 11 20');
-compare('0000 11 21', Date_Calc::DaysToDate(1721385, "%Y %m %d"), '1721385');
-compare(1721385, Date_Calc::DateToDays(21, 11, 0), '0000 11 21');
-compare('0000 11 22', Date_Calc::DaysToDate(1721386, "%Y %m %d"), '1721386');
-compare(1721386, Date_Calc::DateToDays(22, 11, 0), '0000 11 22');
-compare('0000 11 23', Date_Calc::DaysToDate(1721387, "%Y %m %d"), '1721387');
-compare(1721387, Date_Calc::DateToDays(23, 11, 0), '0000 11 23');
-compare('0000 11 24', Date_Calc::DaysToDate(1721388, "%Y %m %d"), '1721388');
-compare(1721388, Date_Calc::DateToDays(24, 11, 0), '0000 11 24');
-compare('0000 11 25', Date_Calc::DaysToDate(1721389, "%Y %m %d"), '1721389');
-compare(1721389, Date_Calc::DateToDays(25, 11, 0), '0000 11 25');
-compare('0000 11 26', Date_Calc::DaysToDate(1721390, "%Y %m %d"), '1721390');
-compare(1721390, Date_Calc::DateToDays(26, 11, 0), '0000 11 26');
-compare('0000 11 27', Date_Calc::DaysToDate(1721391, "%Y %m %d"), '1721391');
-compare(1721391, Date_Calc::DateToDays(27, 11, 0), '0000 11 27');
-compare('0000 11 28', Date_Calc::DaysToDate(1721392, "%Y %m %d"), '1721392');
-compare(1721392, Date_Calc::DateToDays(28, 11, 0), '0000 11 28');
-compare('0000 11 29', Date_Calc::DaysToDate(1721393, "%Y %m %d"), '1721393');
-compare(1721393, Date_Calc::DateToDays(29, 11, 0), '0000 11 29');
-compare('0000 11 30', Date_Calc::DaysToDate(1721394, "%Y %m %d"), '1721394');
-compare(1721394, Date_Calc::DateToDays(30, 11, 0), '0000 11 30');
-compare('0000 12 01', Date_Calc::DaysToDate(1721395, "%Y %m %d"), '1721395');
-compare(1721395, Date_Calc::DateToDays(1, 12, 0), '0000 12 01');
-compare('0000 12 02', Date_Calc::DaysToDate(1721396, "%Y %m %d"), '1721396');
-compare(1721396, Date_Calc::DateToDays(2, 12, 0), '0000 12 02');
-compare('0000 12 03', Date_Calc::DaysToDate(1721397, "%Y %m %d"), '1721397');
-compare(1721397, Date_Calc::DateToDays(3, 12, 0), '0000 12 03');
-compare('0000 12 04', Date_Calc::DaysToDate(1721398, "%Y %m %d"), '1721398');
-compare(1721398, Date_Calc::DateToDays(4, 12, 0), '0000 12 04');
-compare('0000 12 05', Date_Calc::DaysToDate(1721399, "%Y %m %d"), '1721399');
-compare(1721399, Date_Calc::DateToDays(5, 12, 0), '0000 12 05');
-compare('0000 12 06', Date_Calc::DaysToDate(1721400, "%Y %m %d"), '1721400');
-compare(1721400, Date_Calc::DateToDays(6, 12, 0), '0000 12 06');
-compare('0000 12 07', Date_Calc::DaysToDate(1721401, "%Y %m %d"), '1721401');
-compare(1721401, Date_Calc::DateToDays(7, 12, 0), '0000 12 07');
-compare('0000 12 08', Date_Calc::DaysToDate(1721402, "%Y %m %d"), '1721402');
-compare(1721402, Date_Calc::DateToDays(8, 12, 0), '0000 12 08');
-compare('0000 12 09', Date_Calc::DaysToDate(1721403, "%Y %m %d"), '1721403');
-compare(1721403, Date_Calc::DateToDays(9, 12, 0), '0000 12 09');
-compare('0000 12 10', Date_Calc::DaysToDate(1721404, "%Y %m %d"), '1721404');
-compare(1721404, Date_Calc::DateToDays(10, 12, 0), '0000 12 10');
-compare('0000 12 11', Date_Calc::DaysToDate(1721405, "%Y %m %d"), '1721405');
-compare(1721405, Date_Calc::DateToDays(11, 12, 0), '0000 12 11');
-compare('0000 12 12', Date_Calc::DaysToDate(1721406, "%Y %m %d"), '1721406');
-compare(1721406, Date_Calc::DateToDays(12, 12, 0), '0000 12 12');
-compare('0000 12 13', Date_Calc::DaysToDate(1721407, "%Y %m %d"), '1721407');
-compare(1721407, Date_Calc::DateToDays(13, 12, 0), '0000 12 13');
-compare('0000 12 14', Date_Calc::DaysToDate(1721408, "%Y %m %d"), '1721408');
-compare(1721408, Date_Calc::DateToDays(14, 12, 0), '0000 12 14');
-compare('0000 12 15', Date_Calc::DaysToDate(1721409, "%Y %m %d"), '1721409');
-compare(1721409, Date_Calc::DateToDays(15, 12, 0), '0000 12 15');
-compare('0000 12 16', Date_Calc::DaysToDate(1721410, "%Y %m %d"), '1721410');
-compare(1721410, Date_Calc::DateToDays(16, 12, 0), '0000 12 16');
-compare('0000 12 17', Date_Calc::DaysToDate(1721411, "%Y %m %d"), '1721411');
-compare(1721411, Date_Calc::DateToDays(17, 12, 0), '0000 12 17');
-compare('0000 12 18', Date_Calc::DaysToDate(1721412, "%Y %m %d"), '1721412');
-compare(1721412, Date_Calc::DateToDays(18, 12, 0), '0000 12 18');
-compare('0000 12 19', Date_Calc::DaysToDate(1721413, "%Y %m %d"), '1721413');
-compare(1721413, Date_Calc::DateToDays(19, 12, 0), '0000 12 19');
-compare('0000 12 20', Date_Calc::DaysToDate(1721414, "%Y %m %d"), '1721414');
-compare(1721414, Date_Calc::DateToDays(20, 12, 0), '0000 12 20');
-compare('0000 12 21', Date_Calc::DaysToDate(1721415, "%Y %m %d"), '1721415');
-compare(1721415, Date_Calc::DateToDays(21, 12, 0), '0000 12 21');
-compare('0000 12 22', Date_Calc::DaysToDate(1721416, "%Y %m %d"), '1721416');
-compare(1721416, Date_Calc::DateToDays(22, 12, 0), '0000 12 22');
-compare('0000 12 23', Date_Calc::DaysToDate(1721417, "%Y %m %d"), '1721417');
-compare(1721417, Date_Calc::DateToDays(23, 12, 0), '0000 12 23');
-compare('0000 12 24', Date_Calc::DaysToDate(1721418, "%Y %m %d"), '1721418');
-compare(1721418, Date_Calc::DateToDays(24, 12, 0), '0000 12 24');
-compare('0000 12 25', Date_Calc::DaysToDate(1721419, "%Y %m %d"), '1721419');
-compare(1721419, Date_Calc::DateToDays(25, 12, 0), '0000 12 25');
-compare('0000 12 26', Date_Calc::DaysToDate(1721420, "%Y %m %d"), '1721420');
-compare(1721420, Date_Calc::DateToDays(26, 12, 0), '0000 12 26');
-compare('0000 12 27', Date_Calc::DaysToDate(1721421, "%Y %m %d"), '1721421');
-compare(1721421, Date_Calc::DateToDays(27, 12, 0), '0000 12 27');
-compare('0000 12 28', Date_Calc::DaysToDate(1721422, "%Y %m %d"), '1721422');
-compare(1721422, Date_Calc::DateToDays(28, 12, 0), '0000 12 28');
-compare('0000 12 29', Date_Calc::DaysToDate(1721423, "%Y %m %d"), '1721423');
-compare(1721423, Date_Calc::DateToDays(29, 12, 0), '0000 12 29');
-compare('0000 12 30', Date_Calc::DaysToDate(1721424, "%Y %m %d"), '1721424');
-compare(1721424, Date_Calc::DateToDays(30, 12, 0), '0000 12 30');
-compare('0000 12 31', Date_Calc::DaysToDate(1721425, "%Y %m %d"), '1721425');
-compare(1721425, Date_Calc::DateToDays(31, 12, 0), '0000 12 31');
-compare('0001 01 01', Date_Calc::DaysToDate(1721426, "%Y %m %d"), '1721426');
-compare(1721426, Date_Calc::DateToDays(1, 1, 1), '0001 01 01');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests Date:round() and Date::trunc()
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("19871109T16:12:24.171878000");
-
-$od = new Date($date);
-$od->round(-6);
-compare('0000-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-6 (1)');
-$od = new Date($date);
-$od->round(-5);
-compare('2000-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-5 (1)');
-$od = new Date($date);
-$od->round(-4);
-compare('2000-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-4 (1)');
-$od = new Date($date);
-$od->round(-3);
-compare('1990-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-3 (1)');
-$od = new Date($date);
-$od->round(-2);
-compare('1988-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-2 (1)');
-$od = new Date($date);
-$od->round(-1);
-compare('1987-11-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-1 (1)');
-$od = new Date($date);
-$od->round(0);
-compare('1987-11-10 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '0 (1)');
-$od = new Date($date);
-$od->round(1);
-compare('1987-11-09 16.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '1 (1)');
-$od = new Date($date);
-$od->round(2);
-compare('1987-11-09 16.10.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '2 (1)');
-$od = new Date($date);
-$od->round(3);
-compare('1987-11-09 16.12.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '3 (1)');
-$od = new Date($date);
-$od->round(4);
-compare('1987-11-09 16.12.20.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '4 (1)');
-$od = new Date($date);
-$od->round(5);
-compare('1987-11-09 16.12.24.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '5 (1)');
-$od = new Date($date);
-$od->round(6);
-compare('1987-11-09 16.12.24.200000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '6 (1)');
-$od = new Date($date);
-$od->round(7);
-compare('1987-11-09 16.12.24.170000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '7 (1)');
-$od = new Date($date);
-$od->round(8);
-compare('1987-11-09 16.12.24.172000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '8 (1)');
-$od = new Date($date);
-$od->round(9);
-compare('1987-11-09 16.12.24.171900000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '9 (1)');
-$od = new Date($date);
-$od->round(10);
-compare('1987-11-09 16.12.24.171880000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '10 (1)');
-$od = new Date($date);
-$od->round(11);
-compare('1987-11-09 16.12.24.171878000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '11 (1)');
-$od = new Date($date);
-$od->round(12);
-compare('1987-11-09 16.12.24.171878000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '12 (1)');
-$od = new Date($date);
-$od->round(13);
-compare('1987-11-09 16.12.24.171878000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '13 (1)');
-$od = new Date($date);
-$od->round(14);
-compare('1987-11-09 16.12.24.171878000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '14 (1)');
-
-$od = new Date($date);
-$od->trunc(-6);
-compare('0000-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-6 (1)');
-$od = new Date($date);
-$od->trunc(-5);
-compare('1000-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-5 (1)');
-$od = new Date($date);
-$od->trunc(-4);
-compare('1900-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-4 (1)');
-$od = new Date($date);
-$od->trunc(-3);
-compare('1980-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-3 (1)');
-$od = new Date($date);
-$od->trunc(-2);
-compare('1987-00-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-2 (1)');
-$od = new Date($date);
-$od->trunc(-1);
-compare('1987-11-00 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '-1 (1)');
-$od = new Date($date);
-$od->trunc(0);
-compare('1987-11-09 00.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '0 (1)');
-$od = new Date($date);
-$od->trunc(1);
-compare('1987-11-09 16.00.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '1 (1)');
-$od = new Date($date);
-$od->trunc(2);
-compare('1987-11-09 16.10.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '2 (1)');
-$od = new Date($date);
-$od->trunc(3);
-compare('1987-11-09 16.12.00.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '3 (1)');
-$od = new Date($date);
-$od->trunc(4);
-compare('1987-11-09 16.12.20.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '4 (1)');
-$od = new Date($date);
-$od->trunc(5);
-compare('1987-11-09 16.12.24.000000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '5 (1)');
-$od = new Date($date);
-$od->trunc(6);
-compare('1987-11-09 16.12.24.100000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '6 (1)');
-$od = new Date($date);
-$od->trunc(7);
-compare('1987-11-09 16.12.24.170000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '7 (1)');
-$od = new Date($date);
-$od->trunc(8);
-compare('1987-11-09 16.12.24.171000000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '8 (1)');
-$od = new Date($date);
-$od->trunc(9);
-compare('1987-11-09 16.12.24.171800000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '9 (1)');
-$od = new Date($date);
-$od->trunc(10);
-compare('1987-11-09 16.12.24.171870000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '10 (1)');
-$od = new Date($date);
-$od->trunc(11);
-compare('1987-11-09 16.12.24.171878000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '11 (1)');
-$od = new Date($date);
-$od->trunc(12);
-compare('1987-11-09 16.12.24.171878000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '12 (1)');
-$od = new Date($date);
-$od->trunc(13);
-compare('1987-11-09 16.12.24.171878000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '13 (1)');
-$od = new Date($date);
-$od->trunc(14);
-compare('1987-11-09 16.12.24.171878000', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS.FFFFFFFFF'), '14 (1)');
-
-
-$od = new Date("19870709T12:00:00");
-$od->round(DATE_PRECISION_DAY);
-compare('1987-07-10 00.00.00', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS'), 'Midday test 1');
-$od = new Date("19870709T11:59:59.999999");
-$od->round(DATE_PRECISION_DAY);
-compare('1987-07-09 00.00.00', $od->formatLikeSQL('YYYY-MM-DD HH.MI.SS'), 'Midday test 2');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc day of week functions
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-define('DATE_CALC_BEGIN_WEEKDAY', 0);
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("1998-12-24 00:00:00Z");
-
-// First day of week is Sunday
-//
-
-// Thursday, 24th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-8)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-8)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (-8)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-8)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-7)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-7)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (-7)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-7)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-6)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-6)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (-6)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-6)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-5)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-5)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-5)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-5)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-4)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-4)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-4)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-4)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-3)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-3)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-3)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-3)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-2)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-2)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1998
-compare('53', $date->formatLikeSQL('WW'), 'WW (-1)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-1)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (0)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (0)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (0)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (0)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (1)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (1)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (2)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (2)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (2)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (3)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (3)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (3)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (3)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (4)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (4)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (4)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (4)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (5)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (5)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (5)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (5)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (6)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (6)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (6)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (6)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (7)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (7)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (7)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (7)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (7)');
-
-$date->addDays(1);
-
-// Saturday, 9th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (8)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (8)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (8)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (8)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (8)');
-
-$date->addDays(1);
-
-// Sunday, 10th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (9)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (9)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (9)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (9)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (9)');
-
-$date->addDays(1);
-
-// Monday, 11th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (10)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (10)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (10)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (10)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (10)');
-
-$date->addDays(1);
-
-// Tuesday, 12th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (11)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (11)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (11)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (11)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (11)');
-
-$date->addDays(1);
-
-// Wednesday, 13th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (12)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (12)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (12)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (12)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (12)');
-
-$date->addDays(1);
-
-// Thursday, 14th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (13)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (13)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (13)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (13)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (13)');
-
-$date->addDays(1);
-
-// Friday, 15th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (14)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (14)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (14)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (14)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (14)');
-
-$date->addDays(1);
-
-// Saturday, 16th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (15)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (15)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (15)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (15)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (15)');
-
-$date->addDays(1);
-
-// Sunday, 17th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (16)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (16)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (16)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (16)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (16)');
-
-$date->addDays(1);
-
-// Monday, 18th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (17)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (17)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (17)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (17)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (17)');
-
-$date->addDays(1);
-
-// Tuesday, 19th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (18)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (18)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (18)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (18)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (18)');
-
-$date->addDays(1);
-
-// Wednesday, 20th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (19)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (19)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (19)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (19)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (19)');
-
-$date->addDays(1);
-
-// Thursday, 21st January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (20)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (20)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (20)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (20)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (20)');
-
-$date->addDays(1);
-
-// Friday, 22nd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (21)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (21)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (21)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (21)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (21)');
-
-$date->addDays(1);
-
-// Saturday, 23rd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (22)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (22)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (22)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (22)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (22)');
-
-$date->addDays(1);
-
-// Sunday, 24th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (23)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (23)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (23)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (23)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (23)');
-
-$date->addDays(1);
-
-// Monday, 25th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (24)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (24)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (24)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (24)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (24)');
-
-$date->addDays(1);
-
-// Tuesday, 26th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (25)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (25)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (25)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (25)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (25)');
-
-$date->addDays(1);
-
-// Wednesday, 27th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (26)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (26)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (26)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (26)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (26)');
-
-$date->addDays(1);
-
-// Thursday, 28th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (27)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (27)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (27)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (27)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (27)');
-
-$date->addDays(1);
-
-// Friday, 29th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (28)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (28)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (28)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (28)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (28)');
-
-$date->addDays(1);
-
-// Saturday, 30th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (29)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (29)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (29)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (29)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (29)');
-
-$date->addDays(1);
-
-// Sunday, 31st January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (30)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (30)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (30)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (30)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (30)');
-
-$date->addDays(1);
-
-// Monday, 1st February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (31)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (31)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (31)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (31)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (31)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (32)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (32)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (32)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (32)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (32)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (33)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (33)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (33)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (33)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (33)');
-
-$date->addDays(1);
-
-// Thursday, 4th February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (34)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (34)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (34)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (34)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (34)');
-
-$date->addDays(1);
-
-// Friday, 5th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (35)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (35)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (35)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (35)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (35)');
-
-$date->addDays(1);
-
-// Saturday, 6th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (36)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (36)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (36)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (36)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (36)');
-
-$date->addDays(1);
-
-// Sunday, 7th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (37)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (37)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (37)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (37)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (37)');
-
-$date->addDays(1);
-
-// Monday, 8th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (38)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (38)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (38)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (38)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (38)');
-
-$date->addDays(1);
-
-// Tuesday, 9th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (39)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (39)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (39)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (39)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (39)');
-
-$date->addDays(1);
-
-// Wednesday, 10th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (40)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (40)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (40)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (40)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (40)');
-
-$date->addDays(1);
-
-// Thursday, 11th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (41)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (41)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (41)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (41)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (41)');
-
-$date->addDays(1);
-
-// Friday, 12th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (42)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (42)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (42)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (42)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (42)');
-
-$date->addDays(1);
-
-// Saturday, 13th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (43)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (43)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (43)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (43)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (43)');
-
-$date->addDays(1);
-
-// Sunday, 14th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (44)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (44)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (44)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (44)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (44)');
-
-$date->addDays(1);
-
-// Monday, 15th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (45)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (45)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (45)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (45)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (45)');
-
-$date->addDays(1);
-
-// Tuesday, 16th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (46)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (46)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (46)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (46)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (46)');
-
-$date->addDays(1);
-
-// Wednesday, 17th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (47)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (47)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (47)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (47)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (47)');
-
-$date->addDays(1);
-
-// Thursday, 18th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (48)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (48)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (48)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (48)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (48)');
-
-$date->addDays(1);
-
-// Friday, 19th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (49)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (49)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (49)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (49)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (49)');
-
-$date->addDays(1);
-
-// Saturday, 20th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (50)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (50)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (50)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (50)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (50)');
-
-$date->addDays(1);
-
-// Sunday, 21st February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (51)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (51)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (51)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (51)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (51)');
-
-$date->addDays(1);
-
-// Monday, 22nd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (52)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (52)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (52)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (52)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (52)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (53)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (53)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (53)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (53)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (53)');
-
-$date->addDays(1);
-
-// Wednesday, 24th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (54)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (54)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (54)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (54)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (54)');
-
-$date->addDays(1);
-
-// Thursday, 25th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (55)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (55)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (55)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (55)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (55)');
-
-$date->addDays(1);
-
-// Friday, 26th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (56)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (56)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (56)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (56)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (56)');
-
-$date->addDays(1);
-
-// Saturday, 27th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (57)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (57)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (57)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (57)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (57)');
-
-$date->addDays(1);
-
-// Sunday, 28th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (58)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (58)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (58)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (58)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (58)');
-
-$date->addDays(1);
-
-// Monday, 1st March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (59)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (59)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (59)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (59)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (59)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (60)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (60)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (60)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (60)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (60)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (61)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (61)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (61)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (61)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (61)');
-
-$date->addDays(1);
-
-// Thursday, 4th March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (62)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (62)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (62)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (62)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (62)');
-
-$date->addDays(1);
-
-// Friday, 5th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (63)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (63)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (63)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (63)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (63)');
-
-$date->addDays(1);
-
-// Saturday, 6th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (64)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (64)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (64)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (64)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (64)');
-
-$date->addDays(1);
-
-// Sunday, 7th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (65)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (65)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (65)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (65)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (65)');
-
-$date->addDays(1);
-
-// Monday, 8th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (66)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (66)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (66)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (66)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (66)');
-
-$date->addDays(1);
-
-// Tuesday, 9th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (67)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (67)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (67)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (67)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (67)');
-
-$date->addDays(1);
-
-// Wednesday, 10th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (68)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (68)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (68)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (68)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (68)');
-
-$date->addDays(1);
-
-// Thursday, 11th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (69)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (69)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (69)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (69)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (69)');
-
-$date->addDays(1);
-
-// Friday, 12th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (70)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (70)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (70)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (70)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (70)');
-
-$date->addDays(1);
-
-// Saturday, 13th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (71)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (71)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (71)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (71)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (71)');
-
-$date->addDays(1);
-
-// Sunday, 14th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (72)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (72)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (72)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (72)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (72)');
-
-$date->addDays(1);
-
-// Monday, 15th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (73)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (73)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (73)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (73)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (73)');
-
-$date->addDays(1);
-
-// Tuesday, 16th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (74)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (74)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (74)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (74)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (74)');
-
-$date->addDays(1);
-
-// Wednesday, 17th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (75)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (75)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (75)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (75)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (75)');
-
-$date->addDays(1);
-
-// Thursday, 18th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (76)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (76)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (76)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (76)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (76)');
-
-$date->addDays(1);
-
-// Friday, 19th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (77)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (77)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (77)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (77)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (77)');
-
-$date->addDays(1);
-
-// Saturday, 20th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (78)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (78)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (78)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (78)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (78)');
-
-$date->addDays(1);
-
-// Sunday, 21st March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (79)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (79)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (79)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (79)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (79)');
-
-$date->addDays(1);
-
-// Monday, 22nd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (80)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (80)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (80)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (80)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (80)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (81)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (81)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (81)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (81)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (81)');
-
-$date->addDays(1);
-
-// Wednesday, 24th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (82)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (82)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (82)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (82)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (82)');
-
-$date->addDays(1);
-
-// Thursday, 25th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (83)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (83)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (83)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (83)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (83)');
-
-$date->addDays(1);
-
-// Friday, 26th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (84)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (84)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (84)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (84)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (84)');
-
-$date->addDays(1);
-
-// Saturday, 27th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (85)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (85)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (85)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (85)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (85)');
-
-$date->addDays(1);
-
-// Sunday, 28th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (86)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (86)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (86)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (86)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (86)');
-
-$date->addDays(1);
-
-// Monday, 29th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (87)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (87)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (87)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (87)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (87)');
-
-$date->addDays(1);
-
-// Tuesday, 30th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (88)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (88)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (88)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (88)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (88)');
-
-$date->addDays(1);
-
-// Wednesday, 31st March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (89)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (89)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (89)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (89)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (89)');
-
-$date->addDays(1);
-
-// Thursday, 1st April 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (90)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (90)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (90)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (90)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (90)');
-
-$date->addDays(1);
-
-// Friday, 2nd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (91)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (91)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (91)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (91)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (91)');
-
-$date->addDays(1);
-
-// Saturday, 3rd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (92)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (92)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (92)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (92)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (92)');
-
-$date->addDays(1);
-
-// Sunday, 4th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (93)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (93)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (93)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (93)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (93)');
-
-$date->addDays(1);
-
-// Monday, 5th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (94)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (94)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (94)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (94)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (94)');
-
-$date->addDays(1);
-
-// Tuesday, 6th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (95)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (95)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (95)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (95)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (95)');
-
-$date->addDays(1);
-
-// Wednesday, 7th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (96)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (96)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (96)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (96)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (96)');
-
-$date->addDays(1);
-
-// Thursday, 8th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (97)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (97)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (97)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (97)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (97)');
-
-$date->addDays(1);
-
-// Friday, 9th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (98)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (98)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (98)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (98)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (98)');
-
-$date->addDays(1);
-
-// Saturday, 10th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (99)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (99)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (99)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (99)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (99)');
-
-$date->addDays(1);
-
-// Sunday, 11th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (100)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (100)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (100)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (100)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (100)');
-
-$date->addDays(1);
-
-// Monday, 12th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (101)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (101)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (101)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (101)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (101)');
-
-$date->addDays(1);
-
-// Tuesday, 13th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (102)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (102)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (102)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (102)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (102)');
-
-$date->addDays(1);
-
-// Wednesday, 14th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (103)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (103)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (103)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (103)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (103)');
-
-$date->addDays(1);
-
-// Thursday, 15th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (104)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (104)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (104)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (104)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (104)');
-
-$date->addDays(1);
-
-// Friday, 16th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (105)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (105)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (105)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (105)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (105)');
-
-$date->addDays(1);
-
-// Saturday, 17th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (106)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (106)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (106)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (106)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (106)');
-
-$date->addDays(1);
-
-// Sunday, 18th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (107)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (107)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (107)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (107)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (107)');
-
-$date->addDays(1);
-
-// Monday, 19th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (108)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (108)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (108)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (108)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (108)');
-
-$date->addDays(1);
-
-// Tuesday, 20th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (109)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (109)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (109)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (109)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (109)');
-
-$date->addDays(1);
-
-// Wednesday, 21st April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (110)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (110)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (110)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (110)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (110)');
-
-$date->addDays(1);
-
-// Thursday, 22nd April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (111)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (111)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (111)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (111)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (111)');
-
-$date->addDays(1);
-
-// Friday, 23rd April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (112)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (112)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (112)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (112)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (112)');
-
-$date->addDays(1);
-
-// Saturday, 24th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (113)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (113)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (113)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (113)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (113)');
-
-$date->addDays(1);
-
-// Sunday, 25th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (114)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (114)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (114)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (114)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (114)');
-
-$date->addDays(1);
-
-// Monday, 26th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (115)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (115)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (115)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (115)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (115)');
-
-$date->addDays(1);
-
-// Tuesday, 27th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (116)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (116)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (116)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (116)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (116)');
-
-$date->addDays(1);
-
-// Wednesday, 28th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (117)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (117)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (117)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (117)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (117)');
-
-$date->addDays(1);
-
-// Thursday, 29th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (118)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (118)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (118)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (118)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (118)');
-
-$date->addDays(1);
-
-// Friday, 30th April 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (119)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (119)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (119)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (119)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (119)');
-
-$date->addDays(1);
-
-// Saturday, 1st May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (120)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (120)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (120)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (120)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (120)');
-
-$date->addDays(1);
-
-// Sunday, 2nd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (121)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (121)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (121)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (121)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (121)');
-
-$date->addDays(1);
-
-// Monday, 3rd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (122)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (122)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (122)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (122)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (122)');
-
-$date->addDays(1);
-
-// Tuesday, 4th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (123)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (123)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (123)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (123)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (123)');
-
-$date->addDays(1);
-
-// Wednesday, 5th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (124)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (124)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (124)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (124)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (124)');
-
-$date->addDays(1);
-
-// Thursday, 6th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (125)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (125)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (125)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (125)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (125)');
-
-$date->addDays(1);
-
-// Friday, 7th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (126)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (126)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (126)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (126)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (126)');
-
-$date->addDays(1);
-
-// Saturday, 8th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (127)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (127)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (127)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (127)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (127)');
-
-$date->addDays(1);
-
-// Sunday, 9th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (128)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (128)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (128)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (128)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (128)');
-
-$date->addDays(1);
-
-// Monday, 10th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (129)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (129)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (129)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (129)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (129)');
-
-$date->addDays(1);
-
-// Tuesday, 11th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (130)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (130)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (130)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (130)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (130)');
-
-$date->addDays(1);
-
-// Wednesday, 12th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (131)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (131)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (131)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (131)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (131)');
-
-$date->addDays(1);
-
-// Thursday, 13th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (132)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (132)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (132)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (132)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (132)');
-
-$date->addDays(1);
-
-// Friday, 14th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (133)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (133)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (133)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (133)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (133)');
-
-$date->addDays(1);
-
-// Saturday, 15th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (134)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (134)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (134)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (134)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (134)');
-
-$date->addDays(1);
-
-// Sunday, 16th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (135)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (135)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (135)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (135)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (135)');
-
-$date->addDays(1);
-
-// Monday, 17th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (136)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (136)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (136)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (136)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (136)');
-
-$date->addDays(1);
-
-// Tuesday, 18th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (137)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (137)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (137)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (137)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (137)');
-
-$date->addDays(1);
-
-// Wednesday, 19th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (138)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (138)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (138)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (138)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (138)');
-
-$date->addDays(1);
-
-// Thursday, 20th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (139)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (139)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (139)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (139)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (139)');
-
-$date->addDays(1);
-
-// Friday, 21st May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (140)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (140)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (140)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (140)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (140)');
-
-$date->addDays(1);
-
-// Saturday, 22nd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (141)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (141)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (141)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (141)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (141)');
-
-$date->addDays(1);
-
-// Sunday, 23rd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (142)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (142)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (142)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (142)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (142)');
-
-$date->addDays(1);
-
-// Monday, 24th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (143)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (143)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (143)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (143)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (143)');
-
-$date->addDays(1);
-
-// Tuesday, 25th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (144)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (144)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (144)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (144)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (144)');
-
-$date->addDays(1);
-
-// Wednesday, 26th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (145)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (145)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (145)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (145)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (145)');
-
-$date->addDays(1);
-
-// Thursday, 27th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (146)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (146)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (146)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (146)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (146)');
-
-$date->addDays(1);
-
-// Friday, 28th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (147)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (147)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (147)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (147)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (147)');
-
-$date->addDays(1);
-
-// Saturday, 29th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (148)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (148)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (148)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (148)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (148)');
-
-$date->addDays(1);
-
-// Sunday, 30th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (149)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (149)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (149)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (149)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (149)');
-
-$date->addDays(1);
-
-// Monday, 31st May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (150)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (150)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (150)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (150)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (150)');
-
-$date->addDays(1);
-
-// Tuesday, 1st June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (151)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (151)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (151)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (151)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (151)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (152)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (152)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (152)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (152)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (152)');
-
-$date->addDays(1);
-
-// Thursday, 3rd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (153)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (153)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (153)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (153)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (153)');
-
-$date->addDays(1);
-
-// Friday, 4th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (154)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (154)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (154)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (154)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (154)');
-
-$date->addDays(1);
-
-// Saturday, 5th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (155)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (155)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (155)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (155)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (155)');
-
-$date->addDays(1);
-
-// Sunday, 6th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (156)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (156)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (156)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (156)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (156)');
-
-$date->addDays(1);
-
-// Monday, 7th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (157)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (157)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (157)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (157)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (157)');
-
-$date->addDays(1);
-
-// Tuesday, 8th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (158)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (158)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (158)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (158)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (158)');
-
-$date->addDays(1);
-
-// Wednesday, 9th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (159)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (159)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (159)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (159)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (159)');
-
-$date->addDays(1);
-
-// Thursday, 10th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (160)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (160)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (160)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (160)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (160)');
-
-$date->addDays(1);
-
-// Friday, 11th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (161)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (161)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (161)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (161)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (161)');
-
-$date->addDays(1);
-
-// Saturday, 12th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (162)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (162)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (162)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (162)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (162)');
-
-$date->addDays(1);
-
-// Sunday, 13th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (163)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (163)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (163)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (163)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (163)');
-
-$date->addDays(1);
-
-// Monday, 14th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (164)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (164)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (164)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (164)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (164)');
-
-$date->addDays(1);
-
-// Tuesday, 15th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (165)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (165)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (165)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (165)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (165)');
-
-$date->addDays(1);
-
-// Wednesday, 16th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (166)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (166)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (166)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (166)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (166)');
-
-$date->addDays(1);
-
-// Thursday, 17th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (167)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (167)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (167)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (167)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (167)');
-
-$date->addDays(1);
-
-// Friday, 18th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (168)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (168)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (168)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (168)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (168)');
-
-$date->addDays(1);
-
-// Saturday, 19th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (169)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (169)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (169)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (169)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (169)');
-
-$date->addDays(1);
-
-// Sunday, 20th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (170)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (170)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (170)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (170)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (170)');
-
-$date->addDays(1);
-
-// Monday, 21st June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (171)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (171)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (171)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (171)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (171)');
-
-$date->addDays(1);
-
-// Tuesday, 22nd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (172)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (172)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (172)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (172)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (172)');
-
-$date->addDays(1);
-
-// Wednesday, 23rd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (173)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (173)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (173)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (173)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (173)');
-
-$date->addDays(1);
-
-// Thursday, 24th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (174)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (174)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (174)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (174)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (174)');
-
-$date->addDays(1);
-
-// Friday, 25th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (175)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (175)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (175)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (175)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (175)');
-
-$date->addDays(1);
-
-// Saturday, 26th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (176)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (176)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (176)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (176)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (176)');
-
-$date->addDays(1);
-
-// Sunday, 27th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (177)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (177)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (177)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (177)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (177)');
-
-$date->addDays(1);
-
-// Monday, 28th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (178)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (178)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (178)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (178)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (178)');
-
-$date->addDays(1);
-
-// Tuesday, 29th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (179)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (179)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (179)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (179)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (179)');
-
-$date->addDays(1);
-
-// Wednesday, 30th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (180)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (180)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (180)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (180)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (180)');
-
-$date->addDays(1);
-
-// Thursday, 1st July 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (181)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (181)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (181)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (181)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (181)');
-
-$date->addDays(1);
-
-// Friday, 2nd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (182)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (182)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (182)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (182)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (182)');
-
-$date->addDays(1);
-
-// Saturday, 3rd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (183)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (183)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (183)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (183)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (183)');
-
-$date->addDays(1);
-
-// Sunday, 4th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (184)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (184)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (184)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (184)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (184)');
-
-$date->addDays(1);
-
-// Monday, 5th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (185)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (185)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (185)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (185)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (185)');
-
-$date->addDays(1);
-
-// Tuesday, 6th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (186)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (186)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (186)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (186)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (186)');
-
-$date->addDays(1);
-
-// Wednesday, 7th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (187)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (187)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (187)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (187)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (187)');
-
-$date->addDays(1);
-
-// Thursday, 8th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (188)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (188)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (188)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (188)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (188)');
-
-$date->addDays(1);
-
-// Friday, 9th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (189)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (189)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (189)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (189)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (189)');
-
-$date->addDays(1);
-
-// Saturday, 10th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (190)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (190)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (190)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (190)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (190)');
-
-$date->addDays(1);
-
-// Sunday, 11th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (191)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (191)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (191)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (191)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (191)');
-
-$date->addDays(1);
-
-// Monday, 12th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (192)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (192)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (192)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (192)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (192)');
-
-$date->addDays(1);
-
-// Tuesday, 13th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (193)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (193)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (193)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (193)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (193)');
-
-$date->addDays(1);
-
-// Wednesday, 14th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (194)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (194)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (194)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (194)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (194)');
-
-$date->addDays(1);
-
-// Thursday, 15th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (195)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (195)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (195)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (195)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (195)');
-
-$date->addDays(1);
-
-// Friday, 16th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (196)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (196)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (196)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (196)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (196)');
-
-$date->addDays(1);
-
-// Saturday, 17th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (197)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (197)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (197)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (197)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (197)');
-
-$date->addDays(1);
-
-// Sunday, 18th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (198)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (198)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (198)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (198)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (198)');
-
-$date->addDays(1);
-
-// Monday, 19th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (199)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (199)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (199)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (199)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (199)');
-
-$date->addDays(1);
-
-// Tuesday, 20th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (200)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (200)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (200)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (200)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (200)');
-
-$date->addDays(1);
-
-// Wednesday, 21st July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (201)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (201)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (201)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (201)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (201)');
-
-$date->addDays(1);
-
-// Thursday, 22nd July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (202)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (202)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (202)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (202)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (202)');
-
-$date->addDays(1);
-
-// Friday, 23rd July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (203)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (203)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (203)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (203)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (203)');
-
-$date->addDays(1);
-
-// Saturday, 24th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (204)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (204)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (204)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (204)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (204)');
-
-$date->addDays(1);
-
-// Sunday, 25th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (205)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (205)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (205)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (205)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (205)');
-
-$date->addDays(1);
-
-// Monday, 26th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (206)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (206)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (206)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (206)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (206)');
-
-$date->addDays(1);
-
-// Tuesday, 27th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (207)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (207)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (207)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (207)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (207)');
-
-$date->addDays(1);
-
-// Wednesday, 28th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (208)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (208)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (208)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (208)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (208)');
-
-$date->addDays(1);
-
-// Thursday, 29th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (209)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (209)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (209)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (209)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (209)');
-
-$date->addDays(1);
-
-// Friday, 30th July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (210)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (210)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (210)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (210)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (210)');
-
-$date->addDays(1);
-
-// Saturday, 31st July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (211)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (211)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (211)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (211)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (211)');
-
-$date->addDays(1);
-
-// Sunday, 1st August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (212)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (212)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (212)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (212)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (212)');
-
-$date->addDays(1);
-
-// Monday, 2nd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (213)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (213)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (213)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (213)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (213)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (214)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (214)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (214)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (214)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (214)');
-
-$date->addDays(1);
-
-// Wednesday, 4th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (215)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (215)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (215)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (215)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (215)');
-
-$date->addDays(1);
-
-// Thursday, 5th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (216)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (216)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (216)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (216)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (216)');
-
-$date->addDays(1);
-
-// Friday, 6th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (217)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (217)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (217)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (217)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (217)');
-
-$date->addDays(1);
-
-// Saturday, 7th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (218)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (218)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (218)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (218)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (218)');
-
-$date->addDays(1);
-
-// Sunday, 8th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (219)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (219)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (219)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (219)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (219)');
-
-$date->addDays(1);
-
-// Monday, 9th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (220)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (220)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (220)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (220)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (220)');
-
-$date->addDays(1);
-
-// Tuesday, 10th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (221)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (221)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (221)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (221)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (221)');
-
-$date->addDays(1);
-
-// Wednesday, 11th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (222)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (222)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (222)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (222)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (222)');
-
-$date->addDays(1);
-
-// Thursday, 12th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (223)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (223)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (223)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (223)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (223)');
-
-$date->addDays(1);
-
-// Friday, 13th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (224)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (224)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (224)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (224)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (224)');
-
-$date->addDays(1);
-
-// Saturday, 14th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (225)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (225)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (225)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (225)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (225)');
-
-$date->addDays(1);
-
-// Sunday, 15th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (226)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (226)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (226)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (226)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (226)');
-
-$date->addDays(1);
-
-// Monday, 16th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (227)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (227)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (227)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (227)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (227)');
-
-$date->addDays(1);
-
-// Tuesday, 17th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (228)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (228)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (228)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (228)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (228)');
-
-$date->addDays(1);
-
-// Wednesday, 18th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (229)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (229)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (229)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (229)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (229)');
-
-$date->addDays(1);
-
-// Thursday, 19th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (230)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (230)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (230)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (230)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (230)');
-
-$date->addDays(1);
-
-// Friday, 20th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (231)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (231)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (231)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (231)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (231)');
-
-$date->addDays(1);
-
-// Saturday, 21st August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (232)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (232)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (232)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (232)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (232)');
-
-$date->addDays(1);
-
-// Sunday, 22nd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (233)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (233)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (233)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (233)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (233)');
-
-$date->addDays(1);
-
-// Monday, 23rd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (234)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (234)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (234)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (234)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (234)');
-
-$date->addDays(1);
-
-// Tuesday, 24th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (235)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (235)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (235)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (235)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (235)');
-
-$date->addDays(1);
-
-// Wednesday, 25th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (236)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (236)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (236)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (236)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (236)');
-
-$date->addDays(1);
-
-// Thursday, 26th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (237)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (237)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (237)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (237)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (237)');
-
-$date->addDays(1);
-
-// Friday, 27th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (238)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (238)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (238)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (238)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (238)');
-
-$date->addDays(1);
-
-// Saturday, 28th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (239)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (239)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (239)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (239)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (239)');
-
-$date->addDays(1);
-
-// Sunday, 29th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (240)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (240)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (240)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (240)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (240)');
-
-$date->addDays(1);
-
-// Monday, 30th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (241)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (241)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (241)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (241)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (241)');
-
-$date->addDays(1);
-
-// Tuesday, 31st August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (242)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (242)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (242)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (242)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (242)');
-
-$date->addDays(1);
-
-// Wednesday, 1st September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (243)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (243)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (243)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (243)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (243)');
-
-$date->addDays(1);
-
-// Thursday, 2nd September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (244)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (244)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (244)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (244)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (244)');
-
-$date->addDays(1);
-
-// Friday, 3rd September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (245)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (245)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (245)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (245)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (245)');
-
-$date->addDays(1);
-
-// Saturday, 4th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (246)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (246)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (246)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (246)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (246)');
-
-$date->addDays(1);
-
-// Sunday, 5th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (247)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (247)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (247)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (247)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (247)');
-
-$date->addDays(1);
-
-// Monday, 6th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (248)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (248)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (248)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (248)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (248)');
-
-$date->addDays(1);
-
-// Tuesday, 7th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (249)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (249)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (249)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (249)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (249)');
-
-$date->addDays(1);
-
-// Wednesday, 8th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (250)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (250)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (250)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (250)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (250)');
-
-$date->addDays(1);
-
-// Thursday, 9th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (251)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (251)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (251)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (251)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (251)');
-
-$date->addDays(1);
-
-// Friday, 10th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (252)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (252)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (252)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (252)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (252)');
-
-$date->addDays(1);
-
-// Saturday, 11th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (253)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (253)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (253)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (253)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (253)');
-
-$date->addDays(1);
-
-// Sunday, 12th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (254)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (254)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (254)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (254)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (254)');
-
-$date->addDays(1);
-
-// Monday, 13th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (255)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (255)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (255)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (255)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (255)');
-
-$date->addDays(1);
-
-// Tuesday, 14th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (256)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (256)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (256)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (256)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (256)');
-
-$date->addDays(1);
-
-// Wednesday, 15th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (257)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (257)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (257)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (257)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (257)');
-
-$date->addDays(1);
-
-// Thursday, 16th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (258)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (258)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (258)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (258)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (258)');
-
-$date->addDays(1);
-
-// Friday, 17th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (259)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (259)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (259)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (259)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (259)');
-
-$date->addDays(1);
-
-// Saturday, 18th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (260)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (260)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (260)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (260)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (260)');
-
-$date->addDays(1);
-
-// Sunday, 19th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (261)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (261)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (261)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (261)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (261)');
-
-$date->addDays(1);
-
-// Monday, 20th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (262)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (262)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (262)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (262)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (262)');
-
-$date->addDays(1);
-
-// Tuesday, 21st September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (263)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (263)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (263)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (263)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (263)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (264)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (264)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (264)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (264)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (264)');
-
-$date->addDays(1);
-
-// Thursday, 23rd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (265)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (265)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (265)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (265)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (265)');
-
-$date->addDays(1);
-
-// Friday, 24th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (266)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (266)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (266)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (266)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (266)');
-
-$date->addDays(1);
-
-// Saturday, 25th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (267)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (267)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (267)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (267)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (267)');
-
-$date->addDays(1);
-
-// Sunday, 26th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (268)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (268)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (268)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (268)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (268)');
-
-$date->addDays(1);
-
-// Monday, 27th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (269)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (269)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (269)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (269)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (269)');
-
-$date->addDays(1);
-
-// Tuesday, 28th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (270)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (270)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (270)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (270)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (270)');
-
-$date->addDays(1);
-
-// Wednesday, 29th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (271)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (271)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (271)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (271)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (271)');
-
-$date->addDays(1);
-
-// Thursday, 30th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (272)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (272)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (272)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (272)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (272)');
-
-$date->addDays(1);
-
-// Friday, 1st October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (273)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (273)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (273)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (273)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (273)');
-
-$date->addDays(1);
-
-// Saturday, 2nd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (274)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (274)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (274)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (274)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (274)');
-
-$date->addDays(1);
-
-// Sunday, 3rd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (275)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (275)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (275)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (275)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (275)');
-
-$date->addDays(1);
-
-// Monday, 4th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (276)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (276)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (276)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (276)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (276)');
-
-$date->addDays(1);
-
-// Tuesday, 5th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (277)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (277)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (277)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (277)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (277)');
-
-$date->addDays(1);
-
-// Wednesday, 6th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (278)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (278)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (278)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (278)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (278)');
-
-$date->addDays(1);
-
-// Thursday, 7th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (279)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (279)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (279)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (279)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (279)');
-
-$date->addDays(1);
-
-// Friday, 8th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (280)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (280)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (280)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (280)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (280)');
-
-$date->addDays(1);
-
-// Saturday, 9th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (281)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (281)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (281)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (281)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (281)');
-
-$date->addDays(1);
-
-// Sunday, 10th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (282)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (282)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (282)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (282)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (282)');
-
-$date->addDays(1);
-
-// Monday, 11th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (283)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (283)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (283)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (283)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (283)');
-
-$date->addDays(1);
-
-// Tuesday, 12th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (284)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (284)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (284)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (284)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (284)');
-
-$date->addDays(1);
-
-// Wednesday, 13th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (285)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (285)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (285)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (285)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (285)');
-
-$date->addDays(1);
-
-// Thursday, 14th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (286)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (286)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (286)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (286)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (286)');
-
-$date->addDays(1);
-
-// Friday, 15th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (287)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (287)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (287)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (287)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (287)');
-
-$date->addDays(1);
-
-// Saturday, 16th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (288)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (288)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (288)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (288)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (288)');
-
-$date->addDays(1);
-
-// Sunday, 17th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (289)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (289)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (289)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (289)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (289)');
-
-$date->addDays(1);
-
-// Monday, 18th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (290)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (290)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (290)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (290)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (290)');
-
-$date->addDays(1);
-
-// Tuesday, 19th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (291)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (291)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (291)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (291)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (291)');
-
-$date->addDays(1);
-
-// Wednesday, 20th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (292)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (292)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (292)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (292)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (292)');
-
-$date->addDays(1);
-
-// Thursday, 21st October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (293)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (293)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (293)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (293)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (293)');
-
-$date->addDays(1);
-
-// Friday, 22nd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (294)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (294)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (294)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (294)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (294)');
-
-$date->addDays(1);
-
-// Saturday, 23rd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (295)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (295)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (295)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (295)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (295)');
-
-$date->addDays(1);
-
-// Sunday, 24th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (296)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (296)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (296)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (296)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (296)');
-
-$date->addDays(1);
-
-// Monday, 25th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (297)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (297)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (297)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (297)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (297)');
-
-$date->addDays(1);
-
-// Tuesday, 26th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (298)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (298)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (298)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (298)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (298)');
-
-$date->addDays(1);
-
-// Wednesday, 27th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (299)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (299)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (299)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (299)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (299)');
-
-$date->addDays(1);
-
-// Thursday, 28th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (300)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (300)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (300)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (300)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (300)');
-
-$date->addDays(1);
-
-// Friday, 29th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (301)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (301)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (301)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (301)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (301)');
-
-$date->addDays(1);
-
-// Saturday, 30th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (302)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (302)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (302)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (302)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (302)');
-
-$date->addDays(1);
-
-// Sunday, 31st October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (303)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (303)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (303)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (303)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (303)');
-
-$date->addDays(1);
-
-// Monday, 1st November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (304)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (304)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (304)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (304)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (304)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (305)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (305)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (305)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (305)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (305)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (306)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (306)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (306)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (306)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (306)');
-
-$date->addDays(1);
-
-// Thursday, 4th November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (307)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (307)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (307)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (307)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (307)');
-
-$date->addDays(1);
-
-// Friday, 5th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (308)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (308)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (308)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (308)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (308)');
-
-$date->addDays(1);
-
-// Saturday, 6th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (309)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (309)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (309)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (309)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (309)');
-
-$date->addDays(1);
-
-// Sunday, 7th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (310)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (310)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (310)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (310)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (310)');
-
-$date->addDays(1);
-
-// Monday, 8th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (311)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (311)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (311)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (311)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (311)');
-
-$date->addDays(1);
-
-// Tuesday, 9th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (312)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (312)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (312)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (312)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (312)');
-
-$date->addDays(1);
-
-// Wednesday, 10th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (313)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (313)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (313)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (313)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (313)');
-
-$date->addDays(1);
-
-// Thursday, 11th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (314)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (314)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (314)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (314)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (314)');
-
-$date->addDays(1);
-
-// Friday, 12th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (315)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (315)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (315)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (315)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (315)');
-
-$date->addDays(1);
-
-// Saturday, 13th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (316)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (316)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (316)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (316)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (316)');
-
-$date->addDays(1);
-
-// Sunday, 14th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (317)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (317)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (317)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (317)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (317)');
-
-$date->addDays(1);
-
-// Monday, 15th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (318)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (318)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (318)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (318)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (318)');
-
-$date->addDays(1);
-
-// Tuesday, 16th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (319)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (319)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (319)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (319)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (319)');
-
-$date->addDays(1);
-
-// Wednesday, 17th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (320)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (320)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (320)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (320)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (320)');
-
-$date->addDays(1);
-
-// Thursday, 18th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (321)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (321)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (321)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (321)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (321)');
-
-$date->addDays(1);
-
-// Friday, 19th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (322)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (322)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (322)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (322)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (322)');
-
-$date->addDays(1);
-
-// Saturday, 20th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (323)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (323)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (323)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (323)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (323)');
-
-$date->addDays(1);
-
-// Sunday, 21st November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (324)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (324)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (324)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (324)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (324)');
-
-$date->addDays(1);
-
-// Monday, 22nd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (325)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (325)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (325)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (325)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (325)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (326)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (326)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (326)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (326)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (326)');
-
-$date->addDays(1);
-
-// Wednesday, 24th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (327)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (327)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (327)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (327)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (327)');
-
-$date->addDays(1);
-
-// Thursday, 25th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (328)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (328)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (328)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (328)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (328)');
-
-$date->addDays(1);
-
-// Friday, 26th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (329)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (329)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (329)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (329)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (329)');
-
-$date->addDays(1);
-
-// Saturday, 27th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (330)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (330)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (330)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (330)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (330)');
-
-$date->addDays(1);
-
-// Sunday, 28th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (331)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (331)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (331)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (331)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (331)');
-
-$date->addDays(1);
-
-// Monday, 29th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (332)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (332)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (332)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (332)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (332)');
-
-$date->addDays(1);
-
-// Tuesday, 30th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (333)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (333)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (333)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (333)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (333)');
-
-$date->addDays(1);
-
-// Wednesday, 1st December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (334)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (334)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (334)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (334)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (334)');
-
-$date->addDays(1);
-
-// Thursday, 2nd December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (335)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (335)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (335)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (335)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (335)');
-
-$date->addDays(1);
-
-// Friday, 3rd December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (336)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (336)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (336)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (336)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (336)');
-
-$date->addDays(1);
-
-// Saturday, 4th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (337)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (337)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (337)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (337)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (337)');
-
-$date->addDays(1);
-
-// Sunday, 5th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (338)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (338)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (338)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (338)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (338)');
-
-$date->addDays(1);
-
-// Monday, 6th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (339)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (339)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (339)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (339)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (339)');
-
-$date->addDays(1);
-
-// Tuesday, 7th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (340)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (340)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (340)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (340)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (340)');
-
-$date->addDays(1);
-
-// Wednesday, 8th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (341)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (341)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (341)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (341)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (341)');
-
-$date->addDays(1);
-
-// Thursday, 9th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (342)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (342)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (342)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (342)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (342)');
-
-$date->addDays(1);
-
-// Friday, 10th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (343)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (343)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (343)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (343)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (343)');
-
-$date->addDays(1);
-
-// Saturday, 11th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (344)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (344)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (344)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (344)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (344)');
-
-$date->addDays(1);
-
-// Sunday, 12th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (345)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (345)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (345)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (345)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (345)');
-
-$date->addDays(1);
-
-// Monday, 13th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (346)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (346)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (346)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (346)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (346)');
-
-$date->addDays(1);
-
-// Tuesday, 14th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (347)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (347)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (347)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (347)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (347)');
-
-$date->addDays(1);
-
-// Wednesday, 15th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (348)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (348)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (348)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (348)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (348)');
-
-$date->addDays(1);
-
-// Thursday, 16th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (349)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (349)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (349)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (349)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (349)');
-
-$date->addDays(1);
-
-// Friday, 17th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (350)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (350)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (350)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (350)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (350)');
-
-$date->addDays(1);
-
-// Saturday, 18th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (351)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (351)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (351)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (351)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (351)');
-
-$date->addDays(1);
-
-// Sunday, 19th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (352)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (352)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (352)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (352)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (352)');
-
-$date->addDays(1);
-
-// Monday, 20th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (353)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (353)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (353)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (353)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (353)');
-
-$date->addDays(1);
-
-// Tuesday, 21st December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (354)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (354)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (354)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (354)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (354)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (355)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (355)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (355)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (355)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (355)');
-
-$date->addDays(1);
-
-// Thursday, 23rd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (356)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (356)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (356)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (356)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (356)');
-
-$date->addDays(1);
-
-// Friday, 24th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (357)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (357)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (357)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (357)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (357)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (358)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (358)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (358)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (358)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (358)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (359)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (359)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (359)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (359)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (359)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (360)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (360)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (360)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (360)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (360)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (361)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (361)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (361)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (361)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (361)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (362)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (362)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (362)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (362)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (362)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (363)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (363)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (363)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (363)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (363)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1999
-compare('53', $date->formatLikeSQL('WW'), 'WW (364)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (364)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (364)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (364)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (364)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (365)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (365)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (365)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (365)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (365)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (366)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (366)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (366)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (366)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (366)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (367)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (367)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (367)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (367)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (367)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (368)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (368)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (368)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (368)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (368)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (369)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (369)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (369)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (369)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (369)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (370)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (370)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (370)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (370)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (370)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (371)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (371)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (371)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (371)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (371)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2000
-compare('02', $date->formatLikeSQL('WW'), 'WW (372)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (372)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (372)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (372)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (372)');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc day of week functions
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-define('DATE_CALC_BEGIN_WEEKDAY', 1);
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("1998-12-24 00:00:00Z");
-
-// First day of week is Monday
-//
-
-// Thursday, 24th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-8)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-8)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-8)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-8)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-7)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-7)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-7)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-7)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-6)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-6)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-6)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-6)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-5)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-5)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-5)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-5)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-4)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-4)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-4)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-4)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-3)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-3)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-3)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-3)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-2)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-2)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1998
-compare('53', $date->formatLikeSQL('WW'), 'WW (-1)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-1)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (0)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (0)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (0)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (0)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (1)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (1)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (2)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (2)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (3)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (3)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (3)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (3)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (4)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (4)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (4)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (4)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (5)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (5)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (5)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (5)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (6)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (6)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (6)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (6)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (7)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (7)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (7)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (7)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (7)');
-
-$date->addDays(1);
-
-// Saturday, 9th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (8)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (8)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (8)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (8)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (8)');
-
-$date->addDays(1);
-
-// Sunday, 10th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (9)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (9)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (9)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (9)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (9)');
-
-$date->addDays(1);
-
-// Monday, 11th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (10)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (10)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (10)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (10)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (10)');
-
-$date->addDays(1);
-
-// Tuesday, 12th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (11)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (11)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (11)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (11)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (11)');
-
-$date->addDays(1);
-
-// Wednesday, 13th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (12)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (12)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (12)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (12)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (12)');
-
-$date->addDays(1);
-
-// Thursday, 14th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (13)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (13)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (13)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (13)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (13)');
-
-$date->addDays(1);
-
-// Friday, 15th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (14)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (14)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (14)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (14)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (14)');
-
-$date->addDays(1);
-
-// Saturday, 16th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (15)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (15)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (15)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (15)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (15)');
-
-$date->addDays(1);
-
-// Sunday, 17th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (16)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (16)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (16)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (16)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (16)');
-
-$date->addDays(1);
-
-// Monday, 18th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (17)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (17)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (17)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (17)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (17)');
-
-$date->addDays(1);
-
-// Tuesday, 19th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (18)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (18)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (18)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (18)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (18)');
-
-$date->addDays(1);
-
-// Wednesday, 20th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (19)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (19)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (19)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (19)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (19)');
-
-$date->addDays(1);
-
-// Thursday, 21st January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (20)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (20)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (20)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (20)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (20)');
-
-$date->addDays(1);
-
-// Friday, 22nd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (21)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (21)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (21)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (21)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (21)');
-
-$date->addDays(1);
-
-// Saturday, 23rd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (22)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (22)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (22)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (22)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (22)');
-
-$date->addDays(1);
-
-// Sunday, 24th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (23)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (23)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (23)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (23)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (23)');
-
-$date->addDays(1);
-
-// Monday, 25th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (24)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (24)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (24)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (24)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (24)');
-
-$date->addDays(1);
-
-// Tuesday, 26th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (25)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (25)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (25)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (25)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (25)');
-
-$date->addDays(1);
-
-// Wednesday, 27th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (26)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (26)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (26)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (26)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (26)');
-
-$date->addDays(1);
-
-// Thursday, 28th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (27)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (27)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (27)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (27)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (27)');
-
-$date->addDays(1);
-
-// Friday, 29th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (28)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (28)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (28)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (28)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (28)');
-
-$date->addDays(1);
-
-// Saturday, 30th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (29)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (29)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (29)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (29)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (29)');
-
-$date->addDays(1);
-
-// Sunday, 31st January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (30)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (30)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (30)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (30)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (30)');
-
-$date->addDays(1);
-
-// Monday, 1st February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (31)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (31)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (31)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (31)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (31)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (32)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (32)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (32)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (32)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (32)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (33)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (33)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (33)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (33)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (33)');
-
-$date->addDays(1);
-
-// Thursday, 4th February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (34)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (34)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (34)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (34)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (34)');
-
-$date->addDays(1);
-
-// Friday, 5th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (35)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (35)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (35)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (35)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (35)');
-
-$date->addDays(1);
-
-// Saturday, 6th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (36)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (36)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (36)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (36)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (36)');
-
-$date->addDays(1);
-
-// Sunday, 7th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (37)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (37)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (37)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (37)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (37)');
-
-$date->addDays(1);
-
-// Monday, 8th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (38)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (38)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (38)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (38)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (38)');
-
-$date->addDays(1);
-
-// Tuesday, 9th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (39)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (39)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (39)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (39)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (39)');
-
-$date->addDays(1);
-
-// Wednesday, 10th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (40)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (40)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (40)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (40)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (40)');
-
-$date->addDays(1);
-
-// Thursday, 11th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (41)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (41)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (41)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (41)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (41)');
-
-$date->addDays(1);
-
-// Friday, 12th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (42)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (42)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (42)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (42)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (42)');
-
-$date->addDays(1);
-
-// Saturday, 13th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (43)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (43)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (43)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (43)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (43)');
-
-$date->addDays(1);
-
-// Sunday, 14th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (44)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (44)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (44)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (44)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (44)');
-
-$date->addDays(1);
-
-// Monday, 15th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (45)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (45)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (45)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (45)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (45)');
-
-$date->addDays(1);
-
-// Tuesday, 16th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (46)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (46)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (46)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (46)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (46)');
-
-$date->addDays(1);
-
-// Wednesday, 17th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (47)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (47)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (47)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (47)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (47)');
-
-$date->addDays(1);
-
-// Thursday, 18th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (48)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (48)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (48)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (48)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (48)');
-
-$date->addDays(1);
-
-// Friday, 19th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (49)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (49)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (49)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (49)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (49)');
-
-$date->addDays(1);
-
-// Saturday, 20th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (50)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (50)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (50)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (50)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (50)');
-
-$date->addDays(1);
-
-// Sunday, 21st February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (51)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (51)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (51)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (51)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (51)');
-
-$date->addDays(1);
-
-// Monday, 22nd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (52)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (52)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (52)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (52)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (52)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (53)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (53)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (53)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (53)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (53)');
-
-$date->addDays(1);
-
-// Wednesday, 24th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (54)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (54)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (54)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (54)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (54)');
-
-$date->addDays(1);
-
-// Thursday, 25th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (55)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (55)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (55)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (55)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (55)');
-
-$date->addDays(1);
-
-// Friday, 26th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (56)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (56)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (56)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (56)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (56)');
-
-$date->addDays(1);
-
-// Saturday, 27th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (57)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (57)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (57)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (57)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (57)');
-
-$date->addDays(1);
-
-// Sunday, 28th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (58)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (58)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (58)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (58)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (58)');
-
-$date->addDays(1);
-
-// Monday, 1st March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (59)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (59)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (59)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (59)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (59)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (60)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (60)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (60)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (60)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (60)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (61)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (61)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (61)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (61)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (61)');
-
-$date->addDays(1);
-
-// Thursday, 4th March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (62)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (62)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (62)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (62)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (62)');
-
-$date->addDays(1);
-
-// Friday, 5th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (63)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (63)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (63)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (63)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (63)');
-
-$date->addDays(1);
-
-// Saturday, 6th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (64)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (64)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (64)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (64)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (64)');
-
-$date->addDays(1);
-
-// Sunday, 7th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (65)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (65)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (65)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (65)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (65)');
-
-$date->addDays(1);
-
-// Monday, 8th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (66)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (66)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (66)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (66)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (66)');
-
-$date->addDays(1);
-
-// Tuesday, 9th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (67)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (67)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (67)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (67)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (67)');
-
-$date->addDays(1);
-
-// Wednesday, 10th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (68)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (68)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (68)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (68)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (68)');
-
-$date->addDays(1);
-
-// Thursday, 11th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (69)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (69)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (69)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (69)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (69)');
-
-$date->addDays(1);
-
-// Friday, 12th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (70)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (70)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (70)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (70)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (70)');
-
-$date->addDays(1);
-
-// Saturday, 13th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (71)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (71)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (71)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (71)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (71)');
-
-$date->addDays(1);
-
-// Sunday, 14th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (72)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (72)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (72)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (72)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (72)');
-
-$date->addDays(1);
-
-// Monday, 15th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (73)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (73)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (73)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (73)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (73)');
-
-$date->addDays(1);
-
-// Tuesday, 16th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (74)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (74)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (74)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (74)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (74)');
-
-$date->addDays(1);
-
-// Wednesday, 17th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (75)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (75)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (75)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (75)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (75)');
-
-$date->addDays(1);
-
-// Thursday, 18th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (76)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (76)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (76)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (76)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (76)');
-
-$date->addDays(1);
-
-// Friday, 19th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (77)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (77)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (77)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (77)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (77)');
-
-$date->addDays(1);
-
-// Saturday, 20th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (78)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (78)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (78)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (78)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (78)');
-
-$date->addDays(1);
-
-// Sunday, 21st March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (79)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (79)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (79)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (79)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (79)');
-
-$date->addDays(1);
-
-// Monday, 22nd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (80)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (80)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (80)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (80)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (80)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (81)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (81)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (81)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (81)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (81)');
-
-$date->addDays(1);
-
-// Wednesday, 24th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (82)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (82)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (82)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (82)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (82)');
-
-$date->addDays(1);
-
-// Thursday, 25th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (83)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (83)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (83)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (83)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (83)');
-
-$date->addDays(1);
-
-// Friday, 26th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (84)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (84)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (84)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (84)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (84)');
-
-$date->addDays(1);
-
-// Saturday, 27th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (85)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (85)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (85)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (85)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (85)');
-
-$date->addDays(1);
-
-// Sunday, 28th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (86)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (86)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (86)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (86)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (86)');
-
-$date->addDays(1);
-
-// Monday, 29th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (87)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (87)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (87)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (87)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (87)');
-
-$date->addDays(1);
-
-// Tuesday, 30th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (88)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (88)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (88)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (88)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (88)');
-
-$date->addDays(1);
-
-// Wednesday, 31st March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (89)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (89)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (89)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (89)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (89)');
-
-$date->addDays(1);
-
-// Thursday, 1st April 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (90)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (90)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (90)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (90)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (90)');
-
-$date->addDays(1);
-
-// Friday, 2nd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (91)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (91)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (91)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (91)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (91)');
-
-$date->addDays(1);
-
-// Saturday, 3rd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (92)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (92)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (92)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (92)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (92)');
-
-$date->addDays(1);
-
-// Sunday, 4th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (93)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (93)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (93)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (93)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (93)');
-
-$date->addDays(1);
-
-// Monday, 5th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (94)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (94)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (94)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (94)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (94)');
-
-$date->addDays(1);
-
-// Tuesday, 6th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (95)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (95)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (95)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (95)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (95)');
-
-$date->addDays(1);
-
-// Wednesday, 7th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (96)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (96)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (96)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (96)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (96)');
-
-$date->addDays(1);
-
-// Thursday, 8th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (97)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (97)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (97)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (97)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (97)');
-
-$date->addDays(1);
-
-// Friday, 9th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (98)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (98)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (98)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (98)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (98)');
-
-$date->addDays(1);
-
-// Saturday, 10th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (99)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (99)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (99)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (99)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (99)');
-
-$date->addDays(1);
-
-// Sunday, 11th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (100)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (100)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (100)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (100)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (100)');
-
-$date->addDays(1);
-
-// Monday, 12th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (101)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (101)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (101)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (101)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (101)');
-
-$date->addDays(1);
-
-// Tuesday, 13th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (102)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (102)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (102)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (102)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (102)');
-
-$date->addDays(1);
-
-// Wednesday, 14th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (103)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (103)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (103)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (103)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (103)');
-
-$date->addDays(1);
-
-// Thursday, 15th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (104)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (104)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (104)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (104)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (104)');
-
-$date->addDays(1);
-
-// Friday, 16th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (105)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (105)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (105)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (105)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (105)');
-
-$date->addDays(1);
-
-// Saturday, 17th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (106)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (106)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (106)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (106)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (106)');
-
-$date->addDays(1);
-
-// Sunday, 18th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (107)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (107)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (107)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (107)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (107)');
-
-$date->addDays(1);
-
-// Monday, 19th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (108)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (108)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (108)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (108)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (108)');
-
-$date->addDays(1);
-
-// Tuesday, 20th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (109)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (109)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (109)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (109)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (109)');
-
-$date->addDays(1);
-
-// Wednesday, 21st April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (110)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (110)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (110)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (110)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (110)');
-
-$date->addDays(1);
-
-// Thursday, 22nd April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (111)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (111)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (111)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (111)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (111)');
-
-$date->addDays(1);
-
-// Friday, 23rd April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (112)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (112)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (112)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (112)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (112)');
-
-$date->addDays(1);
-
-// Saturday, 24th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (113)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (113)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (113)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (113)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (113)');
-
-$date->addDays(1);
-
-// Sunday, 25th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (114)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (114)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (114)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (114)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (114)');
-
-$date->addDays(1);
-
-// Monday, 26th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (115)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (115)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (115)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (115)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (115)');
-
-$date->addDays(1);
-
-// Tuesday, 27th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (116)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (116)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (116)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (116)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (116)');
-
-$date->addDays(1);
-
-// Wednesday, 28th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (117)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (117)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (117)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (117)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (117)');
-
-$date->addDays(1);
-
-// Thursday, 29th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (118)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (118)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (118)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (118)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (118)');
-
-$date->addDays(1);
-
-// Friday, 30th April 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (119)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (119)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (119)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (119)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (119)');
-
-$date->addDays(1);
-
-// Saturday, 1st May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (120)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (120)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (120)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (120)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (120)');
-
-$date->addDays(1);
-
-// Sunday, 2nd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (121)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (121)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (121)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (121)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (121)');
-
-$date->addDays(1);
-
-// Monday, 3rd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (122)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (122)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (122)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (122)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (122)');
-
-$date->addDays(1);
-
-// Tuesday, 4th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (123)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (123)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (123)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (123)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (123)');
-
-$date->addDays(1);
-
-// Wednesday, 5th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (124)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (124)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (124)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (124)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (124)');
-
-$date->addDays(1);
-
-// Thursday, 6th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (125)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (125)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (125)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (125)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (125)');
-
-$date->addDays(1);
-
-// Friday, 7th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (126)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (126)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (126)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (126)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (126)');
-
-$date->addDays(1);
-
-// Saturday, 8th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (127)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (127)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (127)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (127)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (127)');
-
-$date->addDays(1);
-
-// Sunday, 9th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (128)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (128)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (128)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (128)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (128)');
-
-$date->addDays(1);
-
-// Monday, 10th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (129)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (129)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (129)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (129)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (129)');
-
-$date->addDays(1);
-
-// Tuesday, 11th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (130)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (130)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (130)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (130)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (130)');
-
-$date->addDays(1);
-
-// Wednesday, 12th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (131)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (131)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (131)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (131)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (131)');
-
-$date->addDays(1);
-
-// Thursday, 13th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (132)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (132)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (132)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (132)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (132)');
-
-$date->addDays(1);
-
-// Friday, 14th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (133)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (133)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (133)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (133)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (133)');
-
-$date->addDays(1);
-
-// Saturday, 15th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (134)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (134)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (134)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (134)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (134)');
-
-$date->addDays(1);
-
-// Sunday, 16th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (135)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (135)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (135)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (135)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (135)');
-
-$date->addDays(1);
-
-// Monday, 17th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (136)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (136)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (136)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (136)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (136)');
-
-$date->addDays(1);
-
-// Tuesday, 18th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (137)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (137)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (137)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (137)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (137)');
-
-$date->addDays(1);
-
-// Wednesday, 19th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (138)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (138)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (138)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (138)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (138)');
-
-$date->addDays(1);
-
-// Thursday, 20th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (139)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (139)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (139)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (139)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (139)');
-
-$date->addDays(1);
-
-// Friday, 21st May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (140)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (140)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (140)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (140)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (140)');
-
-$date->addDays(1);
-
-// Saturday, 22nd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (141)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (141)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (141)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (141)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (141)');
-
-$date->addDays(1);
-
-// Sunday, 23rd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (142)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (142)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (142)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (142)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (142)');
-
-$date->addDays(1);
-
-// Monday, 24th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (143)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (143)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (143)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (143)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (143)');
-
-$date->addDays(1);
-
-// Tuesday, 25th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (144)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (144)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (144)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (144)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (144)');
-
-$date->addDays(1);
-
-// Wednesday, 26th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (145)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (145)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (145)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (145)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (145)');
-
-$date->addDays(1);
-
-// Thursday, 27th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (146)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (146)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (146)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (146)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (146)');
-
-$date->addDays(1);
-
-// Friday, 28th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (147)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (147)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (147)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (147)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (147)');
-
-$date->addDays(1);
-
-// Saturday, 29th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (148)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (148)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (148)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (148)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (148)');
-
-$date->addDays(1);
-
-// Sunday, 30th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (149)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (149)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (149)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (149)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (149)');
-
-$date->addDays(1);
-
-// Monday, 31st May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (150)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (150)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (150)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (150)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (150)');
-
-$date->addDays(1);
-
-// Tuesday, 1st June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (151)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (151)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (151)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (151)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (151)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (152)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (152)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (152)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (152)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (152)');
-
-$date->addDays(1);
-
-// Thursday, 3rd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (153)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (153)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (153)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (153)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (153)');
-
-$date->addDays(1);
-
-// Friday, 4th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (154)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (154)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (154)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (154)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (154)');
-
-$date->addDays(1);
-
-// Saturday, 5th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (155)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (155)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (155)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (155)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (155)');
-
-$date->addDays(1);
-
-// Sunday, 6th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (156)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (156)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (156)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (156)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (156)');
-
-$date->addDays(1);
-
-// Monday, 7th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (157)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (157)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (157)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (157)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (157)');
-
-$date->addDays(1);
-
-// Tuesday, 8th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (158)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (158)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (158)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (158)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (158)');
-
-$date->addDays(1);
-
-// Wednesday, 9th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (159)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (159)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (159)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (159)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (159)');
-
-$date->addDays(1);
-
-// Thursday, 10th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (160)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (160)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (160)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (160)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (160)');
-
-$date->addDays(1);
-
-// Friday, 11th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (161)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (161)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (161)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (161)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (161)');
-
-$date->addDays(1);
-
-// Saturday, 12th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (162)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (162)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (162)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (162)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (162)');
-
-$date->addDays(1);
-
-// Sunday, 13th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (163)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (163)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (163)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (163)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (163)');
-
-$date->addDays(1);
-
-// Monday, 14th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (164)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (164)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (164)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (164)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (164)');
-
-$date->addDays(1);
-
-// Tuesday, 15th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (165)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (165)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (165)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (165)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (165)');
-
-$date->addDays(1);
-
-// Wednesday, 16th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (166)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (166)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (166)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (166)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (166)');
-
-$date->addDays(1);
-
-// Thursday, 17th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (167)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (167)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (167)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (167)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (167)');
-
-$date->addDays(1);
-
-// Friday, 18th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (168)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (168)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (168)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (168)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (168)');
-
-$date->addDays(1);
-
-// Saturday, 19th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (169)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (169)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (169)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (169)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (169)');
-
-$date->addDays(1);
-
-// Sunday, 20th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (170)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (170)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (170)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (170)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (170)');
-
-$date->addDays(1);
-
-// Monday, 21st June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (171)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (171)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (171)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (171)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (171)');
-
-$date->addDays(1);
-
-// Tuesday, 22nd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (172)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (172)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (172)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (172)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (172)');
-
-$date->addDays(1);
-
-// Wednesday, 23rd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (173)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (173)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (173)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (173)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (173)');
-
-$date->addDays(1);
-
-// Thursday, 24th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (174)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (174)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (174)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (174)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (174)');
-
-$date->addDays(1);
-
-// Friday, 25th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (175)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (175)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (175)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (175)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (175)');
-
-$date->addDays(1);
-
-// Saturday, 26th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (176)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (176)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (176)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (176)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (176)');
-
-$date->addDays(1);
-
-// Sunday, 27th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (177)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (177)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (177)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (177)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (177)');
-
-$date->addDays(1);
-
-// Monday, 28th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (178)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (178)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (178)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (178)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (178)');
-
-$date->addDays(1);
-
-// Tuesday, 29th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (179)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (179)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (179)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (179)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (179)');
-
-$date->addDays(1);
-
-// Wednesday, 30th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (180)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (180)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (180)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (180)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (180)');
-
-$date->addDays(1);
-
-// Thursday, 1st July 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (181)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (181)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (181)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (181)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (181)');
-
-$date->addDays(1);
-
-// Friday, 2nd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (182)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (182)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (182)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (182)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (182)');
-
-$date->addDays(1);
-
-// Saturday, 3rd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (183)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (183)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (183)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (183)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (183)');
-
-$date->addDays(1);
-
-// Sunday, 4th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (184)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (184)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (184)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (184)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (184)');
-
-$date->addDays(1);
-
-// Monday, 5th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (185)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (185)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (185)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (185)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (185)');
-
-$date->addDays(1);
-
-// Tuesday, 6th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (186)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (186)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (186)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (186)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (186)');
-
-$date->addDays(1);
-
-// Wednesday, 7th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (187)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (187)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (187)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (187)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (187)');
-
-$date->addDays(1);
-
-// Thursday, 8th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (188)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (188)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (188)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (188)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (188)');
-
-$date->addDays(1);
-
-// Friday, 9th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (189)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (189)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (189)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (189)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (189)');
-
-$date->addDays(1);
-
-// Saturday, 10th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (190)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (190)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (190)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (190)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (190)');
-
-$date->addDays(1);
-
-// Sunday, 11th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (191)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (191)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (191)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (191)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (191)');
-
-$date->addDays(1);
-
-// Monday, 12th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (192)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (192)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (192)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (192)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (192)');
-
-$date->addDays(1);
-
-// Tuesday, 13th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (193)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (193)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (193)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (193)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (193)');
-
-$date->addDays(1);
-
-// Wednesday, 14th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (194)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (194)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (194)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (194)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (194)');
-
-$date->addDays(1);
-
-// Thursday, 15th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (195)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (195)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (195)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (195)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (195)');
-
-$date->addDays(1);
-
-// Friday, 16th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (196)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (196)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (196)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (196)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (196)');
-
-$date->addDays(1);
-
-// Saturday, 17th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (197)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (197)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (197)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (197)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (197)');
-
-$date->addDays(1);
-
-// Sunday, 18th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (198)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (198)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (198)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (198)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (198)');
-
-$date->addDays(1);
-
-// Monday, 19th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (199)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (199)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (199)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (199)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (199)');
-
-$date->addDays(1);
-
-// Tuesday, 20th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (200)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (200)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (200)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (200)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (200)');
-
-$date->addDays(1);
-
-// Wednesday, 21st July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (201)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (201)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (201)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (201)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (201)');
-
-$date->addDays(1);
-
-// Thursday, 22nd July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (202)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (202)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (202)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (202)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (202)');
-
-$date->addDays(1);
-
-// Friday, 23rd July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (203)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (203)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (203)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (203)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (203)');
-
-$date->addDays(1);
-
-// Saturday, 24th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (204)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (204)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (204)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (204)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (204)');
-
-$date->addDays(1);
-
-// Sunday, 25th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (205)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (205)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (205)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (205)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (205)');
-
-$date->addDays(1);
-
-// Monday, 26th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (206)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (206)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (206)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (206)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (206)');
-
-$date->addDays(1);
-
-// Tuesday, 27th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (207)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (207)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (207)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (207)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (207)');
-
-$date->addDays(1);
-
-// Wednesday, 28th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (208)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (208)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (208)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (208)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (208)');
-
-$date->addDays(1);
-
-// Thursday, 29th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (209)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (209)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (209)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (209)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (209)');
-
-$date->addDays(1);
-
-// Friday, 30th July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (210)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (210)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (210)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (210)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (210)');
-
-$date->addDays(1);
-
-// Saturday, 31st July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (211)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (211)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (211)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (211)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (211)');
-
-$date->addDays(1);
-
-// Sunday, 1st August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (212)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (212)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (212)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (212)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (212)');
-
-$date->addDays(1);
-
-// Monday, 2nd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (213)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (213)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (213)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (213)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (213)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (214)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (214)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (214)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (214)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (214)');
-
-$date->addDays(1);
-
-// Wednesday, 4th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (215)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (215)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (215)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (215)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (215)');
-
-$date->addDays(1);
-
-// Thursday, 5th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (216)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (216)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (216)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (216)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (216)');
-
-$date->addDays(1);
-
-// Friday, 6th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (217)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (217)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (217)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (217)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (217)');
-
-$date->addDays(1);
-
-// Saturday, 7th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (218)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (218)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (218)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (218)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (218)');
-
-$date->addDays(1);
-
-// Sunday, 8th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (219)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (219)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (219)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (219)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (219)');
-
-$date->addDays(1);
-
-// Monday, 9th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (220)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (220)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (220)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (220)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (220)');
-
-$date->addDays(1);
-
-// Tuesday, 10th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (221)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (221)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (221)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (221)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (221)');
-
-$date->addDays(1);
-
-// Wednesday, 11th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (222)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (222)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (222)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (222)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (222)');
-
-$date->addDays(1);
-
-// Thursday, 12th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (223)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (223)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (223)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (223)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (223)');
-
-$date->addDays(1);
-
-// Friday, 13th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (224)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (224)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (224)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (224)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (224)');
-
-$date->addDays(1);
-
-// Saturday, 14th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (225)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (225)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (225)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (225)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (225)');
-
-$date->addDays(1);
-
-// Sunday, 15th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (226)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (226)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (226)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (226)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (226)');
-
-$date->addDays(1);
-
-// Monday, 16th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (227)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (227)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (227)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (227)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (227)');
-
-$date->addDays(1);
-
-// Tuesday, 17th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (228)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (228)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (228)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (228)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (228)');
-
-$date->addDays(1);
-
-// Wednesday, 18th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (229)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (229)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (229)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (229)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (229)');
-
-$date->addDays(1);
-
-// Thursday, 19th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (230)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (230)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (230)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (230)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (230)');
-
-$date->addDays(1);
-
-// Friday, 20th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (231)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (231)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (231)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (231)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (231)');
-
-$date->addDays(1);
-
-// Saturday, 21st August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (232)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (232)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (232)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (232)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (232)');
-
-$date->addDays(1);
-
-// Sunday, 22nd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (233)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (233)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (233)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (233)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (233)');
-
-$date->addDays(1);
-
-// Monday, 23rd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (234)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (234)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (234)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (234)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (234)');
-
-$date->addDays(1);
-
-// Tuesday, 24th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (235)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (235)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (235)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (235)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (235)');
-
-$date->addDays(1);
-
-// Wednesday, 25th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (236)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (236)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (236)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (236)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (236)');
-
-$date->addDays(1);
-
-// Thursday, 26th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (237)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (237)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (237)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (237)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (237)');
-
-$date->addDays(1);
-
-// Friday, 27th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (238)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (238)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (238)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (238)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (238)');
-
-$date->addDays(1);
-
-// Saturday, 28th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (239)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (239)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (239)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (239)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (239)');
-
-$date->addDays(1);
-
-// Sunday, 29th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (240)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (240)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (240)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (240)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (240)');
-
-$date->addDays(1);
-
-// Monday, 30th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (241)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (241)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (241)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (241)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (241)');
-
-$date->addDays(1);
-
-// Tuesday, 31st August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (242)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (242)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (242)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (242)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (242)');
-
-$date->addDays(1);
-
-// Wednesday, 1st September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (243)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (243)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (243)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (243)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (243)');
-
-$date->addDays(1);
-
-// Thursday, 2nd September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (244)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (244)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (244)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (244)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (244)');
-
-$date->addDays(1);
-
-// Friday, 3rd September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (245)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (245)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (245)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (245)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (245)');
-
-$date->addDays(1);
-
-// Saturday, 4th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (246)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (246)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (246)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (246)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (246)');
-
-$date->addDays(1);
-
-// Sunday, 5th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (247)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (247)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (247)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (247)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (247)');
-
-$date->addDays(1);
-
-// Monday, 6th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (248)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (248)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (248)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (248)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (248)');
-
-$date->addDays(1);
-
-// Tuesday, 7th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (249)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (249)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (249)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (249)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (249)');
-
-$date->addDays(1);
-
-// Wednesday, 8th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (250)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (250)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (250)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (250)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (250)');
-
-$date->addDays(1);
-
-// Thursday, 9th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (251)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (251)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (251)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (251)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (251)');
-
-$date->addDays(1);
-
-// Friday, 10th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (252)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (252)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (252)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (252)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (252)');
-
-$date->addDays(1);
-
-// Saturday, 11th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (253)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (253)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (253)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (253)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (253)');
-
-$date->addDays(1);
-
-// Sunday, 12th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (254)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (254)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (254)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (254)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (254)');
-
-$date->addDays(1);
-
-// Monday, 13th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (255)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (255)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (255)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (255)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (255)');
-
-$date->addDays(1);
-
-// Tuesday, 14th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (256)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (256)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (256)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (256)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (256)');
-
-$date->addDays(1);
-
-// Wednesday, 15th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (257)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (257)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (257)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (257)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (257)');
-
-$date->addDays(1);
-
-// Thursday, 16th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (258)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (258)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (258)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (258)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (258)');
-
-$date->addDays(1);
-
-// Friday, 17th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (259)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (259)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (259)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (259)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (259)');
-
-$date->addDays(1);
-
-// Saturday, 18th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (260)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (260)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (260)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (260)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (260)');
-
-$date->addDays(1);
-
-// Sunday, 19th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (261)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (261)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (261)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (261)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (261)');
-
-$date->addDays(1);
-
-// Monday, 20th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (262)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (262)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (262)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (262)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (262)');
-
-$date->addDays(1);
-
-// Tuesday, 21st September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (263)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (263)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (263)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (263)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (263)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (264)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (264)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (264)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (264)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (264)');
-
-$date->addDays(1);
-
-// Thursday, 23rd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (265)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (265)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (265)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (265)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (265)');
-
-$date->addDays(1);
-
-// Friday, 24th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (266)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (266)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (266)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (266)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (266)');
-
-$date->addDays(1);
-
-// Saturday, 25th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (267)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (267)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (267)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (267)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (267)');
-
-$date->addDays(1);
-
-// Sunday, 26th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (268)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (268)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (268)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (268)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (268)');
-
-$date->addDays(1);
-
-// Monday, 27th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (269)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (269)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (269)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (269)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (269)');
-
-$date->addDays(1);
-
-// Tuesday, 28th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (270)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (270)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (270)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (270)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (270)');
-
-$date->addDays(1);
-
-// Wednesday, 29th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (271)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (271)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (271)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (271)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (271)');
-
-$date->addDays(1);
-
-// Thursday, 30th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (272)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (272)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (272)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (272)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (272)');
-
-$date->addDays(1);
-
-// Friday, 1st October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (273)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (273)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (273)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (273)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (273)');
-
-$date->addDays(1);
-
-// Saturday, 2nd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (274)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (274)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (274)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (274)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (274)');
-
-$date->addDays(1);
-
-// Sunday, 3rd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (275)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (275)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (275)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (275)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (275)');
-
-$date->addDays(1);
-
-// Monday, 4th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (276)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (276)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (276)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (276)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (276)');
-
-$date->addDays(1);
-
-// Tuesday, 5th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (277)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (277)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (277)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (277)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (277)');
-
-$date->addDays(1);
-
-// Wednesday, 6th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (278)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (278)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (278)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (278)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (278)');
-
-$date->addDays(1);
-
-// Thursday, 7th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (279)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (279)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (279)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (279)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (279)');
-
-$date->addDays(1);
-
-// Friday, 8th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (280)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (280)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (280)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (280)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (280)');
-
-$date->addDays(1);
-
-// Saturday, 9th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (281)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (281)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (281)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (281)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (281)');
-
-$date->addDays(1);
-
-// Sunday, 10th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (282)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (282)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (282)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (282)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (282)');
-
-$date->addDays(1);
-
-// Monday, 11th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (283)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (283)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (283)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (283)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (283)');
-
-$date->addDays(1);
-
-// Tuesday, 12th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (284)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (284)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (284)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (284)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (284)');
-
-$date->addDays(1);
-
-// Wednesday, 13th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (285)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (285)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (285)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (285)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (285)');
-
-$date->addDays(1);
-
-// Thursday, 14th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (286)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (286)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (286)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (286)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (286)');
-
-$date->addDays(1);
-
-// Friday, 15th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (287)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (287)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (287)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (287)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (287)');
-
-$date->addDays(1);
-
-// Saturday, 16th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (288)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (288)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (288)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (288)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (288)');
-
-$date->addDays(1);
-
-// Sunday, 17th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (289)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (289)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (289)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (289)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (289)');
-
-$date->addDays(1);
-
-// Monday, 18th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (290)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (290)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (290)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (290)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (290)');
-
-$date->addDays(1);
-
-// Tuesday, 19th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (291)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (291)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (291)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (291)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (291)');
-
-$date->addDays(1);
-
-// Wednesday, 20th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (292)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (292)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (292)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (292)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (292)');
-
-$date->addDays(1);
-
-// Thursday, 21st October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (293)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (293)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (293)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (293)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (293)');
-
-$date->addDays(1);
-
-// Friday, 22nd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (294)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (294)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (294)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (294)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (294)');
-
-$date->addDays(1);
-
-// Saturday, 23rd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (295)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (295)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (295)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (295)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (295)');
-
-$date->addDays(1);
-
-// Sunday, 24th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (296)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (296)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (296)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (296)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (296)');
-
-$date->addDays(1);
-
-// Monday, 25th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (297)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (297)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (297)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (297)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (297)');
-
-$date->addDays(1);
-
-// Tuesday, 26th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (298)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (298)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (298)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (298)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (298)');
-
-$date->addDays(1);
-
-// Wednesday, 27th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (299)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (299)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (299)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (299)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (299)');
-
-$date->addDays(1);
-
-// Thursday, 28th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (300)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (300)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (300)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (300)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (300)');
-
-$date->addDays(1);
-
-// Friday, 29th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (301)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (301)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (301)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (301)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (301)');
-
-$date->addDays(1);
-
-// Saturday, 30th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (302)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (302)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (302)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (302)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (302)');
-
-$date->addDays(1);
-
-// Sunday, 31st October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (303)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (303)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (303)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (303)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (303)');
-
-$date->addDays(1);
-
-// Monday, 1st November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (304)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (304)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (304)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (304)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (304)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (305)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (305)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (305)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (305)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (305)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (306)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (306)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (306)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (306)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (306)');
-
-$date->addDays(1);
-
-// Thursday, 4th November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (307)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (307)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (307)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (307)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (307)');
-
-$date->addDays(1);
-
-// Friday, 5th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (308)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (308)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (308)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (308)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (308)');
-
-$date->addDays(1);
-
-// Saturday, 6th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (309)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (309)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (309)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (309)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (309)');
-
-$date->addDays(1);
-
-// Sunday, 7th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (310)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (310)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (310)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (310)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (310)');
-
-$date->addDays(1);
-
-// Monday, 8th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (311)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (311)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (311)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (311)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (311)');
-
-$date->addDays(1);
-
-// Tuesday, 9th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (312)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (312)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (312)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (312)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (312)');
-
-$date->addDays(1);
-
-// Wednesday, 10th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (313)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (313)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (313)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (313)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (313)');
-
-$date->addDays(1);
-
-// Thursday, 11th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (314)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (314)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (314)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (314)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (314)');
-
-$date->addDays(1);
-
-// Friday, 12th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (315)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (315)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (315)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (315)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (315)');
-
-$date->addDays(1);
-
-// Saturday, 13th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (316)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (316)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (316)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (316)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (316)');
-
-$date->addDays(1);
-
-// Sunday, 14th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (317)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (317)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (317)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (317)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (317)');
-
-$date->addDays(1);
-
-// Monday, 15th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (318)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (318)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (318)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (318)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (318)');
-
-$date->addDays(1);
-
-// Tuesday, 16th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (319)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (319)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (319)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (319)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (319)');
-
-$date->addDays(1);
-
-// Wednesday, 17th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (320)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (320)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (320)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (320)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (320)');
-
-$date->addDays(1);
-
-// Thursday, 18th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (321)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (321)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (321)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (321)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (321)');
-
-$date->addDays(1);
-
-// Friday, 19th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (322)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (322)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (322)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (322)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (322)');
-
-$date->addDays(1);
-
-// Saturday, 20th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (323)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (323)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (323)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (323)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (323)');
-
-$date->addDays(1);
-
-// Sunday, 21st November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (324)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (324)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (324)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (324)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (324)');
-
-$date->addDays(1);
-
-// Monday, 22nd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (325)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (325)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (325)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (325)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (325)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (326)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (326)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (326)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (326)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (326)');
-
-$date->addDays(1);
-
-// Wednesday, 24th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (327)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (327)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (327)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (327)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (327)');
-
-$date->addDays(1);
-
-// Thursday, 25th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (328)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (328)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (328)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (328)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (328)');
-
-$date->addDays(1);
-
-// Friday, 26th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (329)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (329)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (329)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (329)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (329)');
-
-$date->addDays(1);
-
-// Saturday, 27th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (330)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (330)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (330)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (330)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (330)');
-
-$date->addDays(1);
-
-// Sunday, 28th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (331)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (331)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (331)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (331)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (331)');
-
-$date->addDays(1);
-
-// Monday, 29th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (332)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (332)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (332)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (332)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (332)');
-
-$date->addDays(1);
-
-// Tuesday, 30th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (333)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (333)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (333)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (333)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (333)');
-
-$date->addDays(1);
-
-// Wednesday, 1st December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (334)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (334)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (334)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (334)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (334)');
-
-$date->addDays(1);
-
-// Thursday, 2nd December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (335)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (335)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (335)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (335)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (335)');
-
-$date->addDays(1);
-
-// Friday, 3rd December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (336)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (336)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (336)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (336)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (336)');
-
-$date->addDays(1);
-
-// Saturday, 4th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (337)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (337)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (337)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (337)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (337)');
-
-$date->addDays(1);
-
-// Sunday, 5th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (338)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (338)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (338)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (338)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (338)');
-
-$date->addDays(1);
-
-// Monday, 6th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (339)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (339)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (339)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (339)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (339)');
-
-$date->addDays(1);
-
-// Tuesday, 7th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (340)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (340)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (340)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (340)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (340)');
-
-$date->addDays(1);
-
-// Wednesday, 8th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (341)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (341)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (341)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (341)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (341)');
-
-$date->addDays(1);
-
-// Thursday, 9th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (342)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (342)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (342)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (342)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (342)');
-
-$date->addDays(1);
-
-// Friday, 10th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (343)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (343)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (343)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (343)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (343)');
-
-$date->addDays(1);
-
-// Saturday, 11th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (344)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (344)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (344)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (344)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (344)');
-
-$date->addDays(1);
-
-// Sunday, 12th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (345)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (345)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (345)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (345)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (345)');
-
-$date->addDays(1);
-
-// Monday, 13th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (346)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (346)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (346)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (346)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (346)');
-
-$date->addDays(1);
-
-// Tuesday, 14th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (347)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (347)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (347)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (347)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (347)');
-
-$date->addDays(1);
-
-// Wednesday, 15th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (348)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (348)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (348)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (348)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (348)');
-
-$date->addDays(1);
-
-// Thursday, 16th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (349)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (349)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (349)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (349)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (349)');
-
-$date->addDays(1);
-
-// Friday, 17th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (350)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (350)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (350)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (350)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (350)');
-
-$date->addDays(1);
-
-// Saturday, 18th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (351)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (351)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (351)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (351)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (351)');
-
-$date->addDays(1);
-
-// Sunday, 19th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (352)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (352)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (352)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (352)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (352)');
-
-$date->addDays(1);
-
-// Monday, 20th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (353)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (353)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (353)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (353)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (353)');
-
-$date->addDays(1);
-
-// Tuesday, 21st December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (354)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (354)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (354)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (354)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (354)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (355)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (355)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (355)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (355)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (355)');
-
-$date->addDays(1);
-
-// Thursday, 23rd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (356)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (356)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (356)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (356)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (356)');
-
-$date->addDays(1);
-
-// Friday, 24th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (357)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (357)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (357)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (357)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (357)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (358)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (358)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (358)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (358)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (358)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (359)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (359)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (359)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (359)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (359)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (360)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (360)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (360)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (360)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (360)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (361)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (361)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (361)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (361)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (361)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (362)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (362)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (362)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (362)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (362)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (363)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (363)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (363)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (363)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (363)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1999
-compare('53', $date->formatLikeSQL('WW'), 'WW (364)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (364)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (364)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (364)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (364)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (365)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (365)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (365)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (365)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (365)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (366)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (366)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (366)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (366)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (366)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (367)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (367)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (367)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (367)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (367)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (368)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (368)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (368)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (368)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (368)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (369)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (369)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (369)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (369)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (369)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (370)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (370)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (370)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (370)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (370)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (371)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (371)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (371)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (371)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (371)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2000
-compare('02', $date->formatLikeSQL('WW'), 'WW (372)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (372)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (372)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (372)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (372)');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc day of week functions
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-define('DATE_CALC_BEGIN_WEEKDAY', 2);
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("1998-12-24 00:00:00Z");
-
-// First day of week is Tuesday
-//
-
-// Thursday, 24th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-8)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-8)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-8)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-8)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-7)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-7)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-7)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-7)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-6)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-6)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-6)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-6)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-5)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-5)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-5)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-5)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-4)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-4)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-4)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-4)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-3)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-3)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-3)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-3)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-2)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-2)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1998
-compare('53', $date->formatLikeSQL('WW'), 'WW (-1)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-1)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (0)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (0)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (0)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (0)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (1)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (1)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (2)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (2)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (3)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (3)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (3)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (3)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (4)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (4)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (4)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (4)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (5)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (5)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (5)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (5)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (6)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (6)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (6)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (6)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (7)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (7)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (7)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (7)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (7)');
-
-$date->addDays(1);
-
-// Saturday, 9th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (8)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (8)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (8)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (8)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (8)');
-
-$date->addDays(1);
-
-// Sunday, 10th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (9)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (9)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (9)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (9)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (9)');
-
-$date->addDays(1);
-
-// Monday, 11th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (10)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (10)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (10)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (10)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (10)');
-
-$date->addDays(1);
-
-// Tuesday, 12th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (11)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (11)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (11)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (11)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (11)');
-
-$date->addDays(1);
-
-// Wednesday, 13th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (12)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (12)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (12)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (12)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (12)');
-
-$date->addDays(1);
-
-// Thursday, 14th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (13)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (13)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (13)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (13)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (13)');
-
-$date->addDays(1);
-
-// Friday, 15th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (14)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (14)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (14)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (14)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (14)');
-
-$date->addDays(1);
-
-// Saturday, 16th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (15)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (15)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (15)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (15)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (15)');
-
-$date->addDays(1);
-
-// Sunday, 17th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (16)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (16)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (16)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (16)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (16)');
-
-$date->addDays(1);
-
-// Monday, 18th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (17)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (17)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (17)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (17)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (17)');
-
-$date->addDays(1);
-
-// Tuesday, 19th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (18)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (18)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (18)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (18)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (18)');
-
-$date->addDays(1);
-
-// Wednesday, 20th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (19)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (19)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (19)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (19)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (19)');
-
-$date->addDays(1);
-
-// Thursday, 21st January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (20)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (20)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (20)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (20)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (20)');
-
-$date->addDays(1);
-
-// Friday, 22nd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (21)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (21)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (21)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (21)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (21)');
-
-$date->addDays(1);
-
-// Saturday, 23rd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (22)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (22)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (22)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (22)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (22)');
-
-$date->addDays(1);
-
-// Sunday, 24th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (23)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (23)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (23)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (23)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (23)');
-
-$date->addDays(1);
-
-// Monday, 25th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (24)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (24)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (24)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (24)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (24)');
-
-$date->addDays(1);
-
-// Tuesday, 26th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (25)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (25)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (25)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (25)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (25)');
-
-$date->addDays(1);
-
-// Wednesday, 27th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (26)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (26)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (26)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (26)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (26)');
-
-$date->addDays(1);
-
-// Thursday, 28th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (27)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (27)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (27)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (27)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (27)');
-
-$date->addDays(1);
-
-// Friday, 29th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (28)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (28)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (28)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (28)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (28)');
-
-$date->addDays(1);
-
-// Saturday, 30th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (29)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (29)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (29)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (29)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (29)');
-
-$date->addDays(1);
-
-// Sunday, 31st January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (30)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (30)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (30)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (30)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (30)');
-
-$date->addDays(1);
-
-// Monday, 1st February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (31)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (31)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (31)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (31)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (31)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (32)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (32)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (32)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (32)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (32)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (33)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (33)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (33)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (33)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (33)');
-
-$date->addDays(1);
-
-// Thursday, 4th February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (34)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (34)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (34)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (34)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (34)');
-
-$date->addDays(1);
-
-// Friday, 5th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (35)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (35)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (35)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (35)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (35)');
-
-$date->addDays(1);
-
-// Saturday, 6th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (36)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (36)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (36)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (36)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (36)');
-
-$date->addDays(1);
-
-// Sunday, 7th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (37)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (37)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (37)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (37)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (37)');
-
-$date->addDays(1);
-
-// Monday, 8th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (38)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (38)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (38)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (38)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (38)');
-
-$date->addDays(1);
-
-// Tuesday, 9th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (39)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (39)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (39)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (39)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (39)');
-
-$date->addDays(1);
-
-// Wednesday, 10th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (40)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (40)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (40)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (40)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (40)');
-
-$date->addDays(1);
-
-// Thursday, 11th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (41)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (41)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (41)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (41)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (41)');
-
-$date->addDays(1);
-
-// Friday, 12th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (42)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (42)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (42)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (42)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (42)');
-
-$date->addDays(1);
-
-// Saturday, 13th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (43)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (43)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (43)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (43)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (43)');
-
-$date->addDays(1);
-
-// Sunday, 14th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (44)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (44)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (44)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (44)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (44)');
-
-$date->addDays(1);
-
-// Monday, 15th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (45)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (45)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (45)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (45)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (45)');
-
-$date->addDays(1);
-
-// Tuesday, 16th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (46)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (46)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (46)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (46)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (46)');
-
-$date->addDays(1);
-
-// Wednesday, 17th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (47)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (47)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (47)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (47)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (47)');
-
-$date->addDays(1);
-
-// Thursday, 18th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (48)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (48)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (48)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (48)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (48)');
-
-$date->addDays(1);
-
-// Friday, 19th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (49)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (49)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (49)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (49)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (49)');
-
-$date->addDays(1);
-
-// Saturday, 20th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (50)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (50)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (50)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (50)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (50)');
-
-$date->addDays(1);
-
-// Sunday, 21st February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (51)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (51)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (51)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (51)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (51)');
-
-$date->addDays(1);
-
-// Monday, 22nd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (52)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (52)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (52)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (52)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (52)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (53)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (53)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (53)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (53)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (53)');
-
-$date->addDays(1);
-
-// Wednesday, 24th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (54)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (54)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (54)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (54)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (54)');
-
-$date->addDays(1);
-
-// Thursday, 25th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (55)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (55)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (55)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (55)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (55)');
-
-$date->addDays(1);
-
-// Friday, 26th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (56)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (56)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (56)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (56)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (56)');
-
-$date->addDays(1);
-
-// Saturday, 27th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (57)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (57)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (57)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (57)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (57)');
-
-$date->addDays(1);
-
-// Sunday, 28th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (58)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (58)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (58)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (58)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (58)');
-
-$date->addDays(1);
-
-// Monday, 1st March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (59)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (59)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (59)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (59)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (59)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (60)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (60)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (60)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (60)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (60)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (61)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (61)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (61)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (61)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (61)');
-
-$date->addDays(1);
-
-// Thursday, 4th March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (62)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (62)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (62)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (62)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (62)');
-
-$date->addDays(1);
-
-// Friday, 5th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (63)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (63)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (63)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (63)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (63)');
-
-$date->addDays(1);
-
-// Saturday, 6th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (64)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (64)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (64)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (64)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (64)');
-
-$date->addDays(1);
-
-// Sunday, 7th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (65)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (65)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (65)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (65)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (65)');
-
-$date->addDays(1);
-
-// Monday, 8th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (66)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (66)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (66)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (66)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (66)');
-
-$date->addDays(1);
-
-// Tuesday, 9th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (67)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (67)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (67)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (67)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (67)');
-
-$date->addDays(1);
-
-// Wednesday, 10th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (68)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (68)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (68)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (68)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (68)');
-
-$date->addDays(1);
-
-// Thursday, 11th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (69)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (69)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (69)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (69)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (69)');
-
-$date->addDays(1);
-
-// Friday, 12th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (70)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (70)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (70)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (70)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (70)');
-
-$date->addDays(1);
-
-// Saturday, 13th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (71)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (71)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (71)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (71)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (71)');
-
-$date->addDays(1);
-
-// Sunday, 14th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (72)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (72)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (72)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (72)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (72)');
-
-$date->addDays(1);
-
-// Monday, 15th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (73)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (73)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (73)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (73)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (73)');
-
-$date->addDays(1);
-
-// Tuesday, 16th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (74)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (74)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (74)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (74)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (74)');
-
-$date->addDays(1);
-
-// Wednesday, 17th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (75)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (75)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (75)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (75)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (75)');
-
-$date->addDays(1);
-
-// Thursday, 18th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (76)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (76)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (76)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (76)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (76)');
-
-$date->addDays(1);
-
-// Friday, 19th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (77)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (77)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (77)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (77)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (77)');
-
-$date->addDays(1);
-
-// Saturday, 20th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (78)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (78)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (78)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (78)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (78)');
-
-$date->addDays(1);
-
-// Sunday, 21st March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (79)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (79)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (79)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (79)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (79)');
-
-$date->addDays(1);
-
-// Monday, 22nd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (80)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (80)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (80)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (80)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (80)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (81)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (81)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (81)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (81)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (81)');
-
-$date->addDays(1);
-
-// Wednesday, 24th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (82)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (82)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (82)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (82)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (82)');
-
-$date->addDays(1);
-
-// Thursday, 25th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (83)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (83)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (83)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (83)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (83)');
-
-$date->addDays(1);
-
-// Friday, 26th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (84)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (84)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (84)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (84)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (84)');
-
-$date->addDays(1);
-
-// Saturday, 27th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (85)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (85)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (85)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (85)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (85)');
-
-$date->addDays(1);
-
-// Sunday, 28th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (86)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (86)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (86)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (86)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (86)');
-
-$date->addDays(1);
-
-// Monday, 29th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (87)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (87)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (87)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (87)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (87)');
-
-$date->addDays(1);
-
-// Tuesday, 30th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (88)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (88)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (88)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (88)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (88)');
-
-$date->addDays(1);
-
-// Wednesday, 31st March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (89)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (89)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (89)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (89)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (89)');
-
-$date->addDays(1);
-
-// Thursday, 1st April 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (90)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (90)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (90)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (90)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (90)');
-
-$date->addDays(1);
-
-// Friday, 2nd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (91)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (91)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (91)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (91)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (91)');
-
-$date->addDays(1);
-
-// Saturday, 3rd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (92)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (92)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (92)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (92)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (92)');
-
-$date->addDays(1);
-
-// Sunday, 4th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (93)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (93)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (93)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (93)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (93)');
-
-$date->addDays(1);
-
-// Monday, 5th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (94)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (94)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (94)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (94)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (94)');
-
-$date->addDays(1);
-
-// Tuesday, 6th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (95)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (95)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (95)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (95)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (95)');
-
-$date->addDays(1);
-
-// Wednesday, 7th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (96)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (96)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (96)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (96)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (96)');
-
-$date->addDays(1);
-
-// Thursday, 8th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (97)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (97)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (97)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (97)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (97)');
-
-$date->addDays(1);
-
-// Friday, 9th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (98)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (98)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (98)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (98)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (98)');
-
-$date->addDays(1);
-
-// Saturday, 10th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (99)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (99)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (99)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (99)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (99)');
-
-$date->addDays(1);
-
-// Sunday, 11th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (100)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (100)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (100)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (100)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (100)');
-
-$date->addDays(1);
-
-// Monday, 12th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (101)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (101)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (101)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (101)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (101)');
-
-$date->addDays(1);
-
-// Tuesday, 13th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (102)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (102)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (102)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (102)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (102)');
-
-$date->addDays(1);
-
-// Wednesday, 14th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (103)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (103)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (103)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (103)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (103)');
-
-$date->addDays(1);
-
-// Thursday, 15th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (104)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (104)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (104)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (104)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (104)');
-
-$date->addDays(1);
-
-// Friday, 16th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (105)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (105)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (105)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (105)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (105)');
-
-$date->addDays(1);
-
-// Saturday, 17th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (106)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (106)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (106)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (106)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (106)');
-
-$date->addDays(1);
-
-// Sunday, 18th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (107)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (107)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (107)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (107)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (107)');
-
-$date->addDays(1);
-
-// Monday, 19th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (108)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (108)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (108)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (108)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (108)');
-
-$date->addDays(1);
-
-// Tuesday, 20th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (109)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (109)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (109)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (109)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (109)');
-
-$date->addDays(1);
-
-// Wednesday, 21st April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (110)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (110)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (110)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (110)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (110)');
-
-$date->addDays(1);
-
-// Thursday, 22nd April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (111)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (111)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (111)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (111)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (111)');
-
-$date->addDays(1);
-
-// Friday, 23rd April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (112)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (112)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (112)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (112)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (112)');
-
-$date->addDays(1);
-
-// Saturday, 24th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (113)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (113)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (113)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (113)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (113)');
-
-$date->addDays(1);
-
-// Sunday, 25th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (114)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (114)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (114)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (114)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (114)');
-
-$date->addDays(1);
-
-// Monday, 26th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (115)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (115)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (115)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (115)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (115)');
-
-$date->addDays(1);
-
-// Tuesday, 27th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (116)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (116)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (116)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (116)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (116)');
-
-$date->addDays(1);
-
-// Wednesday, 28th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (117)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (117)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (117)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (117)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (117)');
-
-$date->addDays(1);
-
-// Thursday, 29th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (118)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (118)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (118)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (118)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (118)');
-
-$date->addDays(1);
-
-// Friday, 30th April 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (119)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (119)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (119)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (119)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (119)');
-
-$date->addDays(1);
-
-// Saturday, 1st May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (120)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (120)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (120)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (120)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (120)');
-
-$date->addDays(1);
-
-// Sunday, 2nd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (121)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (121)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (121)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (121)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (121)');
-
-$date->addDays(1);
-
-// Monday, 3rd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (122)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (122)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (122)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (122)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (122)');
-
-$date->addDays(1);
-
-// Tuesday, 4th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (123)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (123)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (123)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (123)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (123)');
-
-$date->addDays(1);
-
-// Wednesday, 5th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (124)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (124)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (124)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (124)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (124)');
-
-$date->addDays(1);
-
-// Thursday, 6th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (125)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (125)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (125)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (125)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (125)');
-
-$date->addDays(1);
-
-// Friday, 7th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (126)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (126)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (126)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (126)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (126)');
-
-$date->addDays(1);
-
-// Saturday, 8th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (127)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (127)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (127)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (127)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (127)');
-
-$date->addDays(1);
-
-// Sunday, 9th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (128)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (128)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (128)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (128)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (128)');
-
-$date->addDays(1);
-
-// Monday, 10th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (129)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (129)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (129)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (129)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (129)');
-
-$date->addDays(1);
-
-// Tuesday, 11th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (130)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (130)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (130)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (130)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (130)');
-
-$date->addDays(1);
-
-// Wednesday, 12th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (131)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (131)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (131)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (131)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (131)');
-
-$date->addDays(1);
-
-// Thursday, 13th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (132)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (132)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (132)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (132)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (132)');
-
-$date->addDays(1);
-
-// Friday, 14th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (133)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (133)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (133)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (133)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (133)');
-
-$date->addDays(1);
-
-// Saturday, 15th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (134)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (134)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (134)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (134)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (134)');
-
-$date->addDays(1);
-
-// Sunday, 16th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (135)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (135)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (135)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (135)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (135)');
-
-$date->addDays(1);
-
-// Monday, 17th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (136)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (136)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (136)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (136)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (136)');
-
-$date->addDays(1);
-
-// Tuesday, 18th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (137)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (137)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (137)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (137)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (137)');
-
-$date->addDays(1);
-
-// Wednesday, 19th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (138)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (138)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (138)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (138)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (138)');
-
-$date->addDays(1);
-
-// Thursday, 20th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (139)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (139)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (139)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (139)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (139)');
-
-$date->addDays(1);
-
-// Friday, 21st May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (140)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (140)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (140)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (140)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (140)');
-
-$date->addDays(1);
-
-// Saturday, 22nd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (141)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (141)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (141)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (141)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (141)');
-
-$date->addDays(1);
-
-// Sunday, 23rd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (142)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (142)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (142)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (142)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (142)');
-
-$date->addDays(1);
-
-// Monday, 24th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (143)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (143)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (143)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (143)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (143)');
-
-$date->addDays(1);
-
-// Tuesday, 25th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (144)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (144)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (144)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (144)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (144)');
-
-$date->addDays(1);
-
-// Wednesday, 26th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (145)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (145)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (145)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (145)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (145)');
-
-$date->addDays(1);
-
-// Thursday, 27th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (146)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (146)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (146)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (146)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (146)');
-
-$date->addDays(1);
-
-// Friday, 28th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (147)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (147)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (147)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (147)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (147)');
-
-$date->addDays(1);
-
-// Saturday, 29th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (148)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (148)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (148)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (148)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (148)');
-
-$date->addDays(1);
-
-// Sunday, 30th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (149)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (149)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (149)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (149)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (149)');
-
-$date->addDays(1);
-
-// Monday, 31st May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (150)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (150)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (150)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (150)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (150)');
-
-$date->addDays(1);
-
-// Tuesday, 1st June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (151)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (151)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (151)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (151)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (151)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (152)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (152)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (152)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (152)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (152)');
-
-$date->addDays(1);
-
-// Thursday, 3rd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (153)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (153)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (153)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (153)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (153)');
-
-$date->addDays(1);
-
-// Friday, 4th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (154)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (154)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (154)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (154)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (154)');
-
-$date->addDays(1);
-
-// Saturday, 5th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (155)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (155)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (155)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (155)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (155)');
-
-$date->addDays(1);
-
-// Sunday, 6th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (156)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (156)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (156)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (156)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (156)');
-
-$date->addDays(1);
-
-// Monday, 7th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (157)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (157)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (157)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (157)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (157)');
-
-$date->addDays(1);
-
-// Tuesday, 8th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (158)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (158)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (158)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (158)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (158)');
-
-$date->addDays(1);
-
-// Wednesday, 9th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (159)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (159)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (159)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (159)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (159)');
-
-$date->addDays(1);
-
-// Thursday, 10th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (160)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (160)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (160)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (160)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (160)');
-
-$date->addDays(1);
-
-// Friday, 11th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (161)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (161)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (161)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (161)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (161)');
-
-$date->addDays(1);
-
-// Saturday, 12th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (162)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (162)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (162)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (162)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (162)');
-
-$date->addDays(1);
-
-// Sunday, 13th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (163)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (163)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (163)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (163)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (163)');
-
-$date->addDays(1);
-
-// Monday, 14th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (164)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (164)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (164)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (164)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (164)');
-
-$date->addDays(1);
-
-// Tuesday, 15th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (165)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (165)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (165)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (165)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (165)');
-
-$date->addDays(1);
-
-// Wednesday, 16th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (166)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (166)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (166)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (166)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (166)');
-
-$date->addDays(1);
-
-// Thursday, 17th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (167)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (167)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (167)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (167)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (167)');
-
-$date->addDays(1);
-
-// Friday, 18th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (168)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (168)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (168)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (168)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (168)');
-
-$date->addDays(1);
-
-// Saturday, 19th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (169)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (169)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (169)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (169)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (169)');
-
-$date->addDays(1);
-
-// Sunday, 20th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (170)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (170)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (170)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (170)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (170)');
-
-$date->addDays(1);
-
-// Monday, 21st June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (171)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (171)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (171)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (171)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (171)');
-
-$date->addDays(1);
-
-// Tuesday, 22nd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (172)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (172)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (172)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (172)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (172)');
-
-$date->addDays(1);
-
-// Wednesday, 23rd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (173)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (173)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (173)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (173)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (173)');
-
-$date->addDays(1);
-
-// Thursday, 24th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (174)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (174)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (174)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (174)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (174)');
-
-$date->addDays(1);
-
-// Friday, 25th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (175)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (175)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (175)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (175)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (175)');
-
-$date->addDays(1);
-
-// Saturday, 26th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (176)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (176)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (176)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (176)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (176)');
-
-$date->addDays(1);
-
-// Sunday, 27th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (177)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (177)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (177)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (177)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (177)');
-
-$date->addDays(1);
-
-// Monday, 28th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (178)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (178)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (178)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (178)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (178)');
-
-$date->addDays(1);
-
-// Tuesday, 29th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (179)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (179)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (179)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (179)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (179)');
-
-$date->addDays(1);
-
-// Wednesday, 30th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (180)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (180)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (180)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (180)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (180)');
-
-$date->addDays(1);
-
-// Thursday, 1st July 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (181)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (181)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (181)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (181)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (181)');
-
-$date->addDays(1);
-
-// Friday, 2nd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (182)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (182)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (182)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (182)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (182)');
-
-$date->addDays(1);
-
-// Saturday, 3rd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (183)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (183)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (183)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (183)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (183)');
-
-$date->addDays(1);
-
-// Sunday, 4th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (184)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (184)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (184)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (184)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (184)');
-
-$date->addDays(1);
-
-// Monday, 5th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (185)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (185)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (185)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (185)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (185)');
-
-$date->addDays(1);
-
-// Tuesday, 6th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (186)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (186)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (186)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (186)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (186)');
-
-$date->addDays(1);
-
-// Wednesday, 7th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (187)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (187)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (187)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (187)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (187)');
-
-$date->addDays(1);
-
-// Thursday, 8th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (188)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (188)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (188)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (188)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (188)');
-
-$date->addDays(1);
-
-// Friday, 9th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (189)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (189)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (189)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (189)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (189)');
-
-$date->addDays(1);
-
-// Saturday, 10th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (190)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (190)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (190)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (190)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (190)');
-
-$date->addDays(1);
-
-// Sunday, 11th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (191)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (191)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (191)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (191)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (191)');
-
-$date->addDays(1);
-
-// Monday, 12th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (192)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (192)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (192)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (192)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (192)');
-
-$date->addDays(1);
-
-// Tuesday, 13th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (193)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (193)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (193)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (193)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (193)');
-
-$date->addDays(1);
-
-// Wednesday, 14th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (194)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (194)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (194)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (194)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (194)');
-
-$date->addDays(1);
-
-// Thursday, 15th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (195)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (195)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (195)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (195)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (195)');
-
-$date->addDays(1);
-
-// Friday, 16th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (196)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (196)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (196)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (196)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (196)');
-
-$date->addDays(1);
-
-// Saturday, 17th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (197)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (197)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (197)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (197)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (197)');
-
-$date->addDays(1);
-
-// Sunday, 18th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (198)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (198)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (198)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (198)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (198)');
-
-$date->addDays(1);
-
-// Monday, 19th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (199)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (199)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (199)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (199)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (199)');
-
-$date->addDays(1);
-
-// Tuesday, 20th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (200)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (200)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (200)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (200)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (200)');
-
-$date->addDays(1);
-
-// Wednesday, 21st July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (201)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (201)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (201)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (201)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (201)');
-
-$date->addDays(1);
-
-// Thursday, 22nd July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (202)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (202)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (202)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (202)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (202)');
-
-$date->addDays(1);
-
-// Friday, 23rd July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (203)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (203)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (203)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (203)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (203)');
-
-$date->addDays(1);
-
-// Saturday, 24th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (204)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (204)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (204)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (204)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (204)');
-
-$date->addDays(1);
-
-// Sunday, 25th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (205)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (205)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (205)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (205)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (205)');
-
-$date->addDays(1);
-
-// Monday, 26th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (206)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (206)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (206)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (206)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (206)');
-
-$date->addDays(1);
-
-// Tuesday, 27th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (207)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (207)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (207)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (207)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (207)');
-
-$date->addDays(1);
-
-// Wednesday, 28th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (208)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (208)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (208)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (208)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (208)');
-
-$date->addDays(1);
-
-// Thursday, 29th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (209)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (209)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (209)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (209)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (209)');
-
-$date->addDays(1);
-
-// Friday, 30th July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (210)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (210)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (210)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (210)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (210)');
-
-$date->addDays(1);
-
-// Saturday, 31st July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (211)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (211)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (211)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (211)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (211)');
-
-$date->addDays(1);
-
-// Sunday, 1st August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (212)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (212)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (212)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (212)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (212)');
-
-$date->addDays(1);
-
-// Monday, 2nd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (213)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (213)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (213)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (213)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (213)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (214)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (214)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (214)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (214)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (214)');
-
-$date->addDays(1);
-
-// Wednesday, 4th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (215)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (215)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (215)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (215)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (215)');
-
-$date->addDays(1);
-
-// Thursday, 5th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (216)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (216)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (216)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (216)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (216)');
-
-$date->addDays(1);
-
-// Friday, 6th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (217)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (217)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (217)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (217)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (217)');
-
-$date->addDays(1);
-
-// Saturday, 7th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (218)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (218)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (218)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (218)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (218)');
-
-$date->addDays(1);
-
-// Sunday, 8th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (219)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (219)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (219)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (219)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (219)');
-
-$date->addDays(1);
-
-// Monday, 9th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (220)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (220)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (220)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (220)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (220)');
-
-$date->addDays(1);
-
-// Tuesday, 10th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (221)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (221)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (221)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (221)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (221)');
-
-$date->addDays(1);
-
-// Wednesday, 11th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (222)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (222)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (222)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (222)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (222)');
-
-$date->addDays(1);
-
-// Thursday, 12th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (223)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (223)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (223)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (223)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (223)');
-
-$date->addDays(1);
-
-// Friday, 13th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (224)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (224)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (224)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (224)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (224)');
-
-$date->addDays(1);
-
-// Saturday, 14th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (225)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (225)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (225)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (225)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (225)');
-
-$date->addDays(1);
-
-// Sunday, 15th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (226)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (226)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (226)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (226)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (226)');
-
-$date->addDays(1);
-
-// Monday, 16th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (227)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (227)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (227)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (227)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (227)');
-
-$date->addDays(1);
-
-// Tuesday, 17th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (228)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (228)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (228)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (228)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (228)');
-
-$date->addDays(1);
-
-// Wednesday, 18th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (229)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (229)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (229)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (229)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (229)');
-
-$date->addDays(1);
-
-// Thursday, 19th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (230)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (230)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (230)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (230)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (230)');
-
-$date->addDays(1);
-
-// Friday, 20th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (231)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (231)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (231)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (231)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (231)');
-
-$date->addDays(1);
-
-// Saturday, 21st August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (232)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (232)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (232)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (232)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (232)');
-
-$date->addDays(1);
-
-// Sunday, 22nd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (233)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (233)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (233)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (233)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (233)');
-
-$date->addDays(1);
-
-// Monday, 23rd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (234)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (234)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (234)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (234)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (234)');
-
-$date->addDays(1);
-
-// Tuesday, 24th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (235)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (235)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (235)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (235)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (235)');
-
-$date->addDays(1);
-
-// Wednesday, 25th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (236)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (236)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (236)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (236)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (236)');
-
-$date->addDays(1);
-
-// Thursday, 26th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (237)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (237)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (237)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (237)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (237)');
-
-$date->addDays(1);
-
-// Friday, 27th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (238)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (238)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (238)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (238)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (238)');
-
-$date->addDays(1);
-
-// Saturday, 28th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (239)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (239)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (239)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (239)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (239)');
-
-$date->addDays(1);
-
-// Sunday, 29th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (240)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (240)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (240)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (240)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (240)');
-
-$date->addDays(1);
-
-// Monday, 30th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (241)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (241)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (241)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (241)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (241)');
-
-$date->addDays(1);
-
-// Tuesday, 31st August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (242)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (242)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (242)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (242)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (242)');
-
-$date->addDays(1);
-
-// Wednesday, 1st September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (243)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (243)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (243)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (243)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (243)');
-
-$date->addDays(1);
-
-// Thursday, 2nd September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (244)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (244)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (244)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (244)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (244)');
-
-$date->addDays(1);
-
-// Friday, 3rd September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (245)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (245)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (245)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (245)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (245)');
-
-$date->addDays(1);
-
-// Saturday, 4th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (246)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (246)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (246)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (246)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (246)');
-
-$date->addDays(1);
-
-// Sunday, 5th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (247)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (247)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (247)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (247)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (247)');
-
-$date->addDays(1);
-
-// Monday, 6th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (248)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (248)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (248)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (248)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (248)');
-
-$date->addDays(1);
-
-// Tuesday, 7th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (249)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (249)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (249)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (249)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (249)');
-
-$date->addDays(1);
-
-// Wednesday, 8th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (250)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (250)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (250)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (250)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (250)');
-
-$date->addDays(1);
-
-// Thursday, 9th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (251)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (251)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (251)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (251)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (251)');
-
-$date->addDays(1);
-
-// Friday, 10th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (252)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (252)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (252)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (252)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (252)');
-
-$date->addDays(1);
-
-// Saturday, 11th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (253)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (253)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (253)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (253)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (253)');
-
-$date->addDays(1);
-
-// Sunday, 12th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (254)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (254)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (254)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (254)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (254)');
-
-$date->addDays(1);
-
-// Monday, 13th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (255)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (255)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (255)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (255)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (255)');
-
-$date->addDays(1);
-
-// Tuesday, 14th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (256)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (256)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (256)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (256)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (256)');
-
-$date->addDays(1);
-
-// Wednesday, 15th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (257)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (257)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (257)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (257)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (257)');
-
-$date->addDays(1);
-
-// Thursday, 16th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (258)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (258)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (258)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (258)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (258)');
-
-$date->addDays(1);
-
-// Friday, 17th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (259)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (259)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (259)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (259)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (259)');
-
-$date->addDays(1);
-
-// Saturday, 18th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (260)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (260)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (260)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (260)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (260)');
-
-$date->addDays(1);
-
-// Sunday, 19th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (261)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (261)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (261)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (261)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (261)');
-
-$date->addDays(1);
-
-// Monday, 20th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (262)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (262)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (262)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (262)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (262)');
-
-$date->addDays(1);
-
-// Tuesday, 21st September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (263)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (263)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (263)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (263)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (263)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (264)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (264)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (264)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (264)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (264)');
-
-$date->addDays(1);
-
-// Thursday, 23rd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (265)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (265)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (265)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (265)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (265)');
-
-$date->addDays(1);
-
-// Friday, 24th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (266)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (266)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (266)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (266)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (266)');
-
-$date->addDays(1);
-
-// Saturday, 25th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (267)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (267)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (267)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (267)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (267)');
-
-$date->addDays(1);
-
-// Sunday, 26th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (268)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (268)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (268)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (268)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (268)');
-
-$date->addDays(1);
-
-// Monday, 27th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (269)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (269)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (269)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (269)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (269)');
-
-$date->addDays(1);
-
-// Tuesday, 28th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (270)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (270)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (270)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (270)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (270)');
-
-$date->addDays(1);
-
-// Wednesday, 29th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (271)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (271)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (271)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (271)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (271)');
-
-$date->addDays(1);
-
-// Thursday, 30th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (272)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (272)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (272)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (272)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (272)');
-
-$date->addDays(1);
-
-// Friday, 1st October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (273)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (273)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (273)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (273)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (273)');
-
-$date->addDays(1);
-
-// Saturday, 2nd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (274)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (274)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (274)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (274)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (274)');
-
-$date->addDays(1);
-
-// Sunday, 3rd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (275)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (275)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (275)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (275)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (275)');
-
-$date->addDays(1);
-
-// Monday, 4th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (276)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (276)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (276)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (276)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (276)');
-
-$date->addDays(1);
-
-// Tuesday, 5th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (277)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (277)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (277)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (277)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (277)');
-
-$date->addDays(1);
-
-// Wednesday, 6th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (278)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (278)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (278)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (278)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (278)');
-
-$date->addDays(1);
-
-// Thursday, 7th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (279)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (279)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (279)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (279)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (279)');
-
-$date->addDays(1);
-
-// Friday, 8th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (280)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (280)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (280)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (280)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (280)');
-
-$date->addDays(1);
-
-// Saturday, 9th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (281)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (281)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (281)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (281)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (281)');
-
-$date->addDays(1);
-
-// Sunday, 10th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (282)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (282)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (282)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (282)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (282)');
-
-$date->addDays(1);
-
-// Monday, 11th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (283)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (283)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (283)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (283)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (283)');
-
-$date->addDays(1);
-
-// Tuesday, 12th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (284)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (284)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (284)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (284)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (284)');
-
-$date->addDays(1);
-
-// Wednesday, 13th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (285)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (285)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (285)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (285)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (285)');
-
-$date->addDays(1);
-
-// Thursday, 14th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (286)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (286)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (286)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (286)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (286)');
-
-$date->addDays(1);
-
-// Friday, 15th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (287)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (287)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (287)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (287)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (287)');
-
-$date->addDays(1);
-
-// Saturday, 16th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (288)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (288)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (288)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (288)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (288)');
-
-$date->addDays(1);
-
-// Sunday, 17th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (289)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (289)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (289)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (289)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (289)');
-
-$date->addDays(1);
-
-// Monday, 18th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (290)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (290)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (290)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (290)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (290)');
-
-$date->addDays(1);
-
-// Tuesday, 19th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (291)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (291)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (291)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (291)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (291)');
-
-$date->addDays(1);
-
-// Wednesday, 20th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (292)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (292)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (292)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (292)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (292)');
-
-$date->addDays(1);
-
-// Thursday, 21st October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (293)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (293)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (293)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (293)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (293)');
-
-$date->addDays(1);
-
-// Friday, 22nd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (294)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (294)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (294)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (294)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (294)');
-
-$date->addDays(1);
-
-// Saturday, 23rd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (295)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (295)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (295)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (295)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (295)');
-
-$date->addDays(1);
-
-// Sunday, 24th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (296)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (296)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (296)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (296)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (296)');
-
-$date->addDays(1);
-
-// Monday, 25th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (297)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (297)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (297)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (297)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (297)');
-
-$date->addDays(1);
-
-// Tuesday, 26th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (298)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (298)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (298)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (298)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (298)');
-
-$date->addDays(1);
-
-// Wednesday, 27th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (299)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (299)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (299)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (299)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (299)');
-
-$date->addDays(1);
-
-// Thursday, 28th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (300)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (300)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (300)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (300)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (300)');
-
-$date->addDays(1);
-
-// Friday, 29th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (301)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (301)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (301)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (301)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (301)');
-
-$date->addDays(1);
-
-// Saturday, 30th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (302)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (302)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (302)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (302)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (302)');
-
-$date->addDays(1);
-
-// Sunday, 31st October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (303)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (303)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (303)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (303)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (303)');
-
-$date->addDays(1);
-
-// Monday, 1st November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (304)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (304)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (304)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (304)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (304)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (305)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (305)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (305)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (305)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (305)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (306)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (306)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (306)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (306)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (306)');
-
-$date->addDays(1);
-
-// Thursday, 4th November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (307)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (307)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (307)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (307)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (307)');
-
-$date->addDays(1);
-
-// Friday, 5th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (308)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (308)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (308)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (308)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (308)');
-
-$date->addDays(1);
-
-// Saturday, 6th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (309)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (309)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (309)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (309)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (309)');
-
-$date->addDays(1);
-
-// Sunday, 7th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (310)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (310)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (310)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (310)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (310)');
-
-$date->addDays(1);
-
-// Monday, 8th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (311)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (311)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (311)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (311)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (311)');
-
-$date->addDays(1);
-
-// Tuesday, 9th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (312)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (312)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (312)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (312)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (312)');
-
-$date->addDays(1);
-
-// Wednesday, 10th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (313)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (313)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (313)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (313)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (313)');
-
-$date->addDays(1);
-
-// Thursday, 11th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (314)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (314)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (314)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (314)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (314)');
-
-$date->addDays(1);
-
-// Friday, 12th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (315)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (315)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (315)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (315)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (315)');
-
-$date->addDays(1);
-
-// Saturday, 13th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (316)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (316)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (316)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (316)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (316)');
-
-$date->addDays(1);
-
-// Sunday, 14th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (317)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (317)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (317)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (317)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (317)');
-
-$date->addDays(1);
-
-// Monday, 15th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (318)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (318)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (318)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (318)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (318)');
-
-$date->addDays(1);
-
-// Tuesday, 16th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (319)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (319)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (319)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (319)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (319)');
-
-$date->addDays(1);
-
-// Wednesday, 17th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (320)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (320)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (320)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (320)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (320)');
-
-$date->addDays(1);
-
-// Thursday, 18th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (321)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (321)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (321)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (321)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (321)');
-
-$date->addDays(1);
-
-// Friday, 19th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (322)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (322)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (322)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (322)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (322)');
-
-$date->addDays(1);
-
-// Saturday, 20th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (323)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (323)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (323)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (323)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (323)');
-
-$date->addDays(1);
-
-// Sunday, 21st November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (324)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (324)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (324)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (324)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (324)');
-
-$date->addDays(1);
-
-// Monday, 22nd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (325)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (325)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (325)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (325)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (325)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (326)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (326)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (326)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (326)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (326)');
-
-$date->addDays(1);
-
-// Wednesday, 24th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (327)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (327)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (327)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (327)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (327)');
-
-$date->addDays(1);
-
-// Thursday, 25th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (328)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (328)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (328)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (328)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (328)');
-
-$date->addDays(1);
-
-// Friday, 26th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (329)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (329)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (329)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (329)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (329)');
-
-$date->addDays(1);
-
-// Saturday, 27th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (330)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (330)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (330)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (330)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (330)');
-
-$date->addDays(1);
-
-// Sunday, 28th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (331)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (331)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (331)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (331)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (331)');
-
-$date->addDays(1);
-
-// Monday, 29th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (332)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (332)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (332)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (332)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (332)');
-
-$date->addDays(1);
-
-// Tuesday, 30th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (333)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (333)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (333)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (333)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (333)');
-
-$date->addDays(1);
-
-// Wednesday, 1st December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (334)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (334)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (334)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (334)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (334)');
-
-$date->addDays(1);
-
-// Thursday, 2nd December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (335)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (335)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (335)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (335)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (335)');
-
-$date->addDays(1);
-
-// Friday, 3rd December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (336)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (336)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (336)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (336)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (336)');
-
-$date->addDays(1);
-
-// Saturday, 4th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (337)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (337)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (337)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (337)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (337)');
-
-$date->addDays(1);
-
-// Sunday, 5th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (338)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (338)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (338)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (338)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (338)');
-
-$date->addDays(1);
-
-// Monday, 6th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (339)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (339)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (339)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (339)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (339)');
-
-$date->addDays(1);
-
-// Tuesday, 7th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (340)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (340)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (340)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (340)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (340)');
-
-$date->addDays(1);
-
-// Wednesday, 8th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (341)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (341)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (341)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (341)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (341)');
-
-$date->addDays(1);
-
-// Thursday, 9th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (342)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (342)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (342)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (342)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (342)');
-
-$date->addDays(1);
-
-// Friday, 10th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (343)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (343)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (343)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (343)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (343)');
-
-$date->addDays(1);
-
-// Saturday, 11th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (344)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (344)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (344)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (344)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (344)');
-
-$date->addDays(1);
-
-// Sunday, 12th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (345)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (345)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (345)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (345)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (345)');
-
-$date->addDays(1);
-
-// Monday, 13th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (346)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (346)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (346)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (346)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (346)');
-
-$date->addDays(1);
-
-// Tuesday, 14th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (347)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (347)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (347)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (347)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (347)');
-
-$date->addDays(1);
-
-// Wednesday, 15th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (348)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (348)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (348)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (348)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (348)');
-
-$date->addDays(1);
-
-// Thursday, 16th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (349)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (349)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (349)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (349)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (349)');
-
-$date->addDays(1);
-
-// Friday, 17th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (350)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (350)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (350)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (350)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (350)');
-
-$date->addDays(1);
-
-// Saturday, 18th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (351)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (351)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (351)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (351)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (351)');
-
-$date->addDays(1);
-
-// Sunday, 19th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (352)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (352)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (352)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (352)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (352)');
-
-$date->addDays(1);
-
-// Monday, 20th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (353)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (353)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (353)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (353)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (353)');
-
-$date->addDays(1);
-
-// Tuesday, 21st December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (354)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (354)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (354)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (354)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (354)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (355)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (355)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (355)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (355)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (355)');
-
-$date->addDays(1);
-
-// Thursday, 23rd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (356)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (356)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (356)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (356)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (356)');
-
-$date->addDays(1);
-
-// Friday, 24th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (357)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (357)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (357)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (357)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (357)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (358)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (358)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (358)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (358)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (358)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (359)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (359)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (359)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (359)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (359)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (360)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (360)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (360)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (360)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (360)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (361)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (361)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (361)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (361)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (361)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (362)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (362)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (362)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (362)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (362)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (363)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (363)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (363)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (363)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (363)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1999
-compare('53', $date->formatLikeSQL('WW'), 'WW (364)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (364)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (364)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (364)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (364)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (365)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (365)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (365)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (365)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (365)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (366)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (366)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (366)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (366)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (366)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (367)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (367)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (367)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (367)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (367)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (368)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (368)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (368)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (368)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (368)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (369)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (369)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (369)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (369)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (369)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (370)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (370)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (370)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (370)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (370)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (371)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (371)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (371)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (371)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (371)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2000
-compare('02', $date->formatLikeSQL('WW'), 'WW (372)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (372)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (372)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (372)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (372)');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc day of week functions
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-define('DATE_CALC_BEGIN_WEEKDAY', 3);
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("1998-12-24 00:00:00Z");
-
-// First day of week is Wednesday
-//
-
-// Thursday, 24th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-8)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-8)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-8)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-8)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-7)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-7)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-7)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-7)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-6)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-6)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-6)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-6)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-5)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-5)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-5)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-5)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-4)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-4)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-4)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-4)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-3)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-3)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-3)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-3)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-2)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-2)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1998
-compare('53', $date->formatLikeSQL('WW'), 'WW (-1)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-1)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (0)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (0)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (0)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (0)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (1)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (1)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (2)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (2)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (3)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (3)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (3)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (3)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (4)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (4)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (4)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (4)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (5)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (5)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (5)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (5)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (6)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (6)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (6)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (6)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (7)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (7)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (7)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (7)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (7)');
-
-$date->addDays(1);
-
-// Saturday, 9th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (8)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (8)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (8)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (8)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (8)');
-
-$date->addDays(1);
-
-// Sunday, 10th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (9)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (9)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (9)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (9)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (9)');
-
-$date->addDays(1);
-
-// Monday, 11th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (10)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (10)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (10)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (10)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (10)');
-
-$date->addDays(1);
-
-// Tuesday, 12th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (11)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (11)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (11)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (11)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (11)');
-
-$date->addDays(1);
-
-// Wednesday, 13th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (12)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (12)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (12)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (12)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (12)');
-
-$date->addDays(1);
-
-// Thursday, 14th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (13)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (13)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (13)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (13)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (13)');
-
-$date->addDays(1);
-
-// Friday, 15th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (14)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (14)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (14)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (14)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (14)');
-
-$date->addDays(1);
-
-// Saturday, 16th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (15)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (15)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (15)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (15)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (15)');
-
-$date->addDays(1);
-
-// Sunday, 17th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (16)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (16)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (16)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (16)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (16)');
-
-$date->addDays(1);
-
-// Monday, 18th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (17)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (17)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (17)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (17)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (17)');
-
-$date->addDays(1);
-
-// Tuesday, 19th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (18)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (18)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (18)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (18)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (18)');
-
-$date->addDays(1);
-
-// Wednesday, 20th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (19)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (19)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (19)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (19)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (19)');
-
-$date->addDays(1);
-
-// Thursday, 21st January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (20)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (20)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (20)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (20)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (20)');
-
-$date->addDays(1);
-
-// Friday, 22nd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (21)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (21)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (21)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (21)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (21)');
-
-$date->addDays(1);
-
-// Saturday, 23rd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (22)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (22)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (22)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (22)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (22)');
-
-$date->addDays(1);
-
-// Sunday, 24th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (23)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (23)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (23)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (23)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (23)');
-
-$date->addDays(1);
-
-// Monday, 25th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (24)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (24)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (24)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (24)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (24)');
-
-$date->addDays(1);
-
-// Tuesday, 26th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (25)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (25)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (25)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (25)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (25)');
-
-$date->addDays(1);
-
-// Wednesday, 27th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (26)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (26)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (26)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (26)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (26)');
-
-$date->addDays(1);
-
-// Thursday, 28th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (27)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (27)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (27)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (27)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (27)');
-
-$date->addDays(1);
-
-// Friday, 29th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (28)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (28)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (28)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (28)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (28)');
-
-$date->addDays(1);
-
-// Saturday, 30th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (29)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (29)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (29)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (29)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (29)');
-
-$date->addDays(1);
-
-// Sunday, 31st January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (30)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (30)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (30)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (30)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (30)');
-
-$date->addDays(1);
-
-// Monday, 1st February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (31)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (31)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (31)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (31)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (31)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (32)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (32)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (32)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (32)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (32)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (33)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (33)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (33)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (33)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (33)');
-
-$date->addDays(1);
-
-// Thursday, 4th February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (34)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (34)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (34)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (34)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (34)');
-
-$date->addDays(1);
-
-// Friday, 5th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (35)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (35)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (35)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (35)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (35)');
-
-$date->addDays(1);
-
-// Saturday, 6th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (36)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (36)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (36)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (36)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (36)');
-
-$date->addDays(1);
-
-// Sunday, 7th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (37)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (37)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (37)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (37)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (37)');
-
-$date->addDays(1);
-
-// Monday, 8th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (38)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (38)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (38)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (38)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (38)');
-
-$date->addDays(1);
-
-// Tuesday, 9th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (39)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (39)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (39)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (39)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (39)');
-
-$date->addDays(1);
-
-// Wednesday, 10th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (40)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (40)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (40)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (40)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (40)');
-
-$date->addDays(1);
-
-// Thursday, 11th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (41)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (41)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (41)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (41)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (41)');
-
-$date->addDays(1);
-
-// Friday, 12th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (42)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (42)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (42)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (42)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (42)');
-
-$date->addDays(1);
-
-// Saturday, 13th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (43)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (43)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (43)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (43)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (43)');
-
-$date->addDays(1);
-
-// Sunday, 14th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (44)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (44)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (44)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (44)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (44)');
-
-$date->addDays(1);
-
-// Monday, 15th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (45)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (45)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (45)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (45)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (45)');
-
-$date->addDays(1);
-
-// Tuesday, 16th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (46)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (46)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (46)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (46)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (46)');
-
-$date->addDays(1);
-
-// Wednesday, 17th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (47)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (47)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (47)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (47)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (47)');
-
-$date->addDays(1);
-
-// Thursday, 18th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (48)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (48)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (48)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (48)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (48)');
-
-$date->addDays(1);
-
-// Friday, 19th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (49)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (49)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (49)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (49)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (49)');
-
-$date->addDays(1);
-
-// Saturday, 20th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (50)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (50)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (50)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (50)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (50)');
-
-$date->addDays(1);
-
-// Sunday, 21st February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (51)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (51)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (51)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (51)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (51)');
-
-$date->addDays(1);
-
-// Monday, 22nd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (52)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (52)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (52)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (52)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (52)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (53)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (53)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (53)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (53)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (53)');
-
-$date->addDays(1);
-
-// Wednesday, 24th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (54)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (54)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (54)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (54)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (54)');
-
-$date->addDays(1);
-
-// Thursday, 25th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (55)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (55)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (55)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (55)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (55)');
-
-$date->addDays(1);
-
-// Friday, 26th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (56)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (56)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (56)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (56)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (56)');
-
-$date->addDays(1);
-
-// Saturday, 27th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (57)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (57)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (57)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (57)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (57)');
-
-$date->addDays(1);
-
-// Sunday, 28th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (58)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (58)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (58)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (58)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (58)');
-
-$date->addDays(1);
-
-// Monday, 1st March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (59)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (59)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (59)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (59)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (59)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (60)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (60)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (60)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (60)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (60)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (61)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (61)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (61)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (61)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (61)');
-
-$date->addDays(1);
-
-// Thursday, 4th March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (62)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (62)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (62)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (62)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (62)');
-
-$date->addDays(1);
-
-// Friday, 5th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (63)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (63)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (63)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (63)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (63)');
-
-$date->addDays(1);
-
-// Saturday, 6th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (64)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (64)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (64)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (64)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (64)');
-
-$date->addDays(1);
-
-// Sunday, 7th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (65)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (65)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (65)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (65)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (65)');
-
-$date->addDays(1);
-
-// Monday, 8th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (66)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (66)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (66)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (66)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (66)');
-
-$date->addDays(1);
-
-// Tuesday, 9th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (67)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (67)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (67)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (67)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (67)');
-
-$date->addDays(1);
-
-// Wednesday, 10th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (68)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (68)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (68)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (68)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (68)');
-
-$date->addDays(1);
-
-// Thursday, 11th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (69)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (69)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (69)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (69)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (69)');
-
-$date->addDays(1);
-
-// Friday, 12th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (70)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (70)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (70)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (70)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (70)');
-
-$date->addDays(1);
-
-// Saturday, 13th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (71)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (71)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (71)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (71)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (71)');
-
-$date->addDays(1);
-
-// Sunday, 14th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (72)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (72)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (72)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (72)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (72)');
-
-$date->addDays(1);
-
-// Monday, 15th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (73)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (73)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (73)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (73)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (73)');
-
-$date->addDays(1);
-
-// Tuesday, 16th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (74)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (74)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (74)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (74)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (74)');
-
-$date->addDays(1);
-
-// Wednesday, 17th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (75)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (75)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (75)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (75)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (75)');
-
-$date->addDays(1);
-
-// Thursday, 18th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (76)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (76)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (76)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (76)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (76)');
-
-$date->addDays(1);
-
-// Friday, 19th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (77)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (77)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (77)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (77)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (77)');
-
-$date->addDays(1);
-
-// Saturday, 20th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (78)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (78)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (78)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (78)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (78)');
-
-$date->addDays(1);
-
-// Sunday, 21st March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (79)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (79)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (79)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (79)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (79)');
-
-$date->addDays(1);
-
-// Monday, 22nd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (80)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (80)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (80)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (80)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (80)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (81)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (81)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (81)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (81)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (81)');
-
-$date->addDays(1);
-
-// Wednesday, 24th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (82)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (82)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (82)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (82)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (82)');
-
-$date->addDays(1);
-
-// Thursday, 25th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (83)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (83)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (83)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (83)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (83)');
-
-$date->addDays(1);
-
-// Friday, 26th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (84)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (84)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (84)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (84)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (84)');
-
-$date->addDays(1);
-
-// Saturday, 27th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (85)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (85)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (85)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (85)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (85)');
-
-$date->addDays(1);
-
-// Sunday, 28th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (86)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (86)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (86)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (86)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (86)');
-
-$date->addDays(1);
-
-// Monday, 29th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (87)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (87)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (87)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (87)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (87)');
-
-$date->addDays(1);
-
-// Tuesday, 30th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (88)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (88)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (88)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (88)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (88)');
-
-$date->addDays(1);
-
-// Wednesday, 31st March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (89)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (89)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (89)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (89)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (89)');
-
-$date->addDays(1);
-
-// Thursday, 1st April 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (90)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (90)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (90)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (90)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (90)');
-
-$date->addDays(1);
-
-// Friday, 2nd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (91)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (91)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (91)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (91)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (91)');
-
-$date->addDays(1);
-
-// Saturday, 3rd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (92)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (92)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (92)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (92)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (92)');
-
-$date->addDays(1);
-
-// Sunday, 4th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (93)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (93)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (93)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (93)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (93)');
-
-$date->addDays(1);
-
-// Monday, 5th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (94)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (94)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (94)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (94)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (94)');
-
-$date->addDays(1);
-
-// Tuesday, 6th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (95)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (95)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (95)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (95)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (95)');
-
-$date->addDays(1);
-
-// Wednesday, 7th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (96)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (96)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (96)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (96)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (96)');
-
-$date->addDays(1);
-
-// Thursday, 8th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (97)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (97)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (97)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (97)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (97)');
-
-$date->addDays(1);
-
-// Friday, 9th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (98)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (98)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (98)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (98)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (98)');
-
-$date->addDays(1);
-
-// Saturday, 10th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (99)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (99)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (99)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (99)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (99)');
-
-$date->addDays(1);
-
-// Sunday, 11th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (100)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (100)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (100)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (100)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (100)');
-
-$date->addDays(1);
-
-// Monday, 12th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (101)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (101)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (101)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (101)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (101)');
-
-$date->addDays(1);
-
-// Tuesday, 13th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (102)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (102)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (102)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (102)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (102)');
-
-$date->addDays(1);
-
-// Wednesday, 14th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (103)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (103)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (103)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (103)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (103)');
-
-$date->addDays(1);
-
-// Thursday, 15th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (104)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (104)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (104)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (104)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (104)');
-
-$date->addDays(1);
-
-// Friday, 16th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (105)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (105)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (105)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (105)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (105)');
-
-$date->addDays(1);
-
-// Saturday, 17th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (106)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (106)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (106)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (106)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (106)');
-
-$date->addDays(1);
-
-// Sunday, 18th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (107)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (107)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (107)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (107)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (107)');
-
-$date->addDays(1);
-
-// Monday, 19th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (108)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (108)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (108)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (108)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (108)');
-
-$date->addDays(1);
-
-// Tuesday, 20th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (109)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (109)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (109)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (109)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (109)');
-
-$date->addDays(1);
-
-// Wednesday, 21st April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (110)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (110)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (110)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (110)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (110)');
-
-$date->addDays(1);
-
-// Thursday, 22nd April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (111)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (111)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (111)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (111)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (111)');
-
-$date->addDays(1);
-
-// Friday, 23rd April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (112)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (112)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (112)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (112)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (112)');
-
-$date->addDays(1);
-
-// Saturday, 24th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (113)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (113)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (113)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (113)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (113)');
-
-$date->addDays(1);
-
-// Sunday, 25th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (114)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (114)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (114)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (114)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (114)');
-
-$date->addDays(1);
-
-// Monday, 26th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (115)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (115)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (115)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (115)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (115)');
-
-$date->addDays(1);
-
-// Tuesday, 27th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (116)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (116)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (116)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (116)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (116)');
-
-$date->addDays(1);
-
-// Wednesday, 28th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (117)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (117)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (117)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (117)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (117)');
-
-$date->addDays(1);
-
-// Thursday, 29th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (118)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (118)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (118)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (118)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (118)');
-
-$date->addDays(1);
-
-// Friday, 30th April 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (119)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (119)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (119)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (119)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (119)');
-
-$date->addDays(1);
-
-// Saturday, 1st May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (120)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (120)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (120)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (120)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (120)');
-
-$date->addDays(1);
-
-// Sunday, 2nd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (121)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (121)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (121)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (121)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (121)');
-
-$date->addDays(1);
-
-// Monday, 3rd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (122)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (122)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (122)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (122)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (122)');
-
-$date->addDays(1);
-
-// Tuesday, 4th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (123)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (123)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (123)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (123)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (123)');
-
-$date->addDays(1);
-
-// Wednesday, 5th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (124)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (124)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (124)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (124)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (124)');
-
-$date->addDays(1);
-
-// Thursday, 6th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (125)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (125)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (125)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (125)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (125)');
-
-$date->addDays(1);
-
-// Friday, 7th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (126)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (126)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (126)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (126)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (126)');
-
-$date->addDays(1);
-
-// Saturday, 8th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (127)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (127)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (127)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (127)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (127)');
-
-$date->addDays(1);
-
-// Sunday, 9th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (128)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (128)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (128)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (128)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (128)');
-
-$date->addDays(1);
-
-// Monday, 10th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (129)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (129)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (129)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (129)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (129)');
-
-$date->addDays(1);
-
-// Tuesday, 11th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (130)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (130)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (130)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (130)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (130)');
-
-$date->addDays(1);
-
-// Wednesday, 12th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (131)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (131)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (131)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (131)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (131)');
-
-$date->addDays(1);
-
-// Thursday, 13th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (132)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (132)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (132)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (132)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (132)');
-
-$date->addDays(1);
-
-// Friday, 14th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (133)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (133)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (133)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (133)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (133)');
-
-$date->addDays(1);
-
-// Saturday, 15th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (134)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (134)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (134)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (134)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (134)');
-
-$date->addDays(1);
-
-// Sunday, 16th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (135)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (135)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (135)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (135)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (135)');
-
-$date->addDays(1);
-
-// Monday, 17th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (136)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (136)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (136)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (136)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (136)');
-
-$date->addDays(1);
-
-// Tuesday, 18th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (137)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (137)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (137)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (137)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (137)');
-
-$date->addDays(1);
-
-// Wednesday, 19th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (138)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (138)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (138)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (138)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (138)');
-
-$date->addDays(1);
-
-// Thursday, 20th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (139)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (139)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (139)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (139)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (139)');
-
-$date->addDays(1);
-
-// Friday, 21st May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (140)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (140)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (140)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (140)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (140)');
-
-$date->addDays(1);
-
-// Saturday, 22nd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (141)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (141)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (141)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (141)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (141)');
-
-$date->addDays(1);
-
-// Sunday, 23rd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (142)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (142)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (142)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (142)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (142)');
-
-$date->addDays(1);
-
-// Monday, 24th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (143)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (143)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (143)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (143)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (143)');
-
-$date->addDays(1);
-
-// Tuesday, 25th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (144)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (144)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (144)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (144)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (144)');
-
-$date->addDays(1);
-
-// Wednesday, 26th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (145)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (145)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (145)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (145)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (145)');
-
-$date->addDays(1);
-
-// Thursday, 27th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (146)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (146)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (146)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (146)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (146)');
-
-$date->addDays(1);
-
-// Friday, 28th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (147)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (147)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (147)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (147)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (147)');
-
-$date->addDays(1);
-
-// Saturday, 29th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (148)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (148)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (148)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (148)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (148)');
-
-$date->addDays(1);
-
-// Sunday, 30th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (149)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (149)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (149)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (149)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (149)');
-
-$date->addDays(1);
-
-// Monday, 31st May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (150)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (150)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (150)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (150)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (150)');
-
-$date->addDays(1);
-
-// Tuesday, 1st June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (151)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (151)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (151)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (151)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (151)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (152)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (152)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (152)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (152)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (152)');
-
-$date->addDays(1);
-
-// Thursday, 3rd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (153)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (153)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (153)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (153)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (153)');
-
-$date->addDays(1);
-
-// Friday, 4th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (154)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (154)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (154)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (154)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (154)');
-
-$date->addDays(1);
-
-// Saturday, 5th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (155)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (155)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (155)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (155)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (155)');
-
-$date->addDays(1);
-
-// Sunday, 6th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (156)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (156)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (156)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (156)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (156)');
-
-$date->addDays(1);
-
-// Monday, 7th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (157)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (157)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (157)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (157)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (157)');
-
-$date->addDays(1);
-
-// Tuesday, 8th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (158)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (158)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (158)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (158)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (158)');
-
-$date->addDays(1);
-
-// Wednesday, 9th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (159)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (159)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (159)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (159)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (159)');
-
-$date->addDays(1);
-
-// Thursday, 10th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (160)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (160)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (160)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (160)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (160)');
-
-$date->addDays(1);
-
-// Friday, 11th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (161)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (161)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (161)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (161)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (161)');
-
-$date->addDays(1);
-
-// Saturday, 12th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (162)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (162)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (162)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (162)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (162)');
-
-$date->addDays(1);
-
-// Sunday, 13th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (163)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (163)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (163)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (163)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (163)');
-
-$date->addDays(1);
-
-// Monday, 14th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (164)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (164)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (164)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (164)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (164)');
-
-$date->addDays(1);
-
-// Tuesday, 15th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (165)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (165)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (165)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (165)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (165)');
-
-$date->addDays(1);
-
-// Wednesday, 16th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (166)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (166)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (166)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (166)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (166)');
-
-$date->addDays(1);
-
-// Thursday, 17th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (167)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (167)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (167)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (167)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (167)');
-
-$date->addDays(1);
-
-// Friday, 18th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (168)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (168)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (168)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (168)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (168)');
-
-$date->addDays(1);
-
-// Saturday, 19th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (169)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (169)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (169)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (169)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (169)');
-
-$date->addDays(1);
-
-// Sunday, 20th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (170)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (170)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (170)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (170)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (170)');
-
-$date->addDays(1);
-
-// Monday, 21st June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (171)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (171)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (171)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (171)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (171)');
-
-$date->addDays(1);
-
-// Tuesday, 22nd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (172)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (172)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (172)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (172)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (172)');
-
-$date->addDays(1);
-
-// Wednesday, 23rd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (173)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (173)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (173)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (173)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (173)');
-
-$date->addDays(1);
-
-// Thursday, 24th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (174)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (174)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (174)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (174)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (174)');
-
-$date->addDays(1);
-
-// Friday, 25th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (175)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (175)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (175)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (175)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (175)');
-
-$date->addDays(1);
-
-// Saturday, 26th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (176)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (176)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (176)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (176)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (176)');
-
-$date->addDays(1);
-
-// Sunday, 27th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (177)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (177)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (177)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (177)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (177)');
-
-$date->addDays(1);
-
-// Monday, 28th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (178)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (178)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (178)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (178)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (178)');
-
-$date->addDays(1);
-
-// Tuesday, 29th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (179)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (179)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (179)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (179)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (179)');
-
-$date->addDays(1);
-
-// Wednesday, 30th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (180)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (180)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (180)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (180)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (180)');
-
-$date->addDays(1);
-
-// Thursday, 1st July 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (181)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (181)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (181)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (181)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (181)');
-
-$date->addDays(1);
-
-// Friday, 2nd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (182)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (182)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (182)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (182)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (182)');
-
-$date->addDays(1);
-
-// Saturday, 3rd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (183)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (183)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (183)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (183)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (183)');
-
-$date->addDays(1);
-
-// Sunday, 4th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (184)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (184)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (184)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (184)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (184)');
-
-$date->addDays(1);
-
-// Monday, 5th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (185)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (185)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (185)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (185)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (185)');
-
-$date->addDays(1);
-
-// Tuesday, 6th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (186)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (186)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (186)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (186)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (186)');
-
-$date->addDays(1);
-
-// Wednesday, 7th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (187)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (187)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (187)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (187)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (187)');
-
-$date->addDays(1);
-
-// Thursday, 8th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (188)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (188)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (188)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (188)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (188)');
-
-$date->addDays(1);
-
-// Friday, 9th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (189)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (189)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (189)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (189)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (189)');
-
-$date->addDays(1);
-
-// Saturday, 10th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (190)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (190)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (190)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (190)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (190)');
-
-$date->addDays(1);
-
-// Sunday, 11th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (191)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (191)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (191)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (191)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (191)');
-
-$date->addDays(1);
-
-// Monday, 12th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (192)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (192)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (192)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (192)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (192)');
-
-$date->addDays(1);
-
-// Tuesday, 13th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (193)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (193)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (193)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (193)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (193)');
-
-$date->addDays(1);
-
-// Wednesday, 14th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (194)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (194)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (194)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (194)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (194)');
-
-$date->addDays(1);
-
-// Thursday, 15th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (195)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (195)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (195)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (195)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (195)');
-
-$date->addDays(1);
-
-// Friday, 16th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (196)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (196)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (196)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (196)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (196)');
-
-$date->addDays(1);
-
-// Saturday, 17th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (197)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (197)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (197)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (197)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (197)');
-
-$date->addDays(1);
-
-// Sunday, 18th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (198)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (198)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (198)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (198)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (198)');
-
-$date->addDays(1);
-
-// Monday, 19th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (199)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (199)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (199)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (199)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (199)');
-
-$date->addDays(1);
-
-// Tuesday, 20th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (200)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (200)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (200)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (200)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (200)');
-
-$date->addDays(1);
-
-// Wednesday, 21st July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (201)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (201)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (201)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (201)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (201)');
-
-$date->addDays(1);
-
-// Thursday, 22nd July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (202)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (202)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (202)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (202)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (202)');
-
-$date->addDays(1);
-
-// Friday, 23rd July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (203)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (203)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (203)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (203)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (203)');
-
-$date->addDays(1);
-
-// Saturday, 24th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (204)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (204)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (204)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (204)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (204)');
-
-$date->addDays(1);
-
-// Sunday, 25th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (205)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (205)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (205)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (205)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (205)');
-
-$date->addDays(1);
-
-// Monday, 26th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (206)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (206)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (206)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (206)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (206)');
-
-$date->addDays(1);
-
-// Tuesday, 27th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (207)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (207)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (207)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (207)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (207)');
-
-$date->addDays(1);
-
-// Wednesday, 28th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (208)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (208)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (208)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (208)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (208)');
-
-$date->addDays(1);
-
-// Thursday, 29th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (209)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (209)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (209)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (209)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (209)');
-
-$date->addDays(1);
-
-// Friday, 30th July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (210)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (210)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (210)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (210)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (210)');
-
-$date->addDays(1);
-
-// Saturday, 31st July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (211)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (211)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (211)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (211)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (211)');
-
-$date->addDays(1);
-
-// Sunday, 1st August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (212)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (212)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (212)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (212)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (212)');
-
-$date->addDays(1);
-
-// Monday, 2nd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (213)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (213)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (213)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (213)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (213)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (214)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (214)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (214)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (214)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (214)');
-
-$date->addDays(1);
-
-// Wednesday, 4th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (215)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (215)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (215)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (215)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (215)');
-
-$date->addDays(1);
-
-// Thursday, 5th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (216)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (216)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (216)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (216)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (216)');
-
-$date->addDays(1);
-
-// Friday, 6th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (217)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (217)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (217)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (217)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (217)');
-
-$date->addDays(1);
-
-// Saturday, 7th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (218)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (218)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (218)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (218)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (218)');
-
-$date->addDays(1);
-
-// Sunday, 8th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (219)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (219)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (219)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (219)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (219)');
-
-$date->addDays(1);
-
-// Monday, 9th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (220)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (220)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (220)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (220)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (220)');
-
-$date->addDays(1);
-
-// Tuesday, 10th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (221)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (221)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (221)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (221)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (221)');
-
-$date->addDays(1);
-
-// Wednesday, 11th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (222)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (222)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (222)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (222)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (222)');
-
-$date->addDays(1);
-
-// Thursday, 12th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (223)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (223)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (223)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (223)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (223)');
-
-$date->addDays(1);
-
-// Friday, 13th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (224)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (224)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (224)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (224)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (224)');
-
-$date->addDays(1);
-
-// Saturday, 14th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (225)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (225)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (225)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (225)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (225)');
-
-$date->addDays(1);
-
-// Sunday, 15th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (226)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (226)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (226)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (226)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (226)');
-
-$date->addDays(1);
-
-// Monday, 16th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (227)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (227)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (227)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (227)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (227)');
-
-$date->addDays(1);
-
-// Tuesday, 17th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (228)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (228)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (228)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (228)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (228)');
-
-$date->addDays(1);
-
-// Wednesday, 18th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (229)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (229)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (229)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (229)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (229)');
-
-$date->addDays(1);
-
-// Thursday, 19th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (230)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (230)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (230)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (230)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (230)');
-
-$date->addDays(1);
-
-// Friday, 20th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (231)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (231)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (231)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (231)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (231)');
-
-$date->addDays(1);
-
-// Saturday, 21st August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (232)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (232)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (232)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (232)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (232)');
-
-$date->addDays(1);
-
-// Sunday, 22nd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (233)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (233)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (233)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (233)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (233)');
-
-$date->addDays(1);
-
-// Monday, 23rd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (234)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (234)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (234)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (234)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (234)');
-
-$date->addDays(1);
-
-// Tuesday, 24th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (235)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (235)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (235)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (235)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (235)');
-
-$date->addDays(1);
-
-// Wednesday, 25th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (236)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (236)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (236)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (236)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (236)');
-
-$date->addDays(1);
-
-// Thursday, 26th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (237)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (237)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (237)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (237)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (237)');
-
-$date->addDays(1);
-
-// Friday, 27th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (238)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (238)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (238)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (238)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (238)');
-
-$date->addDays(1);
-
-// Saturday, 28th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (239)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (239)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (239)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (239)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (239)');
-
-$date->addDays(1);
-
-// Sunday, 29th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (240)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (240)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (240)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (240)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (240)');
-
-$date->addDays(1);
-
-// Monday, 30th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (241)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (241)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (241)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (241)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (241)');
-
-$date->addDays(1);
-
-// Tuesday, 31st August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (242)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (242)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (242)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (242)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (242)');
-
-$date->addDays(1);
-
-// Wednesday, 1st September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (243)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (243)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (243)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (243)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (243)');
-
-$date->addDays(1);
-
-// Thursday, 2nd September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (244)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (244)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (244)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (244)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (244)');
-
-$date->addDays(1);
-
-// Friday, 3rd September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (245)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (245)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (245)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (245)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (245)');
-
-$date->addDays(1);
-
-// Saturday, 4th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (246)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (246)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (246)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (246)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (246)');
-
-$date->addDays(1);
-
-// Sunday, 5th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (247)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (247)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (247)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (247)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (247)');
-
-$date->addDays(1);
-
-// Monday, 6th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (248)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (248)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (248)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (248)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (248)');
-
-$date->addDays(1);
-
-// Tuesday, 7th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (249)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (249)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (249)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (249)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (249)');
-
-$date->addDays(1);
-
-// Wednesday, 8th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (250)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (250)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (250)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (250)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (250)');
-
-$date->addDays(1);
-
-// Thursday, 9th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (251)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (251)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (251)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (251)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (251)');
-
-$date->addDays(1);
-
-// Friday, 10th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (252)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (252)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (252)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (252)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (252)');
-
-$date->addDays(1);
-
-// Saturday, 11th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (253)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (253)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (253)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (253)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (253)');
-
-$date->addDays(1);
-
-// Sunday, 12th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (254)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (254)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (254)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (254)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (254)');
-
-$date->addDays(1);
-
-// Monday, 13th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (255)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (255)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (255)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (255)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (255)');
-
-$date->addDays(1);
-
-// Tuesday, 14th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (256)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (256)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (256)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (256)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (256)');
-
-$date->addDays(1);
-
-// Wednesday, 15th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (257)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (257)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (257)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (257)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (257)');
-
-$date->addDays(1);
-
-// Thursday, 16th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (258)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (258)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (258)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (258)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (258)');
-
-$date->addDays(1);
-
-// Friday, 17th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (259)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (259)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (259)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (259)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (259)');
-
-$date->addDays(1);
-
-// Saturday, 18th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (260)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (260)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (260)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (260)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (260)');
-
-$date->addDays(1);
-
-// Sunday, 19th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (261)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (261)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (261)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (261)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (261)');
-
-$date->addDays(1);
-
-// Monday, 20th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (262)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (262)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (262)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (262)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (262)');
-
-$date->addDays(1);
-
-// Tuesday, 21st September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (263)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (263)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (263)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (263)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (263)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (264)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (264)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (264)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (264)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (264)');
-
-$date->addDays(1);
-
-// Thursday, 23rd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (265)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (265)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (265)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (265)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (265)');
-
-$date->addDays(1);
-
-// Friday, 24th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (266)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (266)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (266)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (266)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (266)');
-
-$date->addDays(1);
-
-// Saturday, 25th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (267)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (267)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (267)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (267)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (267)');
-
-$date->addDays(1);
-
-// Sunday, 26th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (268)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (268)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (268)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (268)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (268)');
-
-$date->addDays(1);
-
-// Monday, 27th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (269)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (269)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (269)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (269)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (269)');
-
-$date->addDays(1);
-
-// Tuesday, 28th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (270)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (270)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (270)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (270)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (270)');
-
-$date->addDays(1);
-
-// Wednesday, 29th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (271)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (271)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (271)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (271)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (271)');
-
-$date->addDays(1);
-
-// Thursday, 30th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (272)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (272)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (272)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (272)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (272)');
-
-$date->addDays(1);
-
-// Friday, 1st October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (273)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (273)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (273)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (273)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (273)');
-
-$date->addDays(1);
-
-// Saturday, 2nd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (274)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (274)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (274)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (274)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (274)');
-
-$date->addDays(1);
-
-// Sunday, 3rd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (275)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (275)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (275)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (275)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (275)');
-
-$date->addDays(1);
-
-// Monday, 4th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (276)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (276)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (276)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (276)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (276)');
-
-$date->addDays(1);
-
-// Tuesday, 5th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (277)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (277)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (277)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (277)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (277)');
-
-$date->addDays(1);
-
-// Wednesday, 6th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (278)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (278)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (278)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (278)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (278)');
-
-$date->addDays(1);
-
-// Thursday, 7th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (279)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (279)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (279)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (279)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (279)');
-
-$date->addDays(1);
-
-// Friday, 8th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (280)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (280)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (280)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (280)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (280)');
-
-$date->addDays(1);
-
-// Saturday, 9th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (281)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (281)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (281)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (281)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (281)');
-
-$date->addDays(1);
-
-// Sunday, 10th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (282)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (282)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (282)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (282)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (282)');
-
-$date->addDays(1);
-
-// Monday, 11th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (283)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (283)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (283)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (283)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (283)');
-
-$date->addDays(1);
-
-// Tuesday, 12th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (284)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (284)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (284)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (284)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (284)');
-
-$date->addDays(1);
-
-// Wednesday, 13th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (285)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (285)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (285)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (285)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (285)');
-
-$date->addDays(1);
-
-// Thursday, 14th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (286)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (286)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (286)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (286)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (286)');
-
-$date->addDays(1);
-
-// Friday, 15th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (287)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (287)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (287)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (287)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (287)');
-
-$date->addDays(1);
-
-// Saturday, 16th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (288)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (288)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (288)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (288)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (288)');
-
-$date->addDays(1);
-
-// Sunday, 17th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (289)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (289)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (289)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (289)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (289)');
-
-$date->addDays(1);
-
-// Monday, 18th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (290)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (290)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (290)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (290)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (290)');
-
-$date->addDays(1);
-
-// Tuesday, 19th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (291)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (291)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (291)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (291)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (291)');
-
-$date->addDays(1);
-
-// Wednesday, 20th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (292)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (292)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (292)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (292)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (292)');
-
-$date->addDays(1);
-
-// Thursday, 21st October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (293)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (293)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (293)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (293)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (293)');
-
-$date->addDays(1);
-
-// Friday, 22nd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (294)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (294)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (294)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (294)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (294)');
-
-$date->addDays(1);
-
-// Saturday, 23rd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (295)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (295)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (295)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (295)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (295)');
-
-$date->addDays(1);
-
-// Sunday, 24th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (296)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (296)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (296)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (296)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (296)');
-
-$date->addDays(1);
-
-// Monday, 25th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (297)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (297)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (297)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (297)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (297)');
-
-$date->addDays(1);
-
-// Tuesday, 26th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (298)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (298)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (298)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (298)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (298)');
-
-$date->addDays(1);
-
-// Wednesday, 27th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (299)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (299)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (299)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (299)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (299)');
-
-$date->addDays(1);
-
-// Thursday, 28th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (300)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (300)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (300)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (300)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (300)');
-
-$date->addDays(1);
-
-// Friday, 29th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (301)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (301)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (301)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (301)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (301)');
-
-$date->addDays(1);
-
-// Saturday, 30th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (302)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (302)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (302)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (302)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (302)');
-
-$date->addDays(1);
-
-// Sunday, 31st October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (303)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (303)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (303)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (303)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (303)');
-
-$date->addDays(1);
-
-// Monday, 1st November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (304)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (304)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (304)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (304)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (304)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (305)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (305)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (305)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (305)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (305)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (306)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (306)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (306)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (306)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (306)');
-
-$date->addDays(1);
-
-// Thursday, 4th November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (307)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (307)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (307)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (307)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (307)');
-
-$date->addDays(1);
-
-// Friday, 5th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (308)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (308)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (308)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (308)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (308)');
-
-$date->addDays(1);
-
-// Saturday, 6th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (309)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (309)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (309)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (309)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (309)');
-
-$date->addDays(1);
-
-// Sunday, 7th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (310)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (310)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (310)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (310)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (310)');
-
-$date->addDays(1);
-
-// Monday, 8th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (311)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (311)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (311)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (311)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (311)');
-
-$date->addDays(1);
-
-// Tuesday, 9th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (312)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (312)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (312)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (312)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (312)');
-
-$date->addDays(1);
-
-// Wednesday, 10th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (313)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (313)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (313)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (313)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (313)');
-
-$date->addDays(1);
-
-// Thursday, 11th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (314)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (314)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (314)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (314)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (314)');
-
-$date->addDays(1);
-
-// Friday, 12th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (315)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (315)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (315)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (315)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (315)');
-
-$date->addDays(1);
-
-// Saturday, 13th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (316)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (316)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (316)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (316)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (316)');
-
-$date->addDays(1);
-
-// Sunday, 14th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (317)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (317)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (317)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (317)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (317)');
-
-$date->addDays(1);
-
-// Monday, 15th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (318)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (318)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (318)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (318)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (318)');
-
-$date->addDays(1);
-
-// Tuesday, 16th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (319)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (319)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (319)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (319)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (319)');
-
-$date->addDays(1);
-
-// Wednesday, 17th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (320)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (320)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (320)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (320)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (320)');
-
-$date->addDays(1);
-
-// Thursday, 18th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (321)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (321)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (321)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (321)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (321)');
-
-$date->addDays(1);
-
-// Friday, 19th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (322)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (322)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (322)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (322)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (322)');
-
-$date->addDays(1);
-
-// Saturday, 20th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (323)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (323)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (323)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (323)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (323)');
-
-$date->addDays(1);
-
-// Sunday, 21st November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (324)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (324)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (324)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (324)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (324)');
-
-$date->addDays(1);
-
-// Monday, 22nd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (325)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (325)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (325)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (325)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (325)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (326)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (326)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (326)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (326)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (326)');
-
-$date->addDays(1);
-
-// Wednesday, 24th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (327)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (327)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (327)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (327)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (327)');
-
-$date->addDays(1);
-
-// Thursday, 25th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (328)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (328)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (328)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (328)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (328)');
-
-$date->addDays(1);
-
-// Friday, 26th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (329)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (329)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (329)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (329)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (329)');
-
-$date->addDays(1);
-
-// Saturday, 27th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (330)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (330)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (330)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (330)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (330)');
-
-$date->addDays(1);
-
-// Sunday, 28th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (331)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (331)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (331)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (331)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (331)');
-
-$date->addDays(1);
-
-// Monday, 29th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (332)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (332)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (332)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (332)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (332)');
-
-$date->addDays(1);
-
-// Tuesday, 30th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (333)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (333)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (333)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (333)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (333)');
-
-$date->addDays(1);
-
-// Wednesday, 1st December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (334)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (334)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (334)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (334)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (334)');
-
-$date->addDays(1);
-
-// Thursday, 2nd December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (335)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (335)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (335)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (335)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (335)');
-
-$date->addDays(1);
-
-// Friday, 3rd December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (336)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (336)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (336)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (336)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (336)');
-
-$date->addDays(1);
-
-// Saturday, 4th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (337)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (337)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (337)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (337)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (337)');
-
-$date->addDays(1);
-
-// Sunday, 5th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (338)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (338)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (338)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (338)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (338)');
-
-$date->addDays(1);
-
-// Monday, 6th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (339)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (339)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (339)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (339)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (339)');
-
-$date->addDays(1);
-
-// Tuesday, 7th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (340)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (340)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (340)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (340)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (340)');
-
-$date->addDays(1);
-
-// Wednesday, 8th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (341)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (341)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (341)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (341)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (341)');
-
-$date->addDays(1);
-
-// Thursday, 9th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (342)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (342)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (342)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (342)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (342)');
-
-$date->addDays(1);
-
-// Friday, 10th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (343)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (343)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (343)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (343)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (343)');
-
-$date->addDays(1);
-
-// Saturday, 11th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (344)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (344)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (344)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (344)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (344)');
-
-$date->addDays(1);
-
-// Sunday, 12th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (345)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (345)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (345)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (345)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (345)');
-
-$date->addDays(1);
-
-// Monday, 13th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (346)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (346)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (346)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (346)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (346)');
-
-$date->addDays(1);
-
-// Tuesday, 14th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (347)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (347)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (347)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (347)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (347)');
-
-$date->addDays(1);
-
-// Wednesday, 15th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (348)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (348)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (348)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (348)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (348)');
-
-$date->addDays(1);
-
-// Thursday, 16th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (349)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (349)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (349)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (349)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (349)');
-
-$date->addDays(1);
-
-// Friday, 17th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (350)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (350)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (350)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (350)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (350)');
-
-$date->addDays(1);
-
-// Saturday, 18th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (351)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (351)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (351)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (351)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (351)');
-
-$date->addDays(1);
-
-// Sunday, 19th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (352)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (352)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (352)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (352)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (352)');
-
-$date->addDays(1);
-
-// Monday, 20th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (353)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (353)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (353)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (353)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (353)');
-
-$date->addDays(1);
-
-// Tuesday, 21st December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (354)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (354)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (354)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (354)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (354)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (355)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (355)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (355)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (355)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (355)');
-
-$date->addDays(1);
-
-// Thursday, 23rd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (356)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (356)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (356)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (356)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (356)');
-
-$date->addDays(1);
-
-// Friday, 24th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (357)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (357)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (357)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (357)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (357)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (358)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (358)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (358)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (358)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (358)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (359)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (359)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (359)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (359)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (359)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (360)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (360)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (360)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (360)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (360)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (361)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (361)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (361)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (361)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (361)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (362)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (362)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (362)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (362)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (362)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (363)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (363)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (363)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (363)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (363)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1999
-compare('53', $date->formatLikeSQL('WW'), 'WW (364)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (364)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (364)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (364)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (364)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (365)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (365)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (365)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (365)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (365)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (366)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (366)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (366)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (366)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (366)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (367)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (367)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (367)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (367)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (367)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (368)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (368)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (368)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (368)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (368)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (369)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (369)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (369)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (369)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (369)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (370)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (370)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (370)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (370)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (370)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (371)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (371)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (371)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (371)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (371)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2000
-compare('02', $date->formatLikeSQL('WW'), 'WW (372)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (372)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (372)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (372)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (372)');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc day of week functions
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-define('DATE_CALC_BEGIN_WEEKDAY', 4);
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("1998-12-24 00:00:00Z");
-
-// First day of week is Thursday
-//
-
-// Thursday, 24th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-8)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-8)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-8)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-8)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-7)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-7)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-7)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-7)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-6)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-6)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-6)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-6)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-5)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-5)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-5)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-5)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-4)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-4)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-4)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-4)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-3)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-3)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-3)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-3)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-2)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-2)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1998
-compare('53', $date->formatLikeSQL('WW'), 'WW (-1)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-1)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (-1)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (-1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (0)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (0)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (0)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (0)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (1)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (1)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (1)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (2)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (2)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (2)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (3)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (3)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (3)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (3)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (4)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (4)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (4)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (4)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (5)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (5)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (5)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (5)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (6)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (6)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (6)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (6)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (7)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (7)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (7)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (7)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (7)');
-
-$date->addDays(1);
-
-// Saturday, 9th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (8)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (8)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (8)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (8)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (8)');
-
-$date->addDays(1);
-
-// Sunday, 10th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (9)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (9)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (9)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (9)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (9)');
-
-$date->addDays(1);
-
-// Monday, 11th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (10)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (10)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (10)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (10)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (10)');
-
-$date->addDays(1);
-
-// Tuesday, 12th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (11)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (11)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (11)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (11)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (11)');
-
-$date->addDays(1);
-
-// Wednesday, 13th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (12)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (12)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (12)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (12)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (12)');
-
-$date->addDays(1);
-
-// Thursday, 14th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (13)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (13)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (13)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (13)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (13)');
-
-$date->addDays(1);
-
-// Friday, 15th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (14)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (14)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (14)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (14)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (14)');
-
-$date->addDays(1);
-
-// Saturday, 16th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (15)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (15)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (15)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (15)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (15)');
-
-$date->addDays(1);
-
-// Sunday, 17th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (16)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (16)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (16)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (16)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (16)');
-
-$date->addDays(1);
-
-// Monday, 18th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (17)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (17)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (17)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (17)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (17)');
-
-$date->addDays(1);
-
-// Tuesday, 19th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (18)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (18)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (18)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (18)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (18)');
-
-$date->addDays(1);
-
-// Wednesday, 20th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (19)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (19)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (19)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (19)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (19)');
-
-$date->addDays(1);
-
-// Thursday, 21st January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (20)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (20)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (20)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (20)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (20)');
-
-$date->addDays(1);
-
-// Friday, 22nd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (21)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (21)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (21)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (21)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (21)');
-
-$date->addDays(1);
-
-// Saturday, 23rd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (22)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (22)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (22)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (22)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (22)');
-
-$date->addDays(1);
-
-// Sunday, 24th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (23)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (23)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (23)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (23)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (23)');
-
-$date->addDays(1);
-
-// Monday, 25th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (24)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (24)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (24)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (24)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (24)');
-
-$date->addDays(1);
-
-// Tuesday, 26th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (25)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (25)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (25)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (25)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (25)');
-
-$date->addDays(1);
-
-// Wednesday, 27th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (26)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (26)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (26)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (26)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (26)');
-
-$date->addDays(1);
-
-// Thursday, 28th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (27)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (27)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (27)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (27)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (27)');
-
-$date->addDays(1);
-
-// Friday, 29th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (28)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (28)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (28)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (28)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (28)');
-
-$date->addDays(1);
-
-// Saturday, 30th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (29)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (29)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (29)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (29)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (29)');
-
-$date->addDays(1);
-
-// Sunday, 31st January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (30)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (30)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (30)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (30)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (30)');
-
-$date->addDays(1);
-
-// Monday, 1st February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (31)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (31)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (31)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (31)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (31)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (32)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (32)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (32)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (32)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (32)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (33)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (33)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (33)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (33)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (33)');
-
-$date->addDays(1);
-
-// Thursday, 4th February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (34)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (34)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (34)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (34)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (34)');
-
-$date->addDays(1);
-
-// Friday, 5th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (35)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (35)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (35)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (35)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (35)');
-
-$date->addDays(1);
-
-// Saturday, 6th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (36)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (36)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (36)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (36)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (36)');
-
-$date->addDays(1);
-
-// Sunday, 7th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (37)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (37)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (37)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (37)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (37)');
-
-$date->addDays(1);
-
-// Monday, 8th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (38)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (38)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (38)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (38)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (38)');
-
-$date->addDays(1);
-
-// Tuesday, 9th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (39)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (39)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (39)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (39)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (39)');
-
-$date->addDays(1);
-
-// Wednesday, 10th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (40)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (40)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (40)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (40)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (40)');
-
-$date->addDays(1);
-
-// Thursday, 11th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (41)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (41)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (41)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (41)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (41)');
-
-$date->addDays(1);
-
-// Friday, 12th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (42)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (42)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (42)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (42)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (42)');
-
-$date->addDays(1);
-
-// Saturday, 13th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (43)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (43)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (43)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (43)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (43)');
-
-$date->addDays(1);
-
-// Sunday, 14th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (44)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (44)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (44)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (44)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (44)');
-
-$date->addDays(1);
-
-// Monday, 15th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (45)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (45)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (45)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (45)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (45)');
-
-$date->addDays(1);
-
-// Tuesday, 16th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (46)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (46)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (46)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (46)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (46)');
-
-$date->addDays(1);
-
-// Wednesday, 17th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (47)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (47)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (47)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (47)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (47)');
-
-$date->addDays(1);
-
-// Thursday, 18th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (48)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (48)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (48)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (48)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (48)');
-
-$date->addDays(1);
-
-// Friday, 19th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (49)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (49)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (49)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (49)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (49)');
-
-$date->addDays(1);
-
-// Saturday, 20th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (50)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (50)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (50)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (50)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (50)');
-
-$date->addDays(1);
-
-// Sunday, 21st February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (51)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (51)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (51)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (51)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (51)');
-
-$date->addDays(1);
-
-// Monday, 22nd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (52)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (52)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (52)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (52)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (52)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (53)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (53)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (53)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (53)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (53)');
-
-$date->addDays(1);
-
-// Wednesday, 24th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (54)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (54)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (54)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (54)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (54)');
-
-$date->addDays(1);
-
-// Thursday, 25th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (55)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (55)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (55)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (55)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (55)');
-
-$date->addDays(1);
-
-// Friday, 26th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (56)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (56)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (56)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (56)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (56)');
-
-$date->addDays(1);
-
-// Saturday, 27th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (57)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (57)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (57)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (57)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (57)');
-
-$date->addDays(1);
-
-// Sunday, 28th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (58)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (58)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (58)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (58)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (58)');
-
-$date->addDays(1);
-
-// Monday, 1st March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (59)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (59)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (59)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (59)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (59)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (60)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (60)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (60)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (60)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (60)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (61)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (61)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (61)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (61)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (61)');
-
-$date->addDays(1);
-
-// Thursday, 4th March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (62)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (62)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (62)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (62)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (62)');
-
-$date->addDays(1);
-
-// Friday, 5th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (63)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (63)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (63)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (63)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (63)');
-
-$date->addDays(1);
-
-// Saturday, 6th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (64)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (64)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (64)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (64)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (64)');
-
-$date->addDays(1);
-
-// Sunday, 7th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (65)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (65)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (65)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (65)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (65)');
-
-$date->addDays(1);
-
-// Monday, 8th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (66)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (66)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (66)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (66)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (66)');
-
-$date->addDays(1);
-
-// Tuesday, 9th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (67)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (67)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (67)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (67)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (67)');
-
-$date->addDays(1);
-
-// Wednesday, 10th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (68)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (68)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (68)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (68)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (68)');
-
-$date->addDays(1);
-
-// Thursday, 11th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (69)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (69)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (69)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (69)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (69)');
-
-$date->addDays(1);
-
-// Friday, 12th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (70)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (70)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (70)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (70)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (70)');
-
-$date->addDays(1);
-
-// Saturday, 13th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (71)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (71)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (71)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (71)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (71)');
-
-$date->addDays(1);
-
-// Sunday, 14th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (72)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (72)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (72)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (72)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (72)');
-
-$date->addDays(1);
-
-// Monday, 15th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (73)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (73)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (73)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (73)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (73)');
-
-$date->addDays(1);
-
-// Tuesday, 16th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (74)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (74)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (74)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (74)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (74)');
-
-$date->addDays(1);
-
-// Wednesday, 17th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (75)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (75)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (75)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (75)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (75)');
-
-$date->addDays(1);
-
-// Thursday, 18th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (76)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (76)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (76)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (76)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (76)');
-
-$date->addDays(1);
-
-// Friday, 19th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (77)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (77)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (77)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (77)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (77)');
-
-$date->addDays(1);
-
-// Saturday, 20th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (78)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (78)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (78)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (78)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (78)');
-
-$date->addDays(1);
-
-// Sunday, 21st March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (79)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (79)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (79)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (79)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (79)');
-
-$date->addDays(1);
-
-// Monday, 22nd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (80)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (80)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (80)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (80)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (80)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (81)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (81)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (81)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (81)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (81)');
-
-$date->addDays(1);
-
-// Wednesday, 24th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (82)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (82)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (82)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (82)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (82)');
-
-$date->addDays(1);
-
-// Thursday, 25th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (83)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (83)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (83)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (83)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (83)');
-
-$date->addDays(1);
-
-// Friday, 26th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (84)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (84)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (84)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (84)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (84)');
-
-$date->addDays(1);
-
-// Saturday, 27th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (85)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (85)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (85)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (85)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (85)');
-
-$date->addDays(1);
-
-// Sunday, 28th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (86)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (86)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (86)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (86)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (86)');
-
-$date->addDays(1);
-
-// Monday, 29th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (87)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (87)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (87)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (87)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (87)');
-
-$date->addDays(1);
-
-// Tuesday, 30th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (88)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (88)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (88)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (88)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (88)');
-
-$date->addDays(1);
-
-// Wednesday, 31st March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (89)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (89)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (89)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (89)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (89)');
-
-$date->addDays(1);
-
-// Thursday, 1st April 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (90)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (90)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (90)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (90)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (90)');
-
-$date->addDays(1);
-
-// Friday, 2nd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (91)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (91)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (91)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (91)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (91)');
-
-$date->addDays(1);
-
-// Saturday, 3rd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (92)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (92)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (92)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (92)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (92)');
-
-$date->addDays(1);
-
-// Sunday, 4th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (93)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (93)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (93)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (93)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (93)');
-
-$date->addDays(1);
-
-// Monday, 5th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (94)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (94)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (94)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (94)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (94)');
-
-$date->addDays(1);
-
-// Tuesday, 6th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (95)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (95)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (95)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (95)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (95)');
-
-$date->addDays(1);
-
-// Wednesday, 7th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (96)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (96)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (96)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (96)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (96)');
-
-$date->addDays(1);
-
-// Thursday, 8th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (97)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (97)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (97)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (97)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (97)');
-
-$date->addDays(1);
-
-// Friday, 9th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (98)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (98)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (98)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (98)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (98)');
-
-$date->addDays(1);
-
-// Saturday, 10th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (99)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (99)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (99)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (99)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (99)');
-
-$date->addDays(1);
-
-// Sunday, 11th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (100)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (100)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (100)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (100)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (100)');
-
-$date->addDays(1);
-
-// Monday, 12th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (101)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (101)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (101)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (101)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (101)');
-
-$date->addDays(1);
-
-// Tuesday, 13th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (102)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (102)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (102)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (102)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (102)');
-
-$date->addDays(1);
-
-// Wednesday, 14th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (103)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (103)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (103)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (103)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (103)');
-
-$date->addDays(1);
-
-// Thursday, 15th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (104)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (104)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (104)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (104)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (104)');
-
-$date->addDays(1);
-
-// Friday, 16th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (105)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (105)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (105)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (105)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (105)');
-
-$date->addDays(1);
-
-// Saturday, 17th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (106)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (106)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (106)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (106)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (106)');
-
-$date->addDays(1);
-
-// Sunday, 18th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (107)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (107)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (107)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (107)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (107)');
-
-$date->addDays(1);
-
-// Monday, 19th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (108)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (108)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (108)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (108)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (108)');
-
-$date->addDays(1);
-
-// Tuesday, 20th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (109)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (109)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (109)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (109)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (109)');
-
-$date->addDays(1);
-
-// Wednesday, 21st April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (110)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (110)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (110)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (110)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (110)');
-
-$date->addDays(1);
-
-// Thursday, 22nd April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (111)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (111)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (111)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (111)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (111)');
-
-$date->addDays(1);
-
-// Friday, 23rd April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (112)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (112)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (112)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (112)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (112)');
-
-$date->addDays(1);
-
-// Saturday, 24th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (113)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (113)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (113)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (113)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (113)');
-
-$date->addDays(1);
-
-// Sunday, 25th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (114)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (114)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (114)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (114)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (114)');
-
-$date->addDays(1);
-
-// Monday, 26th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (115)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (115)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (115)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (115)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (115)');
-
-$date->addDays(1);
-
-// Tuesday, 27th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (116)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (116)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (116)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (116)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (116)');
-
-$date->addDays(1);
-
-// Wednesday, 28th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (117)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (117)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (117)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (117)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (117)');
-
-$date->addDays(1);
-
-// Thursday, 29th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (118)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (118)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (118)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (118)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (118)');
-
-$date->addDays(1);
-
-// Friday, 30th April 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (119)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (119)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (119)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (119)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (119)');
-
-$date->addDays(1);
-
-// Saturday, 1st May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (120)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (120)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (120)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (120)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (120)');
-
-$date->addDays(1);
-
-// Sunday, 2nd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (121)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (121)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (121)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (121)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (121)');
-
-$date->addDays(1);
-
-// Monday, 3rd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (122)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (122)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (122)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (122)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (122)');
-
-$date->addDays(1);
-
-// Tuesday, 4th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (123)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (123)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (123)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (123)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (123)');
-
-$date->addDays(1);
-
-// Wednesday, 5th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (124)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (124)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (124)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (124)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (124)');
-
-$date->addDays(1);
-
-// Thursday, 6th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (125)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (125)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (125)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (125)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (125)');
-
-$date->addDays(1);
-
-// Friday, 7th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (126)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (126)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (126)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (126)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (126)');
-
-$date->addDays(1);
-
-// Saturday, 8th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (127)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (127)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (127)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (127)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (127)');
-
-$date->addDays(1);
-
-// Sunday, 9th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (128)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (128)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (128)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (128)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (128)');
-
-$date->addDays(1);
-
-// Monday, 10th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (129)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (129)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (129)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (129)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (129)');
-
-$date->addDays(1);
-
-// Tuesday, 11th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (130)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (130)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (130)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (130)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (130)');
-
-$date->addDays(1);
-
-// Wednesday, 12th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (131)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (131)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (131)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (131)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (131)');
-
-$date->addDays(1);
-
-// Thursday, 13th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (132)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (132)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (132)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (132)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (132)');
-
-$date->addDays(1);
-
-// Friday, 14th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (133)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (133)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (133)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (133)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (133)');
-
-$date->addDays(1);
-
-// Saturday, 15th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (134)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (134)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (134)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (134)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (134)');
-
-$date->addDays(1);
-
-// Sunday, 16th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (135)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (135)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (135)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (135)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (135)');
-
-$date->addDays(1);
-
-// Monday, 17th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (136)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (136)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (136)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (136)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (136)');
-
-$date->addDays(1);
-
-// Tuesday, 18th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (137)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (137)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (137)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (137)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (137)');
-
-$date->addDays(1);
-
-// Wednesday, 19th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (138)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (138)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (138)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (138)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (138)');
-
-$date->addDays(1);
-
-// Thursday, 20th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (139)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (139)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (139)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (139)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (139)');
-
-$date->addDays(1);
-
-// Friday, 21st May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (140)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (140)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (140)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (140)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (140)');
-
-$date->addDays(1);
-
-// Saturday, 22nd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (141)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (141)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (141)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (141)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (141)');
-
-$date->addDays(1);
-
-// Sunday, 23rd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (142)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (142)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (142)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (142)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (142)');
-
-$date->addDays(1);
-
-// Monday, 24th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (143)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (143)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (143)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (143)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (143)');
-
-$date->addDays(1);
-
-// Tuesday, 25th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (144)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (144)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (144)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (144)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (144)');
-
-$date->addDays(1);
-
-// Wednesday, 26th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (145)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (145)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (145)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (145)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (145)');
-
-$date->addDays(1);
-
-// Thursday, 27th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (146)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (146)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (146)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (146)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (146)');
-
-$date->addDays(1);
-
-// Friday, 28th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (147)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (147)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (147)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (147)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (147)');
-
-$date->addDays(1);
-
-// Saturday, 29th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (148)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (148)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (148)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (148)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (148)');
-
-$date->addDays(1);
-
-// Sunday, 30th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (149)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (149)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (149)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (149)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (149)');
-
-$date->addDays(1);
-
-// Monday, 31st May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (150)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (150)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (150)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (150)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (150)');
-
-$date->addDays(1);
-
-// Tuesday, 1st June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (151)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (151)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (151)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (151)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (151)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (152)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (152)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (152)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (152)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (152)');
-
-$date->addDays(1);
-
-// Thursday, 3rd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (153)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (153)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (153)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (153)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (153)');
-
-$date->addDays(1);
-
-// Friday, 4th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (154)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (154)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (154)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (154)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (154)');
-
-$date->addDays(1);
-
-// Saturday, 5th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (155)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (155)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (155)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (155)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (155)');
-
-$date->addDays(1);
-
-// Sunday, 6th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (156)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (156)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (156)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (156)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (156)');
-
-$date->addDays(1);
-
-// Monday, 7th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (157)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (157)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (157)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (157)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (157)');
-
-$date->addDays(1);
-
-// Tuesday, 8th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (158)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (158)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (158)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (158)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (158)');
-
-$date->addDays(1);
-
-// Wednesday, 9th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (159)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (159)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (159)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (159)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (159)');
-
-$date->addDays(1);
-
-// Thursday, 10th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (160)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (160)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (160)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (160)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (160)');
-
-$date->addDays(1);
-
-// Friday, 11th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (161)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (161)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (161)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (161)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (161)');
-
-$date->addDays(1);
-
-// Saturday, 12th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (162)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (162)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (162)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (162)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (162)');
-
-$date->addDays(1);
-
-// Sunday, 13th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (163)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (163)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (163)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (163)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (163)');
-
-$date->addDays(1);
-
-// Monday, 14th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (164)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (164)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (164)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (164)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (164)');
-
-$date->addDays(1);
-
-// Tuesday, 15th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (165)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (165)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (165)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (165)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (165)');
-
-$date->addDays(1);
-
-// Wednesday, 16th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (166)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (166)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (166)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (166)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (166)');
-
-$date->addDays(1);
-
-// Thursday, 17th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (167)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (167)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (167)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (167)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (167)');
-
-$date->addDays(1);
-
-// Friday, 18th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (168)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (168)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (168)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (168)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (168)');
-
-$date->addDays(1);
-
-// Saturday, 19th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (169)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (169)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (169)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (169)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (169)');
-
-$date->addDays(1);
-
-// Sunday, 20th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (170)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (170)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (170)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (170)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (170)');
-
-$date->addDays(1);
-
-// Monday, 21st June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (171)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (171)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (171)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (171)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (171)');
-
-$date->addDays(1);
-
-// Tuesday, 22nd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (172)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (172)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (172)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (172)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (172)');
-
-$date->addDays(1);
-
-// Wednesday, 23rd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (173)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (173)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (173)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (173)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (173)');
-
-$date->addDays(1);
-
-// Thursday, 24th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (174)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (174)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (174)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (174)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (174)');
-
-$date->addDays(1);
-
-// Friday, 25th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (175)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (175)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (175)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (175)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (175)');
-
-$date->addDays(1);
-
-// Saturday, 26th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (176)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (176)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (176)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (176)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (176)');
-
-$date->addDays(1);
-
-// Sunday, 27th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (177)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (177)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (177)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (177)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (177)');
-
-$date->addDays(1);
-
-// Monday, 28th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (178)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (178)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (178)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (178)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (178)');
-
-$date->addDays(1);
-
-// Tuesday, 29th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (179)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (179)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (179)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (179)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (179)');
-
-$date->addDays(1);
-
-// Wednesday, 30th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (180)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (180)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (180)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (180)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (180)');
-
-$date->addDays(1);
-
-// Thursday, 1st July 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (181)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (181)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (181)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (181)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (181)');
-
-$date->addDays(1);
-
-// Friday, 2nd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (182)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (182)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (182)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (182)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (182)');
-
-$date->addDays(1);
-
-// Saturday, 3rd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (183)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (183)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (183)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (183)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (183)');
-
-$date->addDays(1);
-
-// Sunday, 4th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (184)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (184)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (184)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (184)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (184)');
-
-$date->addDays(1);
-
-// Monday, 5th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (185)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (185)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (185)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (185)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (185)');
-
-$date->addDays(1);
-
-// Tuesday, 6th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (186)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (186)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (186)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (186)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (186)');
-
-$date->addDays(1);
-
-// Wednesday, 7th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (187)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (187)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (187)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (187)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (187)');
-
-$date->addDays(1);
-
-// Thursday, 8th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (188)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (188)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (188)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (188)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (188)');
-
-$date->addDays(1);
-
-// Friday, 9th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (189)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (189)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (189)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (189)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (189)');
-
-$date->addDays(1);
-
-// Saturday, 10th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (190)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (190)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (190)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (190)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (190)');
-
-$date->addDays(1);
-
-// Sunday, 11th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (191)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (191)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (191)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (191)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (191)');
-
-$date->addDays(1);
-
-// Monday, 12th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (192)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (192)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (192)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (192)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (192)');
-
-$date->addDays(1);
-
-// Tuesday, 13th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (193)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (193)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (193)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (193)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (193)');
-
-$date->addDays(1);
-
-// Wednesday, 14th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (194)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (194)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (194)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (194)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (194)');
-
-$date->addDays(1);
-
-// Thursday, 15th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (195)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (195)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (195)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (195)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (195)');
-
-$date->addDays(1);
-
-// Friday, 16th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (196)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (196)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (196)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (196)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (196)');
-
-$date->addDays(1);
-
-// Saturday, 17th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (197)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (197)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (197)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (197)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (197)');
-
-$date->addDays(1);
-
-// Sunday, 18th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (198)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (198)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (198)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (198)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (198)');
-
-$date->addDays(1);
-
-// Monday, 19th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (199)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (199)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (199)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (199)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (199)');
-
-$date->addDays(1);
-
-// Tuesday, 20th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (200)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (200)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (200)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (200)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (200)');
-
-$date->addDays(1);
-
-// Wednesday, 21st July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (201)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (201)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (201)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (201)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (201)');
-
-$date->addDays(1);
-
-// Thursday, 22nd July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (202)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (202)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (202)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (202)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (202)');
-
-$date->addDays(1);
-
-// Friday, 23rd July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (203)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (203)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (203)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (203)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (203)');
-
-$date->addDays(1);
-
-// Saturday, 24th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (204)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (204)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (204)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (204)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (204)');
-
-$date->addDays(1);
-
-// Sunday, 25th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (205)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (205)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (205)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (205)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (205)');
-
-$date->addDays(1);
-
-// Monday, 26th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (206)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (206)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (206)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (206)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (206)');
-
-$date->addDays(1);
-
-// Tuesday, 27th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (207)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (207)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (207)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (207)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (207)');
-
-$date->addDays(1);
-
-// Wednesday, 28th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (208)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (208)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (208)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (208)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (208)');
-
-$date->addDays(1);
-
-// Thursday, 29th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (209)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (209)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (209)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (209)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (209)');
-
-$date->addDays(1);
-
-// Friday, 30th July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (210)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (210)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (210)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (210)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (210)');
-
-$date->addDays(1);
-
-// Saturday, 31st July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (211)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (211)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (211)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (211)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (211)');
-
-$date->addDays(1);
-
-// Sunday, 1st August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (212)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (212)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (212)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (212)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (212)');
-
-$date->addDays(1);
-
-// Monday, 2nd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (213)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (213)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (213)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (213)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (213)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (214)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (214)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (214)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (214)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (214)');
-
-$date->addDays(1);
-
-// Wednesday, 4th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (215)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (215)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (215)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (215)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (215)');
-
-$date->addDays(1);
-
-// Thursday, 5th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (216)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (216)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (216)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (216)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (216)');
-
-$date->addDays(1);
-
-// Friday, 6th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (217)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (217)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (217)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (217)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (217)');
-
-$date->addDays(1);
-
-// Saturday, 7th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (218)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (218)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (218)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (218)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (218)');
-
-$date->addDays(1);
-
-// Sunday, 8th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (219)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (219)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (219)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (219)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (219)');
-
-$date->addDays(1);
-
-// Monday, 9th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (220)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (220)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (220)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (220)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (220)');
-
-$date->addDays(1);
-
-// Tuesday, 10th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (221)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (221)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (221)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (221)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (221)');
-
-$date->addDays(1);
-
-// Wednesday, 11th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (222)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (222)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (222)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (222)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (222)');
-
-$date->addDays(1);
-
-// Thursday, 12th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (223)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (223)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (223)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (223)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (223)');
-
-$date->addDays(1);
-
-// Friday, 13th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (224)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (224)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (224)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (224)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (224)');
-
-$date->addDays(1);
-
-// Saturday, 14th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (225)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (225)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (225)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (225)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (225)');
-
-$date->addDays(1);
-
-// Sunday, 15th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (226)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (226)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (226)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (226)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (226)');
-
-$date->addDays(1);
-
-// Monday, 16th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (227)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (227)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (227)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (227)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (227)');
-
-$date->addDays(1);
-
-// Tuesday, 17th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (228)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (228)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (228)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (228)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (228)');
-
-$date->addDays(1);
-
-// Wednesday, 18th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (229)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (229)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (229)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (229)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (229)');
-
-$date->addDays(1);
-
-// Thursday, 19th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (230)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (230)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (230)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (230)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (230)');
-
-$date->addDays(1);
-
-// Friday, 20th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (231)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (231)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (231)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (231)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (231)');
-
-$date->addDays(1);
-
-// Saturday, 21st August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (232)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (232)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (232)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (232)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (232)');
-
-$date->addDays(1);
-
-// Sunday, 22nd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (233)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (233)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (233)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (233)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (233)');
-
-$date->addDays(1);
-
-// Monday, 23rd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (234)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (234)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (234)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (234)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (234)');
-
-$date->addDays(1);
-
-// Tuesday, 24th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (235)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (235)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (235)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (235)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (235)');
-
-$date->addDays(1);
-
-// Wednesday, 25th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (236)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (236)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (236)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (236)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (236)');
-
-$date->addDays(1);
-
-// Thursday, 26th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (237)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (237)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (237)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (237)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (237)');
-
-$date->addDays(1);
-
-// Friday, 27th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (238)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (238)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (238)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (238)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (238)');
-
-$date->addDays(1);
-
-// Saturday, 28th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (239)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (239)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (239)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (239)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (239)');
-
-$date->addDays(1);
-
-// Sunday, 29th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (240)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (240)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (240)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (240)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (240)');
-
-$date->addDays(1);
-
-// Monday, 30th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (241)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (241)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (241)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (241)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (241)');
-
-$date->addDays(1);
-
-// Tuesday, 31st August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (242)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (242)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (242)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (242)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (242)');
-
-$date->addDays(1);
-
-// Wednesday, 1st September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (243)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (243)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (243)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (243)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (243)');
-
-$date->addDays(1);
-
-// Thursday, 2nd September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (244)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (244)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (244)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (244)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (244)');
-
-$date->addDays(1);
-
-// Friday, 3rd September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (245)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (245)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (245)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (245)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (245)');
-
-$date->addDays(1);
-
-// Saturday, 4th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (246)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (246)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (246)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (246)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (246)');
-
-$date->addDays(1);
-
-// Sunday, 5th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (247)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (247)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (247)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (247)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (247)');
-
-$date->addDays(1);
-
-// Monday, 6th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (248)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (248)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (248)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (248)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (248)');
-
-$date->addDays(1);
-
-// Tuesday, 7th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (249)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (249)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (249)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (249)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (249)');
-
-$date->addDays(1);
-
-// Wednesday, 8th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (250)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (250)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (250)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (250)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (250)');
-
-$date->addDays(1);
-
-// Thursday, 9th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (251)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (251)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (251)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (251)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (251)');
-
-$date->addDays(1);
-
-// Friday, 10th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (252)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (252)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (252)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (252)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (252)');
-
-$date->addDays(1);
-
-// Saturday, 11th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (253)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (253)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (253)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (253)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (253)');
-
-$date->addDays(1);
-
-// Sunday, 12th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (254)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (254)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (254)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (254)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (254)');
-
-$date->addDays(1);
-
-// Monday, 13th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (255)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (255)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (255)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (255)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (255)');
-
-$date->addDays(1);
-
-// Tuesday, 14th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (256)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (256)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (256)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (256)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (256)');
-
-$date->addDays(1);
-
-// Wednesday, 15th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (257)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (257)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (257)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (257)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (257)');
-
-$date->addDays(1);
-
-// Thursday, 16th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (258)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (258)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (258)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (258)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (258)');
-
-$date->addDays(1);
-
-// Friday, 17th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (259)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (259)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (259)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (259)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (259)');
-
-$date->addDays(1);
-
-// Saturday, 18th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (260)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (260)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (260)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (260)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (260)');
-
-$date->addDays(1);
-
-// Sunday, 19th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (261)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (261)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (261)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (261)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (261)');
-
-$date->addDays(1);
-
-// Monday, 20th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (262)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (262)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (262)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (262)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (262)');
-
-$date->addDays(1);
-
-// Tuesday, 21st September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (263)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (263)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (263)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (263)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (263)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (264)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (264)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (264)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (264)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (264)');
-
-$date->addDays(1);
-
-// Thursday, 23rd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (265)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (265)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (265)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (265)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (265)');
-
-$date->addDays(1);
-
-// Friday, 24th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (266)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (266)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (266)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (266)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (266)');
-
-$date->addDays(1);
-
-// Saturday, 25th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (267)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (267)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (267)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (267)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (267)');
-
-$date->addDays(1);
-
-// Sunday, 26th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (268)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (268)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (268)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (268)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (268)');
-
-$date->addDays(1);
-
-// Monday, 27th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (269)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (269)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (269)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (269)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (269)');
-
-$date->addDays(1);
-
-// Tuesday, 28th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (270)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (270)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (270)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (270)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (270)');
-
-$date->addDays(1);
-
-// Wednesday, 29th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (271)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (271)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (271)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (271)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (271)');
-
-$date->addDays(1);
-
-// Thursday, 30th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (272)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (272)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (272)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (272)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (272)');
-
-$date->addDays(1);
-
-// Friday, 1st October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (273)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (273)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (273)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (273)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (273)');
-
-$date->addDays(1);
-
-// Saturday, 2nd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (274)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (274)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (274)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (274)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (274)');
-
-$date->addDays(1);
-
-// Sunday, 3rd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (275)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (275)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (275)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (275)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (275)');
-
-$date->addDays(1);
-
-// Monday, 4th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (276)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (276)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (276)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (276)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (276)');
-
-$date->addDays(1);
-
-// Tuesday, 5th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (277)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (277)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (277)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (277)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (277)');
-
-$date->addDays(1);
-
-// Wednesday, 6th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (278)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (278)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (278)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (278)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (278)');
-
-$date->addDays(1);
-
-// Thursday, 7th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (279)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (279)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (279)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (279)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (279)');
-
-$date->addDays(1);
-
-// Friday, 8th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (280)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (280)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (280)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (280)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (280)');
-
-$date->addDays(1);
-
-// Saturday, 9th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (281)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (281)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (281)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (281)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (281)');
-
-$date->addDays(1);
-
-// Sunday, 10th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (282)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (282)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (282)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (282)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (282)');
-
-$date->addDays(1);
-
-// Monday, 11th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (283)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (283)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (283)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (283)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (283)');
-
-$date->addDays(1);
-
-// Tuesday, 12th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (284)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (284)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (284)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (284)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (284)');
-
-$date->addDays(1);
-
-// Wednesday, 13th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (285)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (285)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (285)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (285)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (285)');
-
-$date->addDays(1);
-
-// Thursday, 14th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (286)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (286)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (286)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (286)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (286)');
-
-$date->addDays(1);
-
-// Friday, 15th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (287)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (287)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (287)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (287)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (287)');
-
-$date->addDays(1);
-
-// Saturday, 16th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (288)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (288)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (288)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (288)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (288)');
-
-$date->addDays(1);
-
-// Sunday, 17th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (289)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (289)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (289)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (289)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (289)');
-
-$date->addDays(1);
-
-// Monday, 18th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (290)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (290)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (290)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (290)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (290)');
-
-$date->addDays(1);
-
-// Tuesday, 19th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (291)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (291)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (291)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (291)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (291)');
-
-$date->addDays(1);
-
-// Wednesday, 20th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (292)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (292)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (292)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (292)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (292)');
-
-$date->addDays(1);
-
-// Thursday, 21st October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (293)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (293)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (293)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (293)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (293)');
-
-$date->addDays(1);
-
-// Friday, 22nd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (294)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (294)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (294)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (294)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (294)');
-
-$date->addDays(1);
-
-// Saturday, 23rd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (295)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (295)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (295)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (295)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (295)');
-
-$date->addDays(1);
-
-// Sunday, 24th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (296)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (296)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (296)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (296)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (296)');
-
-$date->addDays(1);
-
-// Monday, 25th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (297)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (297)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (297)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (297)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (297)');
-
-$date->addDays(1);
-
-// Tuesday, 26th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (298)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (298)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (298)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (298)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (298)');
-
-$date->addDays(1);
-
-// Wednesday, 27th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (299)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (299)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (299)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (299)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (299)');
-
-$date->addDays(1);
-
-// Thursday, 28th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (300)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (300)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (300)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (300)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (300)');
-
-$date->addDays(1);
-
-// Friday, 29th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (301)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (301)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (301)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (301)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (301)');
-
-$date->addDays(1);
-
-// Saturday, 30th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (302)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (302)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (302)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (302)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (302)');
-
-$date->addDays(1);
-
-// Sunday, 31st October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (303)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (303)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (303)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (303)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (303)');
-
-$date->addDays(1);
-
-// Monday, 1st November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (304)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (304)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (304)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (304)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (304)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (305)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (305)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (305)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (305)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (305)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (306)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (306)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (306)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (306)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (306)');
-
-$date->addDays(1);
-
-// Thursday, 4th November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (307)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (307)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (307)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (307)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (307)');
-
-$date->addDays(1);
-
-// Friday, 5th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (308)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (308)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (308)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (308)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (308)');
-
-$date->addDays(1);
-
-// Saturday, 6th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (309)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (309)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (309)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (309)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (309)');
-
-$date->addDays(1);
-
-// Sunday, 7th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (310)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (310)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (310)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (310)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (310)');
-
-$date->addDays(1);
-
-// Monday, 8th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (311)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (311)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (311)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (311)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (311)');
-
-$date->addDays(1);
-
-// Tuesday, 9th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (312)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (312)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (312)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (312)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (312)');
-
-$date->addDays(1);
-
-// Wednesday, 10th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (313)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (313)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (313)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (313)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (313)');
-
-$date->addDays(1);
-
-// Thursday, 11th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (314)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (314)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (314)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (314)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (314)');
-
-$date->addDays(1);
-
-// Friday, 12th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (315)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (315)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (315)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (315)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (315)');
-
-$date->addDays(1);
-
-// Saturday, 13th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (316)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (316)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (316)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (316)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (316)');
-
-$date->addDays(1);
-
-// Sunday, 14th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (317)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (317)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (317)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (317)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (317)');
-
-$date->addDays(1);
-
-// Monday, 15th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (318)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (318)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (318)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (318)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (318)');
-
-$date->addDays(1);
-
-// Tuesday, 16th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (319)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (319)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (319)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (319)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (319)');
-
-$date->addDays(1);
-
-// Wednesday, 17th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (320)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (320)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (320)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (320)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (320)');
-
-$date->addDays(1);
-
-// Thursday, 18th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (321)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (321)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (321)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (321)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (321)');
-
-$date->addDays(1);
-
-// Friday, 19th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (322)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (322)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (322)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (322)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (322)');
-
-$date->addDays(1);
-
-// Saturday, 20th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (323)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (323)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (323)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (323)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (323)');
-
-$date->addDays(1);
-
-// Sunday, 21st November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (324)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (324)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (324)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (324)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (324)');
-
-$date->addDays(1);
-
-// Monday, 22nd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (325)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (325)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (325)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (325)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (325)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (326)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (326)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (326)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (326)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (326)');
-
-$date->addDays(1);
-
-// Wednesday, 24th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (327)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (327)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (327)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (327)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (327)');
-
-$date->addDays(1);
-
-// Thursday, 25th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (328)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (328)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (328)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (328)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (328)');
-
-$date->addDays(1);
-
-// Friday, 26th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (329)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (329)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (329)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (329)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (329)');
-
-$date->addDays(1);
-
-// Saturday, 27th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (330)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (330)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (330)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (330)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (330)');
-
-$date->addDays(1);
-
-// Sunday, 28th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (331)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (331)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (331)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (331)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (331)');
-
-$date->addDays(1);
-
-// Monday, 29th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (332)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (332)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (332)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (332)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (332)');
-
-$date->addDays(1);
-
-// Tuesday, 30th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (333)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (333)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (333)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (333)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (333)');
-
-$date->addDays(1);
-
-// Wednesday, 1st December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (334)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (334)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (334)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (334)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (334)');
-
-$date->addDays(1);
-
-// Thursday, 2nd December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (335)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (335)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (335)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (335)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (335)');
-
-$date->addDays(1);
-
-// Friday, 3rd December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (336)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (336)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (336)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (336)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (336)');
-
-$date->addDays(1);
-
-// Saturday, 4th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (337)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (337)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (337)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (337)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (337)');
-
-$date->addDays(1);
-
-// Sunday, 5th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (338)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (338)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (338)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (338)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (338)');
-
-$date->addDays(1);
-
-// Monday, 6th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (339)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (339)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (339)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (339)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (339)');
-
-$date->addDays(1);
-
-// Tuesday, 7th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (340)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (340)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (340)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (340)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (340)');
-
-$date->addDays(1);
-
-// Wednesday, 8th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (341)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (341)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (341)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (341)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (341)');
-
-$date->addDays(1);
-
-// Thursday, 9th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (342)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (342)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (342)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (342)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (342)');
-
-$date->addDays(1);
-
-// Friday, 10th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (343)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (343)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (343)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (343)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (343)');
-
-$date->addDays(1);
-
-// Saturday, 11th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (344)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (344)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (344)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (344)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (344)');
-
-$date->addDays(1);
-
-// Sunday, 12th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (345)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (345)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (345)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (345)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (345)');
-
-$date->addDays(1);
-
-// Monday, 13th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (346)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (346)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (346)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (346)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (346)');
-
-$date->addDays(1);
-
-// Tuesday, 14th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (347)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (347)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (347)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (347)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (347)');
-
-$date->addDays(1);
-
-// Wednesday, 15th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (348)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (348)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (348)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (348)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (348)');
-
-$date->addDays(1);
-
-// Thursday, 16th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (349)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (349)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (349)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (349)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (349)');
-
-$date->addDays(1);
-
-// Friday, 17th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (350)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (350)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (350)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (350)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (350)');
-
-$date->addDays(1);
-
-// Saturday, 18th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (351)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (351)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (351)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (351)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (351)');
-
-$date->addDays(1);
-
-// Sunday, 19th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (352)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (352)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (352)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (352)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (352)');
-
-$date->addDays(1);
-
-// Monday, 20th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (353)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (353)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (353)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (353)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (353)');
-
-$date->addDays(1);
-
-// Tuesday, 21st December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (354)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (354)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (354)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (354)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (354)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (355)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (355)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (355)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (355)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (355)');
-
-$date->addDays(1);
-
-// Thursday, 23rd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (356)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (356)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (356)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (356)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (356)');
-
-$date->addDays(1);
-
-// Friday, 24th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (357)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (357)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (357)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (357)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (357)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (358)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (358)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (358)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (358)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (358)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (359)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (359)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (359)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (359)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (359)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (360)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (360)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (360)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (360)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (360)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (361)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (361)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (361)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (361)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (361)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (362)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (362)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (362)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (362)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (362)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (363)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (363)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (363)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (363)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (363)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1999
-compare('53', $date->formatLikeSQL('WW'), 'WW (364)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (364)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (364)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (364)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (364)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (365)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (365)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (365)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (365)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (365)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (366)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (366)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (366)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (366)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (366)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (367)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (367)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (367)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (367)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (367)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (368)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (368)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (368)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (368)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (368)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (369)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (369)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (369)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (369)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (369)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (370)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (370)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (370)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (370)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (370)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (371)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (371)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (371)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (371)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (371)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2000
-compare('02', $date->formatLikeSQL('WW'), 'WW (372)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (372)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (372)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (372)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (372)');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc day of week functions
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-define('DATE_CALC_BEGIN_WEEKDAY', 5);
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("1998-12-24 00:00:00Z");
-
-// First day of week is Friday
-//
-
-// Thursday, 24th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-8)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-8)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (-8)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-8)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-7)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-7)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-7)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-7)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-6)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-6)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-6)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-6)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-5)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-5)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-5)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-5)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-4)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-4)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-4)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-4)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-3)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-3)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-3)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-3)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-2)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-2)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1998
-compare('53', $date->formatLikeSQL('WW'), 'WW (-1)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-1)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (0)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (0)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (0)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (0)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (1)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (1)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (1)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (2)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (2)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (2)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (3)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (3)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (3)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (3)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (4)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (4)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (4)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (4)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (5)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (5)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (5)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (5)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (6)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (6)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (6)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (6)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (7)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (7)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (7)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (7)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (7)');
-
-$date->addDays(1);
-
-// Saturday, 9th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (8)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (8)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (8)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (8)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (8)');
-
-$date->addDays(1);
-
-// Sunday, 10th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (9)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (9)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (9)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (9)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (9)');
-
-$date->addDays(1);
-
-// Monday, 11th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (10)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (10)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (10)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (10)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (10)');
-
-$date->addDays(1);
-
-// Tuesday, 12th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (11)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (11)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (11)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (11)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (11)');
-
-$date->addDays(1);
-
-// Wednesday, 13th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (12)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (12)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (12)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (12)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (12)');
-
-$date->addDays(1);
-
-// Thursday, 14th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (13)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (13)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (13)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (13)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (13)');
-
-$date->addDays(1);
-
-// Friday, 15th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (14)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (14)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (14)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (14)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (14)');
-
-$date->addDays(1);
-
-// Saturday, 16th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (15)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (15)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (15)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (15)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (15)');
-
-$date->addDays(1);
-
-// Sunday, 17th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (16)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (16)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (16)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (16)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (16)');
-
-$date->addDays(1);
-
-// Monday, 18th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (17)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (17)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (17)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (17)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (17)');
-
-$date->addDays(1);
-
-// Tuesday, 19th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (18)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (18)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (18)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (18)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (18)');
-
-$date->addDays(1);
-
-// Wednesday, 20th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (19)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (19)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (19)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (19)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (19)');
-
-$date->addDays(1);
-
-// Thursday, 21st January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (20)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (20)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (20)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (20)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (20)');
-
-$date->addDays(1);
-
-// Friday, 22nd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (21)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (21)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (21)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (21)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (21)');
-
-$date->addDays(1);
-
-// Saturday, 23rd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (22)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (22)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (22)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (22)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (22)');
-
-$date->addDays(1);
-
-// Sunday, 24th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (23)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (23)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (23)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (23)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (23)');
-
-$date->addDays(1);
-
-// Monday, 25th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (24)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (24)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (24)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (24)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (24)');
-
-$date->addDays(1);
-
-// Tuesday, 26th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (25)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (25)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (25)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (25)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (25)');
-
-$date->addDays(1);
-
-// Wednesday, 27th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (26)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (26)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (26)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (26)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (26)');
-
-$date->addDays(1);
-
-// Thursday, 28th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (27)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (27)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (27)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (27)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (27)');
-
-$date->addDays(1);
-
-// Friday, 29th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (28)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (28)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (28)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (28)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (28)');
-
-$date->addDays(1);
-
-// Saturday, 30th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (29)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (29)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (29)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (29)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (29)');
-
-$date->addDays(1);
-
-// Sunday, 31st January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (30)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (30)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (30)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (30)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (30)');
-
-$date->addDays(1);
-
-// Monday, 1st February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (31)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (31)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (31)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (31)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (31)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (32)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (32)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (32)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (32)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (32)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (33)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (33)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (33)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (33)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (33)');
-
-$date->addDays(1);
-
-// Thursday, 4th February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (34)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (34)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (34)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (34)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (34)');
-
-$date->addDays(1);
-
-// Friday, 5th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (35)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (35)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (35)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (35)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (35)');
-
-$date->addDays(1);
-
-// Saturday, 6th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (36)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (36)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (36)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (36)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (36)');
-
-$date->addDays(1);
-
-// Sunday, 7th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (37)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (37)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (37)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (37)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (37)');
-
-$date->addDays(1);
-
-// Monday, 8th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (38)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (38)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (38)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (38)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (38)');
-
-$date->addDays(1);
-
-// Tuesday, 9th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (39)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (39)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (39)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (39)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (39)');
-
-$date->addDays(1);
-
-// Wednesday, 10th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (40)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (40)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (40)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (40)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (40)');
-
-$date->addDays(1);
-
-// Thursday, 11th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (41)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (41)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (41)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (41)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (41)');
-
-$date->addDays(1);
-
-// Friday, 12th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (42)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (42)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (42)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (42)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (42)');
-
-$date->addDays(1);
-
-// Saturday, 13th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (43)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (43)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (43)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (43)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (43)');
-
-$date->addDays(1);
-
-// Sunday, 14th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (44)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (44)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (44)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (44)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (44)');
-
-$date->addDays(1);
-
-// Monday, 15th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (45)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (45)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (45)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (45)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (45)');
-
-$date->addDays(1);
-
-// Tuesday, 16th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (46)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (46)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (46)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (46)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (46)');
-
-$date->addDays(1);
-
-// Wednesday, 17th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (47)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (47)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (47)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (47)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (47)');
-
-$date->addDays(1);
-
-// Thursday, 18th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (48)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (48)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (48)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (48)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (48)');
-
-$date->addDays(1);
-
-// Friday, 19th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (49)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (49)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (49)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (49)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (49)');
-
-$date->addDays(1);
-
-// Saturday, 20th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (50)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (50)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (50)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (50)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (50)');
-
-$date->addDays(1);
-
-// Sunday, 21st February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (51)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (51)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (51)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (51)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (51)');
-
-$date->addDays(1);
-
-// Monday, 22nd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (52)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (52)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (52)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (52)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (52)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (53)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (53)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (53)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (53)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (53)');
-
-$date->addDays(1);
-
-// Wednesday, 24th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (54)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (54)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (54)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (54)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (54)');
-
-$date->addDays(1);
-
-// Thursday, 25th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (55)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (55)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (55)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (55)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (55)');
-
-$date->addDays(1);
-
-// Friday, 26th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (56)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (56)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (56)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (56)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (56)');
-
-$date->addDays(1);
-
-// Saturday, 27th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (57)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (57)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (57)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (57)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (57)');
-
-$date->addDays(1);
-
-// Sunday, 28th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (58)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (58)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (58)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (58)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (58)');
-
-$date->addDays(1);
-
-// Monday, 1st March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (59)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (59)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (59)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (59)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (59)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (60)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (60)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (60)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (60)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (60)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (61)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (61)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (61)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (61)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (61)');
-
-$date->addDays(1);
-
-// Thursday, 4th March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (62)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (62)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (62)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (62)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (62)');
-
-$date->addDays(1);
-
-// Friday, 5th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (63)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (63)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (63)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (63)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (63)');
-
-$date->addDays(1);
-
-// Saturday, 6th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (64)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (64)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (64)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (64)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (64)');
-
-$date->addDays(1);
-
-// Sunday, 7th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (65)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (65)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (65)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (65)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (65)');
-
-$date->addDays(1);
-
-// Monday, 8th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (66)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (66)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (66)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (66)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (66)');
-
-$date->addDays(1);
-
-// Tuesday, 9th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (67)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (67)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (67)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (67)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (67)');
-
-$date->addDays(1);
-
-// Wednesday, 10th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (68)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (68)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (68)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (68)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (68)');
-
-$date->addDays(1);
-
-// Thursday, 11th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (69)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (69)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (69)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (69)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (69)');
-
-$date->addDays(1);
-
-// Friday, 12th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (70)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (70)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (70)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (70)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (70)');
-
-$date->addDays(1);
-
-// Saturday, 13th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (71)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (71)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (71)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (71)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (71)');
-
-$date->addDays(1);
-
-// Sunday, 14th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (72)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (72)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (72)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (72)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (72)');
-
-$date->addDays(1);
-
-// Monday, 15th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (73)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (73)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (73)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (73)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (73)');
-
-$date->addDays(1);
-
-// Tuesday, 16th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (74)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (74)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (74)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (74)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (74)');
-
-$date->addDays(1);
-
-// Wednesday, 17th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (75)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (75)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (75)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (75)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (75)');
-
-$date->addDays(1);
-
-// Thursday, 18th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (76)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (76)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (76)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (76)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (76)');
-
-$date->addDays(1);
-
-// Friday, 19th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (77)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (77)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (77)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (77)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (77)');
-
-$date->addDays(1);
-
-// Saturday, 20th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (78)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (78)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (78)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (78)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (78)');
-
-$date->addDays(1);
-
-// Sunday, 21st March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (79)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (79)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (79)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (79)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (79)');
-
-$date->addDays(1);
-
-// Monday, 22nd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (80)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (80)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (80)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (80)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (80)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (81)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (81)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (81)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (81)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (81)');
-
-$date->addDays(1);
-
-// Wednesday, 24th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (82)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (82)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (82)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (82)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (82)');
-
-$date->addDays(1);
-
-// Thursday, 25th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (83)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (83)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (83)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (83)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (83)');
-
-$date->addDays(1);
-
-// Friday, 26th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (84)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (84)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (84)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (84)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (84)');
-
-$date->addDays(1);
-
-// Saturday, 27th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (85)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (85)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (85)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (85)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (85)');
-
-$date->addDays(1);
-
-// Sunday, 28th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (86)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (86)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (86)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (86)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (86)');
-
-$date->addDays(1);
-
-// Monday, 29th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (87)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (87)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (87)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (87)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (87)');
-
-$date->addDays(1);
-
-// Tuesday, 30th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (88)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (88)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (88)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (88)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (88)');
-
-$date->addDays(1);
-
-// Wednesday, 31st March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (89)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (89)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (89)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (89)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (89)');
-
-$date->addDays(1);
-
-// Thursday, 1st April 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (90)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (90)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (90)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (90)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (90)');
-
-$date->addDays(1);
-
-// Friday, 2nd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (91)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (91)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (91)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (91)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (91)');
-
-$date->addDays(1);
-
-// Saturday, 3rd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (92)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (92)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (92)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (92)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (92)');
-
-$date->addDays(1);
-
-// Sunday, 4th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (93)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (93)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (93)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (93)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (93)');
-
-$date->addDays(1);
-
-// Monday, 5th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (94)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (94)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (94)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (94)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (94)');
-
-$date->addDays(1);
-
-// Tuesday, 6th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (95)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (95)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (95)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (95)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (95)');
-
-$date->addDays(1);
-
-// Wednesday, 7th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (96)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (96)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (96)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (96)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (96)');
-
-$date->addDays(1);
-
-// Thursday, 8th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (97)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (97)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (97)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (97)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (97)');
-
-$date->addDays(1);
-
-// Friday, 9th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (98)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (98)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (98)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (98)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (98)');
-
-$date->addDays(1);
-
-// Saturday, 10th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (99)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (99)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (99)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (99)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (99)');
-
-$date->addDays(1);
-
-// Sunday, 11th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (100)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (100)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (100)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (100)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (100)');
-
-$date->addDays(1);
-
-// Monday, 12th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (101)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (101)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (101)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (101)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (101)');
-
-$date->addDays(1);
-
-// Tuesday, 13th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (102)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (102)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (102)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (102)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (102)');
-
-$date->addDays(1);
-
-// Wednesday, 14th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (103)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (103)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (103)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (103)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (103)');
-
-$date->addDays(1);
-
-// Thursday, 15th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (104)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (104)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (104)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (104)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (104)');
-
-$date->addDays(1);
-
-// Friday, 16th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (105)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (105)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (105)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (105)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (105)');
-
-$date->addDays(1);
-
-// Saturday, 17th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (106)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (106)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (106)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (106)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (106)');
-
-$date->addDays(1);
-
-// Sunday, 18th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (107)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (107)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (107)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (107)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (107)');
-
-$date->addDays(1);
-
-// Monday, 19th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (108)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (108)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (108)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (108)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (108)');
-
-$date->addDays(1);
-
-// Tuesday, 20th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (109)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (109)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (109)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (109)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (109)');
-
-$date->addDays(1);
-
-// Wednesday, 21st April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (110)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (110)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (110)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (110)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (110)');
-
-$date->addDays(1);
-
-// Thursday, 22nd April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (111)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (111)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (111)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (111)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (111)');
-
-$date->addDays(1);
-
-// Friday, 23rd April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (112)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (112)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (112)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (112)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (112)');
-
-$date->addDays(1);
-
-// Saturday, 24th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (113)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (113)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (113)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (113)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (113)');
-
-$date->addDays(1);
-
-// Sunday, 25th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (114)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (114)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (114)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (114)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (114)');
-
-$date->addDays(1);
-
-// Monday, 26th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (115)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (115)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (115)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (115)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (115)');
-
-$date->addDays(1);
-
-// Tuesday, 27th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (116)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (116)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (116)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (116)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (116)');
-
-$date->addDays(1);
-
-// Wednesday, 28th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (117)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (117)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (117)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (117)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (117)');
-
-$date->addDays(1);
-
-// Thursday, 29th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (118)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (118)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (118)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (118)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (118)');
-
-$date->addDays(1);
-
-// Friday, 30th April 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (119)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (119)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (119)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (119)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (119)');
-
-$date->addDays(1);
-
-// Saturday, 1st May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (120)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (120)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (120)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (120)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (120)');
-
-$date->addDays(1);
-
-// Sunday, 2nd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (121)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (121)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (121)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (121)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (121)');
-
-$date->addDays(1);
-
-// Monday, 3rd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (122)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (122)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (122)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (122)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (122)');
-
-$date->addDays(1);
-
-// Tuesday, 4th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (123)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (123)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (123)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (123)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (123)');
-
-$date->addDays(1);
-
-// Wednesday, 5th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (124)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (124)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (124)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (124)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (124)');
-
-$date->addDays(1);
-
-// Thursday, 6th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (125)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (125)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (125)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (125)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (125)');
-
-$date->addDays(1);
-
-// Friday, 7th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (126)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (126)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (126)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (126)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (126)');
-
-$date->addDays(1);
-
-// Saturday, 8th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (127)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (127)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (127)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (127)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (127)');
-
-$date->addDays(1);
-
-// Sunday, 9th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (128)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (128)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (128)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (128)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (128)');
-
-$date->addDays(1);
-
-// Monday, 10th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (129)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (129)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (129)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (129)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (129)');
-
-$date->addDays(1);
-
-// Tuesday, 11th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (130)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (130)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (130)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (130)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (130)');
-
-$date->addDays(1);
-
-// Wednesday, 12th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (131)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (131)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (131)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (131)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (131)');
-
-$date->addDays(1);
-
-// Thursday, 13th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (132)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (132)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (132)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (132)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (132)');
-
-$date->addDays(1);
-
-// Friday, 14th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (133)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (133)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (133)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (133)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (133)');
-
-$date->addDays(1);
-
-// Saturday, 15th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (134)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (134)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (134)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (134)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (134)');
-
-$date->addDays(1);
-
-// Sunday, 16th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (135)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (135)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (135)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (135)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (135)');
-
-$date->addDays(1);
-
-// Monday, 17th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (136)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (136)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (136)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (136)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (136)');
-
-$date->addDays(1);
-
-// Tuesday, 18th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (137)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (137)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (137)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (137)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (137)');
-
-$date->addDays(1);
-
-// Wednesday, 19th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (138)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (138)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (138)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (138)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (138)');
-
-$date->addDays(1);
-
-// Thursday, 20th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (139)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (139)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (139)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (139)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (139)');
-
-$date->addDays(1);
-
-// Friday, 21st May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (140)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (140)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (140)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (140)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (140)');
-
-$date->addDays(1);
-
-// Saturday, 22nd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (141)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (141)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (141)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (141)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (141)');
-
-$date->addDays(1);
-
-// Sunday, 23rd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (142)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (142)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (142)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (142)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (142)');
-
-$date->addDays(1);
-
-// Monday, 24th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (143)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (143)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (143)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (143)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (143)');
-
-$date->addDays(1);
-
-// Tuesday, 25th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (144)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (144)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (144)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (144)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (144)');
-
-$date->addDays(1);
-
-// Wednesday, 26th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (145)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (145)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (145)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (145)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (145)');
-
-$date->addDays(1);
-
-// Thursday, 27th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (146)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (146)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (146)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (146)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (146)');
-
-$date->addDays(1);
-
-// Friday, 28th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (147)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (147)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (147)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (147)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (147)');
-
-$date->addDays(1);
-
-// Saturday, 29th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (148)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (148)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (148)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (148)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (148)');
-
-$date->addDays(1);
-
-// Sunday, 30th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (149)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (149)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (149)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (149)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (149)');
-
-$date->addDays(1);
-
-// Monday, 31st May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (150)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (150)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (150)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (150)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (150)');
-
-$date->addDays(1);
-
-// Tuesday, 1st June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (151)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (151)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (151)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (151)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (151)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (152)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (152)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (152)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (152)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (152)');
-
-$date->addDays(1);
-
-// Thursday, 3rd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (153)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (153)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (153)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (153)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (153)');
-
-$date->addDays(1);
-
-// Friday, 4th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (154)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (154)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (154)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (154)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (154)');
-
-$date->addDays(1);
-
-// Saturday, 5th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (155)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (155)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (155)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (155)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (155)');
-
-$date->addDays(1);
-
-// Sunday, 6th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (156)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (156)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (156)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (156)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (156)');
-
-$date->addDays(1);
-
-// Monday, 7th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (157)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (157)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (157)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (157)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (157)');
-
-$date->addDays(1);
-
-// Tuesday, 8th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (158)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (158)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (158)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (158)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (158)');
-
-$date->addDays(1);
-
-// Wednesday, 9th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (159)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (159)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (159)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (159)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (159)');
-
-$date->addDays(1);
-
-// Thursday, 10th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (160)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (160)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (160)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (160)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (160)');
-
-$date->addDays(1);
-
-// Friday, 11th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (161)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (161)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (161)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (161)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (161)');
-
-$date->addDays(1);
-
-// Saturday, 12th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (162)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (162)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (162)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (162)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (162)');
-
-$date->addDays(1);
-
-// Sunday, 13th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (163)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (163)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (163)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (163)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (163)');
-
-$date->addDays(1);
-
-// Monday, 14th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (164)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (164)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (164)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (164)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (164)');
-
-$date->addDays(1);
-
-// Tuesday, 15th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (165)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (165)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (165)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (165)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (165)');
-
-$date->addDays(1);
-
-// Wednesday, 16th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (166)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (166)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (166)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (166)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (166)');
-
-$date->addDays(1);
-
-// Thursday, 17th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (167)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (167)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (167)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (167)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (167)');
-
-$date->addDays(1);
-
-// Friday, 18th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (168)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (168)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (168)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (168)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (168)');
-
-$date->addDays(1);
-
-// Saturday, 19th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (169)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (169)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (169)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (169)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (169)');
-
-$date->addDays(1);
-
-// Sunday, 20th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (170)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (170)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (170)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (170)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (170)');
-
-$date->addDays(1);
-
-// Monday, 21st June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (171)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (171)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (171)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (171)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (171)');
-
-$date->addDays(1);
-
-// Tuesday, 22nd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (172)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (172)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (172)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (172)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (172)');
-
-$date->addDays(1);
-
-// Wednesday, 23rd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (173)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (173)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (173)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (173)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (173)');
-
-$date->addDays(1);
-
-// Thursday, 24th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (174)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (174)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (174)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (174)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (174)');
-
-$date->addDays(1);
-
-// Friday, 25th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (175)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (175)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (175)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (175)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (175)');
-
-$date->addDays(1);
-
-// Saturday, 26th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (176)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (176)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (176)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (176)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (176)');
-
-$date->addDays(1);
-
-// Sunday, 27th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (177)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (177)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (177)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (177)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (177)');
-
-$date->addDays(1);
-
-// Monday, 28th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (178)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (178)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (178)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (178)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (178)');
-
-$date->addDays(1);
-
-// Tuesday, 29th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (179)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (179)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (179)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (179)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (179)');
-
-$date->addDays(1);
-
-// Wednesday, 30th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (180)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (180)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (180)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (180)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (180)');
-
-$date->addDays(1);
-
-// Thursday, 1st July 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (181)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (181)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (181)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (181)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (181)');
-
-$date->addDays(1);
-
-// Friday, 2nd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (182)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (182)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (182)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (182)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (182)');
-
-$date->addDays(1);
-
-// Saturday, 3rd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (183)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (183)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (183)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (183)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (183)');
-
-$date->addDays(1);
-
-// Sunday, 4th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (184)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (184)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (184)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (184)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (184)');
-
-$date->addDays(1);
-
-// Monday, 5th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (185)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (185)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (185)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (185)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (185)');
-
-$date->addDays(1);
-
-// Tuesday, 6th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (186)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (186)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (186)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (186)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (186)');
-
-$date->addDays(1);
-
-// Wednesday, 7th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (187)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (187)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (187)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (187)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (187)');
-
-$date->addDays(1);
-
-// Thursday, 8th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (188)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (188)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (188)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (188)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (188)');
-
-$date->addDays(1);
-
-// Friday, 9th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (189)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (189)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (189)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (189)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (189)');
-
-$date->addDays(1);
-
-// Saturday, 10th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (190)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (190)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (190)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (190)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (190)');
-
-$date->addDays(1);
-
-// Sunday, 11th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (191)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (191)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (191)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (191)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (191)');
-
-$date->addDays(1);
-
-// Monday, 12th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (192)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (192)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (192)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (192)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (192)');
-
-$date->addDays(1);
-
-// Tuesday, 13th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (193)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (193)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (193)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (193)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (193)');
-
-$date->addDays(1);
-
-// Wednesday, 14th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (194)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (194)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (194)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (194)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (194)');
-
-$date->addDays(1);
-
-// Thursday, 15th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (195)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (195)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (195)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (195)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (195)');
-
-$date->addDays(1);
-
-// Friday, 16th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (196)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (196)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (196)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (196)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (196)');
-
-$date->addDays(1);
-
-// Saturday, 17th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (197)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (197)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (197)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (197)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (197)');
-
-$date->addDays(1);
-
-// Sunday, 18th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (198)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (198)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (198)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (198)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (198)');
-
-$date->addDays(1);
-
-// Monday, 19th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (199)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (199)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (199)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (199)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (199)');
-
-$date->addDays(1);
-
-// Tuesday, 20th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (200)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (200)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (200)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (200)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (200)');
-
-$date->addDays(1);
-
-// Wednesday, 21st July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (201)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (201)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (201)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (201)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (201)');
-
-$date->addDays(1);
-
-// Thursday, 22nd July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (202)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (202)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (202)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (202)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (202)');
-
-$date->addDays(1);
-
-// Friday, 23rd July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (203)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (203)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (203)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (203)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (203)');
-
-$date->addDays(1);
-
-// Saturday, 24th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (204)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (204)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (204)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (204)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (204)');
-
-$date->addDays(1);
-
-// Sunday, 25th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (205)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (205)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (205)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (205)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (205)');
-
-$date->addDays(1);
-
-// Monday, 26th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (206)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (206)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (206)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (206)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (206)');
-
-$date->addDays(1);
-
-// Tuesday, 27th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (207)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (207)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (207)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (207)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (207)');
-
-$date->addDays(1);
-
-// Wednesday, 28th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (208)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (208)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (208)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (208)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (208)');
-
-$date->addDays(1);
-
-// Thursday, 29th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (209)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (209)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (209)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (209)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (209)');
-
-$date->addDays(1);
-
-// Friday, 30th July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (210)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (210)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (210)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (210)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (210)');
-
-$date->addDays(1);
-
-// Saturday, 31st July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (211)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (211)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (211)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (211)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (211)');
-
-$date->addDays(1);
-
-// Sunday, 1st August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (212)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (212)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (212)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (212)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (212)');
-
-$date->addDays(1);
-
-// Monday, 2nd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (213)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (213)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (213)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (213)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (213)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (214)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (214)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (214)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (214)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (214)');
-
-$date->addDays(1);
-
-// Wednesday, 4th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (215)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (215)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (215)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (215)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (215)');
-
-$date->addDays(1);
-
-// Thursday, 5th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (216)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (216)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (216)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (216)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (216)');
-
-$date->addDays(1);
-
-// Friday, 6th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (217)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (217)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (217)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (217)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (217)');
-
-$date->addDays(1);
-
-// Saturday, 7th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (218)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (218)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (218)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (218)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (218)');
-
-$date->addDays(1);
-
-// Sunday, 8th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (219)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (219)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (219)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (219)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (219)');
-
-$date->addDays(1);
-
-// Monday, 9th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (220)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (220)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (220)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (220)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (220)');
-
-$date->addDays(1);
-
-// Tuesday, 10th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (221)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (221)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (221)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (221)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (221)');
-
-$date->addDays(1);
-
-// Wednesday, 11th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (222)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (222)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (222)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (222)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (222)');
-
-$date->addDays(1);
-
-// Thursday, 12th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (223)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (223)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (223)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (223)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (223)');
-
-$date->addDays(1);
-
-// Friday, 13th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (224)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (224)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (224)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (224)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (224)');
-
-$date->addDays(1);
-
-// Saturday, 14th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (225)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (225)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (225)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (225)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (225)');
-
-$date->addDays(1);
-
-// Sunday, 15th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (226)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (226)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (226)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (226)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (226)');
-
-$date->addDays(1);
-
-// Monday, 16th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (227)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (227)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (227)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (227)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (227)');
-
-$date->addDays(1);
-
-// Tuesday, 17th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (228)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (228)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (228)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (228)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (228)');
-
-$date->addDays(1);
-
-// Wednesday, 18th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (229)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (229)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (229)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (229)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (229)');
-
-$date->addDays(1);
-
-// Thursday, 19th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (230)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (230)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (230)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (230)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (230)');
-
-$date->addDays(1);
-
-// Friday, 20th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (231)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (231)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (231)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (231)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (231)');
-
-$date->addDays(1);
-
-// Saturday, 21st August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (232)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (232)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (232)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (232)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (232)');
-
-$date->addDays(1);
-
-// Sunday, 22nd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (233)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (233)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (233)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (233)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (233)');
-
-$date->addDays(1);
-
-// Monday, 23rd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (234)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (234)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (234)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (234)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (234)');
-
-$date->addDays(1);
-
-// Tuesday, 24th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (235)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (235)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (235)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (235)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (235)');
-
-$date->addDays(1);
-
-// Wednesday, 25th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (236)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (236)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (236)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (236)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (236)');
-
-$date->addDays(1);
-
-// Thursday, 26th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (237)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (237)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (237)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (237)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (237)');
-
-$date->addDays(1);
-
-// Friday, 27th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (238)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (238)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (238)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (238)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (238)');
-
-$date->addDays(1);
-
-// Saturday, 28th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (239)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (239)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (239)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (239)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (239)');
-
-$date->addDays(1);
-
-// Sunday, 29th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (240)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (240)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (240)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (240)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (240)');
-
-$date->addDays(1);
-
-// Monday, 30th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (241)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (241)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (241)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (241)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (241)');
-
-$date->addDays(1);
-
-// Tuesday, 31st August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (242)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (242)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (242)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (242)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (242)');
-
-$date->addDays(1);
-
-// Wednesday, 1st September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (243)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (243)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (243)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (243)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (243)');
-
-$date->addDays(1);
-
-// Thursday, 2nd September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (244)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (244)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (244)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (244)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (244)');
-
-$date->addDays(1);
-
-// Friday, 3rd September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (245)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (245)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (245)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (245)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (245)');
-
-$date->addDays(1);
-
-// Saturday, 4th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (246)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (246)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (246)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (246)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (246)');
-
-$date->addDays(1);
-
-// Sunday, 5th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (247)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (247)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (247)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (247)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (247)');
-
-$date->addDays(1);
-
-// Monday, 6th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (248)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (248)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (248)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (248)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (248)');
-
-$date->addDays(1);
-
-// Tuesday, 7th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (249)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (249)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (249)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (249)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (249)');
-
-$date->addDays(1);
-
-// Wednesday, 8th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (250)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (250)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (250)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (250)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (250)');
-
-$date->addDays(1);
-
-// Thursday, 9th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (251)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (251)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (251)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (251)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (251)');
-
-$date->addDays(1);
-
-// Friday, 10th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (252)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (252)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (252)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (252)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (252)');
-
-$date->addDays(1);
-
-// Saturday, 11th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (253)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (253)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (253)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (253)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (253)');
-
-$date->addDays(1);
-
-// Sunday, 12th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (254)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (254)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (254)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (254)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (254)');
-
-$date->addDays(1);
-
-// Monday, 13th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (255)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (255)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (255)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (255)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (255)');
-
-$date->addDays(1);
-
-// Tuesday, 14th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (256)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (256)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (256)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (256)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (256)');
-
-$date->addDays(1);
-
-// Wednesday, 15th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (257)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (257)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (257)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (257)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (257)');
-
-$date->addDays(1);
-
-// Thursday, 16th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (258)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (258)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (258)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (258)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (258)');
-
-$date->addDays(1);
-
-// Friday, 17th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (259)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (259)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (259)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (259)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (259)');
-
-$date->addDays(1);
-
-// Saturday, 18th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (260)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (260)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (260)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (260)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (260)');
-
-$date->addDays(1);
-
-// Sunday, 19th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (261)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (261)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (261)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (261)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (261)');
-
-$date->addDays(1);
-
-// Monday, 20th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (262)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (262)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (262)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (262)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (262)');
-
-$date->addDays(1);
-
-// Tuesday, 21st September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (263)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (263)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (263)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (263)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (263)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (264)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (264)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (264)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (264)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (264)');
-
-$date->addDays(1);
-
-// Thursday, 23rd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (265)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (265)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (265)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (265)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (265)');
-
-$date->addDays(1);
-
-// Friday, 24th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (266)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (266)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (266)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (266)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (266)');
-
-$date->addDays(1);
-
-// Saturday, 25th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (267)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (267)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (267)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (267)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (267)');
-
-$date->addDays(1);
-
-// Sunday, 26th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (268)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (268)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (268)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (268)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (268)');
-
-$date->addDays(1);
-
-// Monday, 27th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (269)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (269)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (269)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (269)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (269)');
-
-$date->addDays(1);
-
-// Tuesday, 28th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (270)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (270)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (270)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (270)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (270)');
-
-$date->addDays(1);
-
-// Wednesday, 29th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (271)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (271)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (271)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (271)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (271)');
-
-$date->addDays(1);
-
-// Thursday, 30th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (272)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (272)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (272)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (272)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (272)');
-
-$date->addDays(1);
-
-// Friday, 1st October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (273)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (273)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (273)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (273)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (273)');
-
-$date->addDays(1);
-
-// Saturday, 2nd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (274)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (274)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (274)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (274)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (274)');
-
-$date->addDays(1);
-
-// Sunday, 3rd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (275)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (275)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (275)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (275)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (275)');
-
-$date->addDays(1);
-
-// Monday, 4th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (276)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (276)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (276)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (276)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (276)');
-
-$date->addDays(1);
-
-// Tuesday, 5th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (277)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (277)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (277)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (277)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (277)');
-
-$date->addDays(1);
-
-// Wednesday, 6th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (278)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (278)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (278)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (278)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (278)');
-
-$date->addDays(1);
-
-// Thursday, 7th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (279)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (279)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (279)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (279)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (279)');
-
-$date->addDays(1);
-
-// Friday, 8th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (280)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (280)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (280)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (280)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (280)');
-
-$date->addDays(1);
-
-// Saturday, 9th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (281)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (281)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (281)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (281)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (281)');
-
-$date->addDays(1);
-
-// Sunday, 10th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (282)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (282)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (282)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (282)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (282)');
-
-$date->addDays(1);
-
-// Monday, 11th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (283)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (283)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (283)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (283)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (283)');
-
-$date->addDays(1);
-
-// Tuesday, 12th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (284)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (284)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (284)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (284)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (284)');
-
-$date->addDays(1);
-
-// Wednesday, 13th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (285)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (285)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (285)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (285)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (285)');
-
-$date->addDays(1);
-
-// Thursday, 14th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (286)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (286)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (286)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (286)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (286)');
-
-$date->addDays(1);
-
-// Friday, 15th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (287)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (287)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (287)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (287)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (287)');
-
-$date->addDays(1);
-
-// Saturday, 16th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (288)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (288)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (288)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (288)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (288)');
-
-$date->addDays(1);
-
-// Sunday, 17th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (289)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (289)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (289)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (289)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (289)');
-
-$date->addDays(1);
-
-// Monday, 18th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (290)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (290)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (290)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (290)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (290)');
-
-$date->addDays(1);
-
-// Tuesday, 19th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (291)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (291)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (291)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (291)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (291)');
-
-$date->addDays(1);
-
-// Wednesday, 20th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (292)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (292)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (292)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (292)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (292)');
-
-$date->addDays(1);
-
-// Thursday, 21st October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (293)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (293)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (293)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (293)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (293)');
-
-$date->addDays(1);
-
-// Friday, 22nd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (294)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (294)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (294)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (294)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (294)');
-
-$date->addDays(1);
-
-// Saturday, 23rd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (295)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (295)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (295)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (295)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (295)');
-
-$date->addDays(1);
-
-// Sunday, 24th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (296)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (296)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (296)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (296)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (296)');
-
-$date->addDays(1);
-
-// Monday, 25th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (297)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (297)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (297)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (297)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (297)');
-
-$date->addDays(1);
-
-// Tuesday, 26th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (298)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (298)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (298)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (298)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (298)');
-
-$date->addDays(1);
-
-// Wednesday, 27th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (299)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (299)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (299)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (299)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (299)');
-
-$date->addDays(1);
-
-// Thursday, 28th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (300)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (300)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (300)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (300)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (300)');
-
-$date->addDays(1);
-
-// Friday, 29th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (301)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (301)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (301)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (301)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (301)');
-
-$date->addDays(1);
-
-// Saturday, 30th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (302)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (302)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (302)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (302)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (302)');
-
-$date->addDays(1);
-
-// Sunday, 31st October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (303)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (303)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (303)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (303)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (303)');
-
-$date->addDays(1);
-
-// Monday, 1st November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (304)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (304)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (304)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (304)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (304)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (305)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (305)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (305)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (305)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (305)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (306)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (306)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (306)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (306)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (306)');
-
-$date->addDays(1);
-
-// Thursday, 4th November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (307)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (307)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (307)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (307)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (307)');
-
-$date->addDays(1);
-
-// Friday, 5th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (308)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (308)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (308)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (308)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (308)');
-
-$date->addDays(1);
-
-// Saturday, 6th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (309)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (309)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (309)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (309)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (309)');
-
-$date->addDays(1);
-
-// Sunday, 7th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (310)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (310)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (310)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (310)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (310)');
-
-$date->addDays(1);
-
-// Monday, 8th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (311)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (311)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (311)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (311)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (311)');
-
-$date->addDays(1);
-
-// Tuesday, 9th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (312)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (312)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (312)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (312)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (312)');
-
-$date->addDays(1);
-
-// Wednesday, 10th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (313)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (313)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (313)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (313)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (313)');
-
-$date->addDays(1);
-
-// Thursday, 11th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (314)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (314)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (314)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (314)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (314)');
-
-$date->addDays(1);
-
-// Friday, 12th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (315)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (315)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (315)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (315)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (315)');
-
-$date->addDays(1);
-
-// Saturday, 13th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (316)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (316)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (316)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (316)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (316)');
-
-$date->addDays(1);
-
-// Sunday, 14th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (317)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (317)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (317)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (317)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (317)');
-
-$date->addDays(1);
-
-// Monday, 15th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (318)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (318)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (318)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (318)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (318)');
-
-$date->addDays(1);
-
-// Tuesday, 16th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (319)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (319)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (319)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (319)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (319)');
-
-$date->addDays(1);
-
-// Wednesday, 17th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (320)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (320)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (320)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (320)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (320)');
-
-$date->addDays(1);
-
-// Thursday, 18th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (321)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (321)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (321)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (321)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (321)');
-
-$date->addDays(1);
-
-// Friday, 19th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (322)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (322)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (322)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (322)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (322)');
-
-$date->addDays(1);
-
-// Saturday, 20th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (323)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (323)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (323)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (323)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (323)');
-
-$date->addDays(1);
-
-// Sunday, 21st November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (324)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (324)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (324)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (324)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (324)');
-
-$date->addDays(1);
-
-// Monday, 22nd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (325)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (325)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (325)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (325)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (325)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (326)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (326)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (326)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (326)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (326)');
-
-$date->addDays(1);
-
-// Wednesday, 24th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (327)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (327)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (327)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (327)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (327)');
-
-$date->addDays(1);
-
-// Thursday, 25th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (328)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (328)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (328)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (328)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (328)');
-
-$date->addDays(1);
-
-// Friday, 26th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (329)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (329)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (329)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (329)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (329)');
-
-$date->addDays(1);
-
-// Saturday, 27th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (330)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (330)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (330)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (330)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (330)');
-
-$date->addDays(1);
-
-// Sunday, 28th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (331)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (331)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (331)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (331)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (331)');
-
-$date->addDays(1);
-
-// Monday, 29th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (332)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (332)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (332)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (332)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (332)');
-
-$date->addDays(1);
-
-// Tuesday, 30th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (333)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (333)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (333)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (333)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (333)');
-
-$date->addDays(1);
-
-// Wednesday, 1st December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (334)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (334)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (334)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (334)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (334)');
-
-$date->addDays(1);
-
-// Thursday, 2nd December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (335)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (335)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (335)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (335)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (335)');
-
-$date->addDays(1);
-
-// Friday, 3rd December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (336)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (336)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (336)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (336)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (336)');
-
-$date->addDays(1);
-
-// Saturday, 4th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (337)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (337)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (337)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (337)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (337)');
-
-$date->addDays(1);
-
-// Sunday, 5th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (338)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (338)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (338)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (338)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (338)');
-
-$date->addDays(1);
-
-// Monday, 6th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (339)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (339)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (339)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (339)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (339)');
-
-$date->addDays(1);
-
-// Tuesday, 7th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (340)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (340)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (340)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (340)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (340)');
-
-$date->addDays(1);
-
-// Wednesday, 8th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (341)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (341)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (341)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (341)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (341)');
-
-$date->addDays(1);
-
-// Thursday, 9th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (342)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (342)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (342)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (342)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (342)');
-
-$date->addDays(1);
-
-// Friday, 10th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (343)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (343)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (343)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (343)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (343)');
-
-$date->addDays(1);
-
-// Saturday, 11th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (344)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (344)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (344)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (344)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (344)');
-
-$date->addDays(1);
-
-// Sunday, 12th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (345)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (345)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (345)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (345)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (345)');
-
-$date->addDays(1);
-
-// Monday, 13th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (346)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (346)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (346)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (346)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (346)');
-
-$date->addDays(1);
-
-// Tuesday, 14th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (347)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (347)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (347)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (347)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (347)');
-
-$date->addDays(1);
-
-// Wednesday, 15th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (348)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (348)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (348)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (348)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (348)');
-
-$date->addDays(1);
-
-// Thursday, 16th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (349)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (349)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (349)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (349)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (349)');
-
-$date->addDays(1);
-
-// Friday, 17th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (350)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (350)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (350)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (350)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (350)');
-
-$date->addDays(1);
-
-// Saturday, 18th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (351)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (351)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (351)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (351)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (351)');
-
-$date->addDays(1);
-
-// Sunday, 19th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (352)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (352)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (352)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (352)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (352)');
-
-$date->addDays(1);
-
-// Monday, 20th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (353)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (353)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (353)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (353)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (353)');
-
-$date->addDays(1);
-
-// Tuesday, 21st December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (354)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (354)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (354)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (354)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (354)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (355)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (355)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (355)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (355)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (355)');
-
-$date->addDays(1);
-
-// Thursday, 23rd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (356)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (356)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (356)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (356)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (356)');
-
-$date->addDays(1);
-
-// Friday, 24th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (357)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (357)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (357)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (357)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (357)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (358)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (358)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (358)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (358)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (358)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (359)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (359)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (359)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (359)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (359)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (360)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (360)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (360)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (360)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (360)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (361)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (361)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (361)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (361)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (361)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (362)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (362)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (362)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (362)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (362)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (363)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (363)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (363)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (363)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (363)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1999
-compare('53', $date->formatLikeSQL('WW'), 'WW (364)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (364)');
-compare('53', $date->formatLikeSQL('W4'), 'W4 (364)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (364)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (364)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (365)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (365)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (365)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (365)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (365)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (366)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (366)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (366)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (366)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (366)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (367)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (367)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (367)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (367)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (367)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (368)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (368)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (368)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (368)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (368)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (369)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (369)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (369)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (369)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (369)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (370)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (370)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (370)');
-compare('53', $date->formatLikeSQL('W7'), 'W7 (370)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (370)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (371)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (371)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (371)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (371)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (371)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2000
-compare('02', $date->formatLikeSQL('WW'), 'WW (372)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (372)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (372)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (372)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (372)');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc day of week functions
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-define('DATE_CALC_BEGIN_WEEKDAY', 6);
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-$date = new Date("1998-12-24 00:00:00Z");
-
-// First day of week is Saturday
-//
-
-// Thursday, 24th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-8)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-8)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (-8)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-8)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-7)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (-7)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (-7)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (-7)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-6)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-6)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-6)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-6)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-5)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-5)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-5)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-5)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (-5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-4)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-4)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-4)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-4)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-3)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-3)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-3)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-3)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1998
-compare('52', $date->formatLikeSQL('WW'), 'WW (-2)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-2)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-2)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1998
-compare('53', $date->formatLikeSQL('WW'), 'WW (-1)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (-1)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (-1)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (-1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (-1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (0)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (0)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (0)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (0)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (1)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (1)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (1)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (1)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (2)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (2)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (2)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (2)');
-compare('53', $date->formatLikeSQL('IW'), 'IW (2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (3)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (3)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (3)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (3)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (4)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (4)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (4)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (4)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (5)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (5)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (5)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (5)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1999
-compare('01', $date->formatLikeSQL('WW'), 'WW (6)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (6)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (6)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (6)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (7)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (7)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (7)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (7)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (7)');
-
-$date->addDays(1);
-
-// Saturday, 9th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (8)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (8)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (8)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (8)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (8)');
-
-$date->addDays(1);
-
-// Sunday, 10th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (9)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (9)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (9)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (9)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (9)');
-
-$date->addDays(1);
-
-// Monday, 11th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (10)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (10)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (10)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (10)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (10)');
-
-$date->addDays(1);
-
-// Tuesday, 12th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (11)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (11)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (11)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (11)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (11)');
-
-$date->addDays(1);
-
-// Wednesday, 13th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (12)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (12)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (12)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (12)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (12)');
-
-$date->addDays(1);
-
-// Thursday, 14th January 1999
-compare('02', $date->formatLikeSQL('WW'), 'WW (13)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (13)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (13)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (13)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (13)');
-
-$date->addDays(1);
-
-// Friday, 15th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (14)');
-compare('03', $date->formatLikeSQL('W1'), 'W1 (14)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (14)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (14)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (14)');
-
-$date->addDays(1);
-
-// Saturday, 16th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (15)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (15)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (15)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (15)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (15)');
-
-$date->addDays(1);
-
-// Sunday, 17th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (16)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (16)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (16)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (16)');
-compare('02', $date->formatLikeSQL('IW'), 'IW (16)');
-
-$date->addDays(1);
-
-// Monday, 18th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (17)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (17)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (17)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (17)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (17)');
-
-$date->addDays(1);
-
-// Tuesday, 19th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (18)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (18)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (18)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (18)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (18)');
-
-$date->addDays(1);
-
-// Wednesday, 20th January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (19)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (19)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (19)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (19)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (19)');
-
-$date->addDays(1);
-
-// Thursday, 21st January 1999
-compare('03', $date->formatLikeSQL('WW'), 'WW (20)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (20)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (20)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (20)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (20)');
-
-$date->addDays(1);
-
-// Friday, 22nd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (21)');
-compare('04', $date->formatLikeSQL('W1'), 'W1 (21)');
-compare('03', $date->formatLikeSQL('W4'), 'W4 (21)');
-compare('03', $date->formatLikeSQL('W7'), 'W7 (21)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (21)');
-
-$date->addDays(1);
-
-// Saturday, 23rd January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (22)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (22)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (22)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (22)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (22)');
-
-$date->addDays(1);
-
-// Sunday, 24th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (23)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (23)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (23)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (23)');
-compare('03', $date->formatLikeSQL('IW'), 'IW (23)');
-
-$date->addDays(1);
-
-// Monday, 25th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (24)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (24)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (24)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (24)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (24)');
-
-$date->addDays(1);
-
-// Tuesday, 26th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (25)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (25)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (25)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (25)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (25)');
-
-$date->addDays(1);
-
-// Wednesday, 27th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (26)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (26)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (26)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (26)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (26)');
-
-$date->addDays(1);
-
-// Thursday, 28th January 1999
-compare('04', $date->formatLikeSQL('WW'), 'WW (27)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (27)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (27)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (27)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (27)');
-
-$date->addDays(1);
-
-// Friday, 29th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (28)');
-compare('05', $date->formatLikeSQL('W1'), 'W1 (28)');
-compare('04', $date->formatLikeSQL('W4'), 'W4 (28)');
-compare('04', $date->formatLikeSQL('W7'), 'W7 (28)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (28)');
-
-$date->addDays(1);
-
-// Saturday, 30th January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (29)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (29)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (29)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (29)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (29)');
-
-$date->addDays(1);
-
-// Sunday, 31st January 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (30)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (30)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (30)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (30)');
-compare('04', $date->formatLikeSQL('IW'), 'IW (30)');
-
-$date->addDays(1);
-
-// Monday, 1st February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (31)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (31)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (31)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (31)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (31)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (32)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (32)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (32)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (32)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (32)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (33)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (33)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (33)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (33)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (33)');
-
-$date->addDays(1);
-
-// Thursday, 4th February 1999
-compare('05', $date->formatLikeSQL('WW'), 'WW (34)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (34)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (34)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (34)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (34)');
-
-$date->addDays(1);
-
-// Friday, 5th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (35)');
-compare('06', $date->formatLikeSQL('W1'), 'W1 (35)');
-compare('05', $date->formatLikeSQL('W4'), 'W4 (35)');
-compare('05', $date->formatLikeSQL('W7'), 'W7 (35)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (35)');
-
-$date->addDays(1);
-
-// Saturday, 6th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (36)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (36)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (36)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (36)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (36)');
-
-$date->addDays(1);
-
-// Sunday, 7th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (37)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (37)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (37)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (37)');
-compare('05', $date->formatLikeSQL('IW'), 'IW (37)');
-
-$date->addDays(1);
-
-// Monday, 8th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (38)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (38)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (38)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (38)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (38)');
-
-$date->addDays(1);
-
-// Tuesday, 9th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (39)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (39)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (39)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (39)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (39)');
-
-$date->addDays(1);
-
-// Wednesday, 10th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (40)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (40)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (40)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (40)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (40)');
-
-$date->addDays(1);
-
-// Thursday, 11th February 1999
-compare('06', $date->formatLikeSQL('WW'), 'WW (41)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (41)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (41)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (41)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (41)');
-
-$date->addDays(1);
-
-// Friday, 12th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (42)');
-compare('07', $date->formatLikeSQL('W1'), 'W1 (42)');
-compare('06', $date->formatLikeSQL('W4'), 'W4 (42)');
-compare('06', $date->formatLikeSQL('W7'), 'W7 (42)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (42)');
-
-$date->addDays(1);
-
-// Saturday, 13th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (43)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (43)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (43)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (43)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (43)');
-
-$date->addDays(1);
-
-// Sunday, 14th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (44)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (44)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (44)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (44)');
-compare('06', $date->formatLikeSQL('IW'), 'IW (44)');
-
-$date->addDays(1);
-
-// Monday, 15th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (45)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (45)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (45)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (45)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (45)');
-
-$date->addDays(1);
-
-// Tuesday, 16th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (46)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (46)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (46)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (46)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (46)');
-
-$date->addDays(1);
-
-// Wednesday, 17th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (47)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (47)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (47)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (47)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (47)');
-
-$date->addDays(1);
-
-// Thursday, 18th February 1999
-compare('07', $date->formatLikeSQL('WW'), 'WW (48)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (48)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (48)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (48)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (48)');
-
-$date->addDays(1);
-
-// Friday, 19th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (49)');
-compare('08', $date->formatLikeSQL('W1'), 'W1 (49)');
-compare('07', $date->formatLikeSQL('W4'), 'W4 (49)');
-compare('07', $date->formatLikeSQL('W7'), 'W7 (49)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (49)');
-
-$date->addDays(1);
-
-// Saturday, 20th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (50)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (50)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (50)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (50)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (50)');
-
-$date->addDays(1);
-
-// Sunday, 21st February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (51)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (51)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (51)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (51)');
-compare('07', $date->formatLikeSQL('IW'), 'IW (51)');
-
-$date->addDays(1);
-
-// Monday, 22nd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (52)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (52)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (52)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (52)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (52)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (53)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (53)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (53)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (53)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (53)');
-
-$date->addDays(1);
-
-// Wednesday, 24th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (54)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (54)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (54)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (54)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (54)');
-
-$date->addDays(1);
-
-// Thursday, 25th February 1999
-compare('08', $date->formatLikeSQL('WW'), 'WW (55)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (55)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (55)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (55)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (55)');
-
-$date->addDays(1);
-
-// Friday, 26th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (56)');
-compare('09', $date->formatLikeSQL('W1'), 'W1 (56)');
-compare('08', $date->formatLikeSQL('W4'), 'W4 (56)');
-compare('08', $date->formatLikeSQL('W7'), 'W7 (56)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (56)');
-
-$date->addDays(1);
-
-// Saturday, 27th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (57)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (57)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (57)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (57)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (57)');
-
-$date->addDays(1);
-
-// Sunday, 28th February 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (58)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (58)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (58)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (58)');
-compare('08', $date->formatLikeSQL('IW'), 'IW (58)');
-
-$date->addDays(1);
-
-// Monday, 1st March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (59)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (59)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (59)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (59)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (59)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (60)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (60)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (60)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (60)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (60)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (61)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (61)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (61)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (61)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (61)');
-
-$date->addDays(1);
-
-// Thursday, 4th March 1999
-compare('09', $date->formatLikeSQL('WW'), 'WW (62)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (62)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (62)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (62)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (62)');
-
-$date->addDays(1);
-
-// Friday, 5th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (63)');
-compare('10', $date->formatLikeSQL('W1'), 'W1 (63)');
-compare('09', $date->formatLikeSQL('W4'), 'W4 (63)');
-compare('09', $date->formatLikeSQL('W7'), 'W7 (63)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (63)');
-
-$date->addDays(1);
-
-// Saturday, 6th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (64)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (64)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (64)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (64)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (64)');
-
-$date->addDays(1);
-
-// Sunday, 7th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (65)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (65)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (65)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (65)');
-compare('09', $date->formatLikeSQL('IW'), 'IW (65)');
-
-$date->addDays(1);
-
-// Monday, 8th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (66)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (66)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (66)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (66)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (66)');
-
-$date->addDays(1);
-
-// Tuesday, 9th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (67)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (67)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (67)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (67)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (67)');
-
-$date->addDays(1);
-
-// Wednesday, 10th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (68)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (68)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (68)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (68)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (68)');
-
-$date->addDays(1);
-
-// Thursday, 11th March 1999
-compare('10', $date->formatLikeSQL('WW'), 'WW (69)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (69)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (69)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (69)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (69)');
-
-$date->addDays(1);
-
-// Friday, 12th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (70)');
-compare('11', $date->formatLikeSQL('W1'), 'W1 (70)');
-compare('10', $date->formatLikeSQL('W4'), 'W4 (70)');
-compare('10', $date->formatLikeSQL('W7'), 'W7 (70)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (70)');
-
-$date->addDays(1);
-
-// Saturday, 13th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (71)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (71)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (71)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (71)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (71)');
-
-$date->addDays(1);
-
-// Sunday, 14th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (72)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (72)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (72)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (72)');
-compare('10', $date->formatLikeSQL('IW'), 'IW (72)');
-
-$date->addDays(1);
-
-// Monday, 15th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (73)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (73)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (73)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (73)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (73)');
-
-$date->addDays(1);
-
-// Tuesday, 16th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (74)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (74)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (74)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (74)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (74)');
-
-$date->addDays(1);
-
-// Wednesday, 17th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (75)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (75)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (75)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (75)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (75)');
-
-$date->addDays(1);
-
-// Thursday, 18th March 1999
-compare('11', $date->formatLikeSQL('WW'), 'WW (76)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (76)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (76)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (76)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (76)');
-
-$date->addDays(1);
-
-// Friday, 19th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (77)');
-compare('12', $date->formatLikeSQL('W1'), 'W1 (77)');
-compare('11', $date->formatLikeSQL('W4'), 'W4 (77)');
-compare('11', $date->formatLikeSQL('W7'), 'W7 (77)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (77)');
-
-$date->addDays(1);
-
-// Saturday, 20th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (78)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (78)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (78)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (78)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (78)');
-
-$date->addDays(1);
-
-// Sunday, 21st March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (79)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (79)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (79)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (79)');
-compare('11', $date->formatLikeSQL('IW'), 'IW (79)');
-
-$date->addDays(1);
-
-// Monday, 22nd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (80)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (80)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (80)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (80)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (80)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (81)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (81)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (81)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (81)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (81)');
-
-$date->addDays(1);
-
-// Wednesday, 24th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (82)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (82)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (82)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (82)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (82)');
-
-$date->addDays(1);
-
-// Thursday, 25th March 1999
-compare('12', $date->formatLikeSQL('WW'), 'WW (83)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (83)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (83)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (83)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (83)');
-
-$date->addDays(1);
-
-// Friday, 26th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (84)');
-compare('13', $date->formatLikeSQL('W1'), 'W1 (84)');
-compare('12', $date->formatLikeSQL('W4'), 'W4 (84)');
-compare('12', $date->formatLikeSQL('W7'), 'W7 (84)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (84)');
-
-$date->addDays(1);
-
-// Saturday, 27th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (85)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (85)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (85)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (85)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (85)');
-
-$date->addDays(1);
-
-// Sunday, 28th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (86)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (86)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (86)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (86)');
-compare('12', $date->formatLikeSQL('IW'), 'IW (86)');
-
-$date->addDays(1);
-
-// Monday, 29th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (87)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (87)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (87)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (87)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (87)');
-
-$date->addDays(1);
-
-// Tuesday, 30th March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (88)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (88)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (88)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (88)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (88)');
-
-$date->addDays(1);
-
-// Wednesday, 31st March 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (89)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (89)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (89)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (89)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (89)');
-
-$date->addDays(1);
-
-// Thursday, 1st April 1999
-compare('13', $date->formatLikeSQL('WW'), 'WW (90)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (90)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (90)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (90)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (90)');
-
-$date->addDays(1);
-
-// Friday, 2nd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (91)');
-compare('14', $date->formatLikeSQL('W1'), 'W1 (91)');
-compare('13', $date->formatLikeSQL('W4'), 'W4 (91)');
-compare('13', $date->formatLikeSQL('W7'), 'W7 (91)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (91)');
-
-$date->addDays(1);
-
-// Saturday, 3rd April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (92)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (92)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (92)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (92)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (92)');
-
-$date->addDays(1);
-
-// Sunday, 4th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (93)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (93)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (93)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (93)');
-compare('13', $date->formatLikeSQL('IW'), 'IW (93)');
-
-$date->addDays(1);
-
-// Monday, 5th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (94)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (94)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (94)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (94)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (94)');
-
-$date->addDays(1);
-
-// Tuesday, 6th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (95)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (95)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (95)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (95)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (95)');
-
-$date->addDays(1);
-
-// Wednesday, 7th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (96)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (96)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (96)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (96)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (96)');
-
-$date->addDays(1);
-
-// Thursday, 8th April 1999
-compare('14', $date->formatLikeSQL('WW'), 'WW (97)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (97)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (97)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (97)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (97)');
-
-$date->addDays(1);
-
-// Friday, 9th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (98)');
-compare('15', $date->formatLikeSQL('W1'), 'W1 (98)');
-compare('14', $date->formatLikeSQL('W4'), 'W4 (98)');
-compare('14', $date->formatLikeSQL('W7'), 'W7 (98)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (98)');
-
-$date->addDays(1);
-
-// Saturday, 10th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (99)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (99)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (99)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (99)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (99)');
-
-$date->addDays(1);
-
-// Sunday, 11th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (100)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (100)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (100)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (100)');
-compare('14', $date->formatLikeSQL('IW'), 'IW (100)');
-
-$date->addDays(1);
-
-// Monday, 12th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (101)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (101)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (101)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (101)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (101)');
-
-$date->addDays(1);
-
-// Tuesday, 13th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (102)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (102)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (102)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (102)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (102)');
-
-$date->addDays(1);
-
-// Wednesday, 14th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (103)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (103)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (103)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (103)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (103)');
-
-$date->addDays(1);
-
-// Thursday, 15th April 1999
-compare('15', $date->formatLikeSQL('WW'), 'WW (104)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (104)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (104)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (104)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (104)');
-
-$date->addDays(1);
-
-// Friday, 16th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (105)');
-compare('16', $date->formatLikeSQL('W1'), 'W1 (105)');
-compare('15', $date->formatLikeSQL('W4'), 'W4 (105)');
-compare('15', $date->formatLikeSQL('W7'), 'W7 (105)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (105)');
-
-$date->addDays(1);
-
-// Saturday, 17th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (106)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (106)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (106)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (106)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (106)');
-
-$date->addDays(1);
-
-// Sunday, 18th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (107)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (107)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (107)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (107)');
-compare('15', $date->formatLikeSQL('IW'), 'IW (107)');
-
-$date->addDays(1);
-
-// Monday, 19th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (108)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (108)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (108)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (108)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (108)');
-
-$date->addDays(1);
-
-// Tuesday, 20th April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (109)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (109)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (109)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (109)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (109)');
-
-$date->addDays(1);
-
-// Wednesday, 21st April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (110)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (110)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (110)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (110)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (110)');
-
-$date->addDays(1);
-
-// Thursday, 22nd April 1999
-compare('16', $date->formatLikeSQL('WW'), 'WW (111)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (111)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (111)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (111)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (111)');
-
-$date->addDays(1);
-
-// Friday, 23rd April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (112)');
-compare('17', $date->formatLikeSQL('W1'), 'W1 (112)');
-compare('16', $date->formatLikeSQL('W4'), 'W4 (112)');
-compare('16', $date->formatLikeSQL('W7'), 'W7 (112)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (112)');
-
-$date->addDays(1);
-
-// Saturday, 24th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (113)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (113)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (113)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (113)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (113)');
-
-$date->addDays(1);
-
-// Sunday, 25th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (114)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (114)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (114)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (114)');
-compare('16', $date->formatLikeSQL('IW'), 'IW (114)');
-
-$date->addDays(1);
-
-// Monday, 26th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (115)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (115)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (115)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (115)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (115)');
-
-$date->addDays(1);
-
-// Tuesday, 27th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (116)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (116)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (116)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (116)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (116)');
-
-$date->addDays(1);
-
-// Wednesday, 28th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (117)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (117)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (117)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (117)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (117)');
-
-$date->addDays(1);
-
-// Thursday, 29th April 1999
-compare('17', $date->formatLikeSQL('WW'), 'WW (118)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (118)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (118)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (118)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (118)');
-
-$date->addDays(1);
-
-// Friday, 30th April 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (119)');
-compare('18', $date->formatLikeSQL('W1'), 'W1 (119)');
-compare('17', $date->formatLikeSQL('W4'), 'W4 (119)');
-compare('17', $date->formatLikeSQL('W7'), 'W7 (119)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (119)');
-
-$date->addDays(1);
-
-// Saturday, 1st May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (120)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (120)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (120)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (120)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (120)');
-
-$date->addDays(1);
-
-// Sunday, 2nd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (121)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (121)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (121)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (121)');
-compare('17', $date->formatLikeSQL('IW'), 'IW (121)');
-
-$date->addDays(1);
-
-// Monday, 3rd May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (122)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (122)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (122)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (122)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (122)');
-
-$date->addDays(1);
-
-// Tuesday, 4th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (123)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (123)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (123)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (123)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (123)');
-
-$date->addDays(1);
-
-// Wednesday, 5th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (124)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (124)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (124)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (124)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (124)');
-
-$date->addDays(1);
-
-// Thursday, 6th May 1999
-compare('18', $date->formatLikeSQL('WW'), 'WW (125)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (125)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (125)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (125)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (125)');
-
-$date->addDays(1);
-
-// Friday, 7th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (126)');
-compare('19', $date->formatLikeSQL('W1'), 'W1 (126)');
-compare('18', $date->formatLikeSQL('W4'), 'W4 (126)');
-compare('18', $date->formatLikeSQL('W7'), 'W7 (126)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (126)');
-
-$date->addDays(1);
-
-// Saturday, 8th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (127)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (127)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (127)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (127)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (127)');
-
-$date->addDays(1);
-
-// Sunday, 9th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (128)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (128)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (128)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (128)');
-compare('18', $date->formatLikeSQL('IW'), 'IW (128)');
-
-$date->addDays(1);
-
-// Monday, 10th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (129)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (129)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (129)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (129)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (129)');
-
-$date->addDays(1);
-
-// Tuesday, 11th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (130)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (130)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (130)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (130)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (130)');
-
-$date->addDays(1);
-
-// Wednesday, 12th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (131)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (131)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (131)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (131)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (131)');
-
-$date->addDays(1);
-
-// Thursday, 13th May 1999
-compare('19', $date->formatLikeSQL('WW'), 'WW (132)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (132)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (132)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (132)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (132)');
-
-$date->addDays(1);
-
-// Friday, 14th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (133)');
-compare('20', $date->formatLikeSQL('W1'), 'W1 (133)');
-compare('19', $date->formatLikeSQL('W4'), 'W4 (133)');
-compare('19', $date->formatLikeSQL('W7'), 'W7 (133)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (133)');
-
-$date->addDays(1);
-
-// Saturday, 15th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (134)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (134)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (134)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (134)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (134)');
-
-$date->addDays(1);
-
-// Sunday, 16th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (135)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (135)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (135)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (135)');
-compare('19', $date->formatLikeSQL('IW'), 'IW (135)');
-
-$date->addDays(1);
-
-// Monday, 17th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (136)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (136)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (136)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (136)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (136)');
-
-$date->addDays(1);
-
-// Tuesday, 18th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (137)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (137)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (137)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (137)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (137)');
-
-$date->addDays(1);
-
-// Wednesday, 19th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (138)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (138)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (138)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (138)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (138)');
-
-$date->addDays(1);
-
-// Thursday, 20th May 1999
-compare('20', $date->formatLikeSQL('WW'), 'WW (139)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (139)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (139)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (139)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (139)');
-
-$date->addDays(1);
-
-// Friday, 21st May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (140)');
-compare('21', $date->formatLikeSQL('W1'), 'W1 (140)');
-compare('20', $date->formatLikeSQL('W4'), 'W4 (140)');
-compare('20', $date->formatLikeSQL('W7'), 'W7 (140)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (140)');
-
-$date->addDays(1);
-
-// Saturday, 22nd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (141)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (141)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (141)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (141)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (141)');
-
-$date->addDays(1);
-
-// Sunday, 23rd May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (142)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (142)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (142)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (142)');
-compare('20', $date->formatLikeSQL('IW'), 'IW (142)');
-
-$date->addDays(1);
-
-// Monday, 24th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (143)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (143)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (143)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (143)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (143)');
-
-$date->addDays(1);
-
-// Tuesday, 25th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (144)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (144)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (144)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (144)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (144)');
-
-$date->addDays(1);
-
-// Wednesday, 26th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (145)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (145)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (145)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (145)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (145)');
-
-$date->addDays(1);
-
-// Thursday, 27th May 1999
-compare('21', $date->formatLikeSQL('WW'), 'WW (146)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (146)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (146)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (146)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (146)');
-
-$date->addDays(1);
-
-// Friday, 28th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (147)');
-compare('22', $date->formatLikeSQL('W1'), 'W1 (147)');
-compare('21', $date->formatLikeSQL('W4'), 'W4 (147)');
-compare('21', $date->formatLikeSQL('W7'), 'W7 (147)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (147)');
-
-$date->addDays(1);
-
-// Saturday, 29th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (148)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (148)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (148)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (148)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (148)');
-
-$date->addDays(1);
-
-// Sunday, 30th May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (149)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (149)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (149)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (149)');
-compare('21', $date->formatLikeSQL('IW'), 'IW (149)');
-
-$date->addDays(1);
-
-// Monday, 31st May 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (150)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (150)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (150)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (150)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (150)');
-
-$date->addDays(1);
-
-// Tuesday, 1st June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (151)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (151)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (151)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (151)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (151)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (152)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (152)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (152)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (152)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (152)');
-
-$date->addDays(1);
-
-// Thursday, 3rd June 1999
-compare('22', $date->formatLikeSQL('WW'), 'WW (153)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (153)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (153)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (153)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (153)');
-
-$date->addDays(1);
-
-// Friday, 4th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (154)');
-compare('23', $date->formatLikeSQL('W1'), 'W1 (154)');
-compare('22', $date->formatLikeSQL('W4'), 'W4 (154)');
-compare('22', $date->formatLikeSQL('W7'), 'W7 (154)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (154)');
-
-$date->addDays(1);
-
-// Saturday, 5th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (155)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (155)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (155)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (155)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (155)');
-
-$date->addDays(1);
-
-// Sunday, 6th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (156)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (156)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (156)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (156)');
-compare('22', $date->formatLikeSQL('IW'), 'IW (156)');
-
-$date->addDays(1);
-
-// Monday, 7th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (157)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (157)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (157)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (157)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (157)');
-
-$date->addDays(1);
-
-// Tuesday, 8th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (158)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (158)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (158)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (158)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (158)');
-
-$date->addDays(1);
-
-// Wednesday, 9th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (159)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (159)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (159)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (159)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (159)');
-
-$date->addDays(1);
-
-// Thursday, 10th June 1999
-compare('23', $date->formatLikeSQL('WW'), 'WW (160)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (160)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (160)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (160)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (160)');
-
-$date->addDays(1);
-
-// Friday, 11th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (161)');
-compare('24', $date->formatLikeSQL('W1'), 'W1 (161)');
-compare('23', $date->formatLikeSQL('W4'), 'W4 (161)');
-compare('23', $date->formatLikeSQL('W7'), 'W7 (161)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (161)');
-
-$date->addDays(1);
-
-// Saturday, 12th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (162)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (162)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (162)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (162)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (162)');
-
-$date->addDays(1);
-
-// Sunday, 13th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (163)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (163)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (163)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (163)');
-compare('23', $date->formatLikeSQL('IW'), 'IW (163)');
-
-$date->addDays(1);
-
-// Monday, 14th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (164)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (164)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (164)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (164)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (164)');
-
-$date->addDays(1);
-
-// Tuesday, 15th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (165)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (165)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (165)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (165)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (165)');
-
-$date->addDays(1);
-
-// Wednesday, 16th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (166)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (166)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (166)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (166)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (166)');
-
-$date->addDays(1);
-
-// Thursday, 17th June 1999
-compare('24', $date->formatLikeSQL('WW'), 'WW (167)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (167)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (167)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (167)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (167)');
-
-$date->addDays(1);
-
-// Friday, 18th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (168)');
-compare('25', $date->formatLikeSQL('W1'), 'W1 (168)');
-compare('24', $date->formatLikeSQL('W4'), 'W4 (168)');
-compare('24', $date->formatLikeSQL('W7'), 'W7 (168)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (168)');
-
-$date->addDays(1);
-
-// Saturday, 19th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (169)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (169)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (169)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (169)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (169)');
-
-$date->addDays(1);
-
-// Sunday, 20th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (170)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (170)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (170)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (170)');
-compare('24', $date->formatLikeSQL('IW'), 'IW (170)');
-
-$date->addDays(1);
-
-// Monday, 21st June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (171)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (171)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (171)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (171)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (171)');
-
-$date->addDays(1);
-
-// Tuesday, 22nd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (172)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (172)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (172)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (172)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (172)');
-
-$date->addDays(1);
-
-// Wednesday, 23rd June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (173)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (173)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (173)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (173)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (173)');
-
-$date->addDays(1);
-
-// Thursday, 24th June 1999
-compare('25', $date->formatLikeSQL('WW'), 'WW (174)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (174)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (174)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (174)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (174)');
-
-$date->addDays(1);
-
-// Friday, 25th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (175)');
-compare('26', $date->formatLikeSQL('W1'), 'W1 (175)');
-compare('25', $date->formatLikeSQL('W4'), 'W4 (175)');
-compare('25', $date->formatLikeSQL('W7'), 'W7 (175)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (175)');
-
-$date->addDays(1);
-
-// Saturday, 26th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (176)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (176)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (176)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (176)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (176)');
-
-$date->addDays(1);
-
-// Sunday, 27th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (177)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (177)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (177)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (177)');
-compare('25', $date->formatLikeSQL('IW'), 'IW (177)');
-
-$date->addDays(1);
-
-// Monday, 28th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (178)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (178)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (178)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (178)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (178)');
-
-$date->addDays(1);
-
-// Tuesday, 29th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (179)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (179)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (179)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (179)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (179)');
-
-$date->addDays(1);
-
-// Wednesday, 30th June 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (180)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (180)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (180)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (180)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (180)');
-
-$date->addDays(1);
-
-// Thursday, 1st July 1999
-compare('26', $date->formatLikeSQL('WW'), 'WW (181)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (181)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (181)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (181)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (181)');
-
-$date->addDays(1);
-
-// Friday, 2nd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (182)');
-compare('27', $date->formatLikeSQL('W1'), 'W1 (182)');
-compare('26', $date->formatLikeSQL('W4'), 'W4 (182)');
-compare('26', $date->formatLikeSQL('W7'), 'W7 (182)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (182)');
-
-$date->addDays(1);
-
-// Saturday, 3rd July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (183)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (183)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (183)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (183)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (183)');
-
-$date->addDays(1);
-
-// Sunday, 4th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (184)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (184)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (184)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (184)');
-compare('26', $date->formatLikeSQL('IW'), 'IW (184)');
-
-$date->addDays(1);
-
-// Monday, 5th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (185)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (185)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (185)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (185)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (185)');
-
-$date->addDays(1);
-
-// Tuesday, 6th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (186)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (186)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (186)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (186)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (186)');
-
-$date->addDays(1);
-
-// Wednesday, 7th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (187)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (187)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (187)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (187)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (187)');
-
-$date->addDays(1);
-
-// Thursday, 8th July 1999
-compare('27', $date->formatLikeSQL('WW'), 'WW (188)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (188)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (188)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (188)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (188)');
-
-$date->addDays(1);
-
-// Friday, 9th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (189)');
-compare('28', $date->formatLikeSQL('W1'), 'W1 (189)');
-compare('27', $date->formatLikeSQL('W4'), 'W4 (189)');
-compare('27', $date->formatLikeSQL('W7'), 'W7 (189)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (189)');
-
-$date->addDays(1);
-
-// Saturday, 10th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (190)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (190)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (190)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (190)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (190)');
-
-$date->addDays(1);
-
-// Sunday, 11th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (191)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (191)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (191)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (191)');
-compare('27', $date->formatLikeSQL('IW'), 'IW (191)');
-
-$date->addDays(1);
-
-// Monday, 12th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (192)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (192)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (192)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (192)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (192)');
-
-$date->addDays(1);
-
-// Tuesday, 13th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (193)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (193)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (193)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (193)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (193)');
-
-$date->addDays(1);
-
-// Wednesday, 14th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (194)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (194)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (194)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (194)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (194)');
-
-$date->addDays(1);
-
-// Thursday, 15th July 1999
-compare('28', $date->formatLikeSQL('WW'), 'WW (195)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (195)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (195)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (195)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (195)');
-
-$date->addDays(1);
-
-// Friday, 16th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (196)');
-compare('29', $date->formatLikeSQL('W1'), 'W1 (196)');
-compare('28', $date->formatLikeSQL('W4'), 'W4 (196)');
-compare('28', $date->formatLikeSQL('W7'), 'W7 (196)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (196)');
-
-$date->addDays(1);
-
-// Saturday, 17th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (197)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (197)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (197)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (197)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (197)');
-
-$date->addDays(1);
-
-// Sunday, 18th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (198)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (198)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (198)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (198)');
-compare('28', $date->formatLikeSQL('IW'), 'IW (198)');
-
-$date->addDays(1);
-
-// Monday, 19th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (199)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (199)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (199)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (199)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (199)');
-
-$date->addDays(1);
-
-// Tuesday, 20th July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (200)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (200)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (200)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (200)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (200)');
-
-$date->addDays(1);
-
-// Wednesday, 21st July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (201)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (201)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (201)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (201)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (201)');
-
-$date->addDays(1);
-
-// Thursday, 22nd July 1999
-compare('29', $date->formatLikeSQL('WW'), 'WW (202)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (202)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (202)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (202)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (202)');
-
-$date->addDays(1);
-
-// Friday, 23rd July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (203)');
-compare('30', $date->formatLikeSQL('W1'), 'W1 (203)');
-compare('29', $date->formatLikeSQL('W4'), 'W4 (203)');
-compare('29', $date->formatLikeSQL('W7'), 'W7 (203)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (203)');
-
-$date->addDays(1);
-
-// Saturday, 24th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (204)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (204)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (204)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (204)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (204)');
-
-$date->addDays(1);
-
-// Sunday, 25th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (205)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (205)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (205)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (205)');
-compare('29', $date->formatLikeSQL('IW'), 'IW (205)');
-
-$date->addDays(1);
-
-// Monday, 26th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (206)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (206)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (206)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (206)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (206)');
-
-$date->addDays(1);
-
-// Tuesday, 27th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (207)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (207)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (207)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (207)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (207)');
-
-$date->addDays(1);
-
-// Wednesday, 28th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (208)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (208)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (208)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (208)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (208)');
-
-$date->addDays(1);
-
-// Thursday, 29th July 1999
-compare('30', $date->formatLikeSQL('WW'), 'WW (209)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (209)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (209)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (209)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (209)');
-
-$date->addDays(1);
-
-// Friday, 30th July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (210)');
-compare('31', $date->formatLikeSQL('W1'), 'W1 (210)');
-compare('30', $date->formatLikeSQL('W4'), 'W4 (210)');
-compare('30', $date->formatLikeSQL('W7'), 'W7 (210)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (210)');
-
-$date->addDays(1);
-
-// Saturday, 31st July 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (211)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (211)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (211)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (211)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (211)');
-
-$date->addDays(1);
-
-// Sunday, 1st August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (212)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (212)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (212)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (212)');
-compare('30', $date->formatLikeSQL('IW'), 'IW (212)');
-
-$date->addDays(1);
-
-// Monday, 2nd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (213)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (213)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (213)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (213)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (213)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (214)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (214)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (214)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (214)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (214)');
-
-$date->addDays(1);
-
-// Wednesday, 4th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (215)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (215)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (215)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (215)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (215)');
-
-$date->addDays(1);
-
-// Thursday, 5th August 1999
-compare('31', $date->formatLikeSQL('WW'), 'WW (216)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (216)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (216)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (216)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (216)');
-
-$date->addDays(1);
-
-// Friday, 6th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (217)');
-compare('32', $date->formatLikeSQL('W1'), 'W1 (217)');
-compare('31', $date->formatLikeSQL('W4'), 'W4 (217)');
-compare('31', $date->formatLikeSQL('W7'), 'W7 (217)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (217)');
-
-$date->addDays(1);
-
-// Saturday, 7th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (218)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (218)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (218)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (218)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (218)');
-
-$date->addDays(1);
-
-// Sunday, 8th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (219)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (219)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (219)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (219)');
-compare('31', $date->formatLikeSQL('IW'), 'IW (219)');
-
-$date->addDays(1);
-
-// Monday, 9th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (220)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (220)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (220)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (220)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (220)');
-
-$date->addDays(1);
-
-// Tuesday, 10th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (221)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (221)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (221)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (221)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (221)');
-
-$date->addDays(1);
-
-// Wednesday, 11th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (222)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (222)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (222)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (222)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (222)');
-
-$date->addDays(1);
-
-// Thursday, 12th August 1999
-compare('32', $date->formatLikeSQL('WW'), 'WW (223)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (223)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (223)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (223)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (223)');
-
-$date->addDays(1);
-
-// Friday, 13th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (224)');
-compare('33', $date->formatLikeSQL('W1'), 'W1 (224)');
-compare('32', $date->formatLikeSQL('W4'), 'W4 (224)');
-compare('32', $date->formatLikeSQL('W7'), 'W7 (224)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (224)');
-
-$date->addDays(1);
-
-// Saturday, 14th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (225)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (225)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (225)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (225)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (225)');
-
-$date->addDays(1);
-
-// Sunday, 15th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (226)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (226)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (226)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (226)');
-compare('32', $date->formatLikeSQL('IW'), 'IW (226)');
-
-$date->addDays(1);
-
-// Monday, 16th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (227)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (227)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (227)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (227)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (227)');
-
-$date->addDays(1);
-
-// Tuesday, 17th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (228)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (228)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (228)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (228)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (228)');
-
-$date->addDays(1);
-
-// Wednesday, 18th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (229)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (229)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (229)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (229)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (229)');
-
-$date->addDays(1);
-
-// Thursday, 19th August 1999
-compare('33', $date->formatLikeSQL('WW'), 'WW (230)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (230)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (230)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (230)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (230)');
-
-$date->addDays(1);
-
-// Friday, 20th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (231)');
-compare('34', $date->formatLikeSQL('W1'), 'W1 (231)');
-compare('33', $date->formatLikeSQL('W4'), 'W4 (231)');
-compare('33', $date->formatLikeSQL('W7'), 'W7 (231)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (231)');
-
-$date->addDays(1);
-
-// Saturday, 21st August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (232)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (232)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (232)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (232)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (232)');
-
-$date->addDays(1);
-
-// Sunday, 22nd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (233)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (233)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (233)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (233)');
-compare('33', $date->formatLikeSQL('IW'), 'IW (233)');
-
-$date->addDays(1);
-
-// Monday, 23rd August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (234)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (234)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (234)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (234)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (234)');
-
-$date->addDays(1);
-
-// Tuesday, 24th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (235)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (235)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (235)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (235)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (235)');
-
-$date->addDays(1);
-
-// Wednesday, 25th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (236)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (236)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (236)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (236)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (236)');
-
-$date->addDays(1);
-
-// Thursday, 26th August 1999
-compare('34', $date->formatLikeSQL('WW'), 'WW (237)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (237)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (237)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (237)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (237)');
-
-$date->addDays(1);
-
-// Friday, 27th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (238)');
-compare('35', $date->formatLikeSQL('W1'), 'W1 (238)');
-compare('34', $date->formatLikeSQL('W4'), 'W4 (238)');
-compare('34', $date->formatLikeSQL('W7'), 'W7 (238)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (238)');
-
-$date->addDays(1);
-
-// Saturday, 28th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (239)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (239)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (239)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (239)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (239)');
-
-$date->addDays(1);
-
-// Sunday, 29th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (240)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (240)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (240)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (240)');
-compare('34', $date->formatLikeSQL('IW'), 'IW (240)');
-
-$date->addDays(1);
-
-// Monday, 30th August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (241)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (241)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (241)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (241)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (241)');
-
-$date->addDays(1);
-
-// Tuesday, 31st August 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (242)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (242)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (242)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (242)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (242)');
-
-$date->addDays(1);
-
-// Wednesday, 1st September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (243)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (243)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (243)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (243)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (243)');
-
-$date->addDays(1);
-
-// Thursday, 2nd September 1999
-compare('35', $date->formatLikeSQL('WW'), 'WW (244)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (244)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (244)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (244)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (244)');
-
-$date->addDays(1);
-
-// Friday, 3rd September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (245)');
-compare('36', $date->formatLikeSQL('W1'), 'W1 (245)');
-compare('35', $date->formatLikeSQL('W4'), 'W4 (245)');
-compare('35', $date->formatLikeSQL('W7'), 'W7 (245)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (245)');
-
-$date->addDays(1);
-
-// Saturday, 4th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (246)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (246)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (246)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (246)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (246)');
-
-$date->addDays(1);
-
-// Sunday, 5th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (247)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (247)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (247)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (247)');
-compare('35', $date->formatLikeSQL('IW'), 'IW (247)');
-
-$date->addDays(1);
-
-// Monday, 6th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (248)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (248)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (248)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (248)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (248)');
-
-$date->addDays(1);
-
-// Tuesday, 7th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (249)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (249)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (249)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (249)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (249)');
-
-$date->addDays(1);
-
-// Wednesday, 8th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (250)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (250)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (250)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (250)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (250)');
-
-$date->addDays(1);
-
-// Thursday, 9th September 1999
-compare('36', $date->formatLikeSQL('WW'), 'WW (251)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (251)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (251)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (251)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (251)');
-
-$date->addDays(1);
-
-// Friday, 10th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (252)');
-compare('37', $date->formatLikeSQL('W1'), 'W1 (252)');
-compare('36', $date->formatLikeSQL('W4'), 'W4 (252)');
-compare('36', $date->formatLikeSQL('W7'), 'W7 (252)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (252)');
-
-$date->addDays(1);
-
-// Saturday, 11th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (253)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (253)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (253)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (253)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (253)');
-
-$date->addDays(1);
-
-// Sunday, 12th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (254)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (254)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (254)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (254)');
-compare('36', $date->formatLikeSQL('IW'), 'IW (254)');
-
-$date->addDays(1);
-
-// Monday, 13th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (255)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (255)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (255)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (255)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (255)');
-
-$date->addDays(1);
-
-// Tuesday, 14th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (256)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (256)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (256)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (256)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (256)');
-
-$date->addDays(1);
-
-// Wednesday, 15th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (257)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (257)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (257)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (257)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (257)');
-
-$date->addDays(1);
-
-// Thursday, 16th September 1999
-compare('37', $date->formatLikeSQL('WW'), 'WW (258)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (258)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (258)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (258)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (258)');
-
-$date->addDays(1);
-
-// Friday, 17th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (259)');
-compare('38', $date->formatLikeSQL('W1'), 'W1 (259)');
-compare('37', $date->formatLikeSQL('W4'), 'W4 (259)');
-compare('37', $date->formatLikeSQL('W7'), 'W7 (259)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (259)');
-
-$date->addDays(1);
-
-// Saturday, 18th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (260)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (260)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (260)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (260)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (260)');
-
-$date->addDays(1);
-
-// Sunday, 19th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (261)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (261)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (261)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (261)');
-compare('37', $date->formatLikeSQL('IW'), 'IW (261)');
-
-$date->addDays(1);
-
-// Monday, 20th September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (262)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (262)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (262)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (262)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (262)');
-
-$date->addDays(1);
-
-// Tuesday, 21st September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (263)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (263)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (263)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (263)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (263)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (264)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (264)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (264)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (264)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (264)');
-
-$date->addDays(1);
-
-// Thursday, 23rd September 1999
-compare('38', $date->formatLikeSQL('WW'), 'WW (265)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (265)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (265)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (265)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (265)');
-
-$date->addDays(1);
-
-// Friday, 24th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (266)');
-compare('39', $date->formatLikeSQL('W1'), 'W1 (266)');
-compare('38', $date->formatLikeSQL('W4'), 'W4 (266)');
-compare('38', $date->formatLikeSQL('W7'), 'W7 (266)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (266)');
-
-$date->addDays(1);
-
-// Saturday, 25th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (267)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (267)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (267)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (267)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (267)');
-
-$date->addDays(1);
-
-// Sunday, 26th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (268)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (268)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (268)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (268)');
-compare('38', $date->formatLikeSQL('IW'), 'IW (268)');
-
-$date->addDays(1);
-
-// Monday, 27th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (269)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (269)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (269)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (269)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (269)');
-
-$date->addDays(1);
-
-// Tuesday, 28th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (270)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (270)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (270)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (270)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (270)');
-
-$date->addDays(1);
-
-// Wednesday, 29th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (271)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (271)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (271)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (271)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (271)');
-
-$date->addDays(1);
-
-// Thursday, 30th September 1999
-compare('39', $date->formatLikeSQL('WW'), 'WW (272)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (272)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (272)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (272)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (272)');
-
-$date->addDays(1);
-
-// Friday, 1st October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (273)');
-compare('40', $date->formatLikeSQL('W1'), 'W1 (273)');
-compare('39', $date->formatLikeSQL('W4'), 'W4 (273)');
-compare('39', $date->formatLikeSQL('W7'), 'W7 (273)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (273)');
-
-$date->addDays(1);
-
-// Saturday, 2nd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (274)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (274)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (274)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (274)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (274)');
-
-$date->addDays(1);
-
-// Sunday, 3rd October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (275)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (275)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (275)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (275)');
-compare('39', $date->formatLikeSQL('IW'), 'IW (275)');
-
-$date->addDays(1);
-
-// Monday, 4th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (276)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (276)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (276)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (276)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (276)');
-
-$date->addDays(1);
-
-// Tuesday, 5th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (277)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (277)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (277)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (277)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (277)');
-
-$date->addDays(1);
-
-// Wednesday, 6th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (278)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (278)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (278)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (278)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (278)');
-
-$date->addDays(1);
-
-// Thursday, 7th October 1999
-compare('40', $date->formatLikeSQL('WW'), 'WW (279)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (279)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (279)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (279)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (279)');
-
-$date->addDays(1);
-
-// Friday, 8th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (280)');
-compare('41', $date->formatLikeSQL('W1'), 'W1 (280)');
-compare('40', $date->formatLikeSQL('W4'), 'W4 (280)');
-compare('40', $date->formatLikeSQL('W7'), 'W7 (280)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (280)');
-
-$date->addDays(1);
-
-// Saturday, 9th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (281)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (281)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (281)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (281)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (281)');
-
-$date->addDays(1);
-
-// Sunday, 10th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (282)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (282)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (282)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (282)');
-compare('40', $date->formatLikeSQL('IW'), 'IW (282)');
-
-$date->addDays(1);
-
-// Monday, 11th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (283)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (283)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (283)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (283)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (283)');
-
-$date->addDays(1);
-
-// Tuesday, 12th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (284)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (284)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (284)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (284)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (284)');
-
-$date->addDays(1);
-
-// Wednesday, 13th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (285)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (285)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (285)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (285)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (285)');
-
-$date->addDays(1);
-
-// Thursday, 14th October 1999
-compare('41', $date->formatLikeSQL('WW'), 'WW (286)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (286)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (286)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (286)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (286)');
-
-$date->addDays(1);
-
-// Friday, 15th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (287)');
-compare('42', $date->formatLikeSQL('W1'), 'W1 (287)');
-compare('41', $date->formatLikeSQL('W4'), 'W4 (287)');
-compare('41', $date->formatLikeSQL('W7'), 'W7 (287)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (287)');
-
-$date->addDays(1);
-
-// Saturday, 16th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (288)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (288)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (288)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (288)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (288)');
-
-$date->addDays(1);
-
-// Sunday, 17th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (289)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (289)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (289)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (289)');
-compare('41', $date->formatLikeSQL('IW'), 'IW (289)');
-
-$date->addDays(1);
-
-// Monday, 18th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (290)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (290)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (290)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (290)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (290)');
-
-$date->addDays(1);
-
-// Tuesday, 19th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (291)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (291)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (291)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (291)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (291)');
-
-$date->addDays(1);
-
-// Wednesday, 20th October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (292)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (292)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (292)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (292)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (292)');
-
-$date->addDays(1);
-
-// Thursday, 21st October 1999
-compare('42', $date->formatLikeSQL('WW'), 'WW (293)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (293)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (293)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (293)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (293)');
-
-$date->addDays(1);
-
-// Friday, 22nd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (294)');
-compare('43', $date->formatLikeSQL('W1'), 'W1 (294)');
-compare('42', $date->formatLikeSQL('W4'), 'W4 (294)');
-compare('42', $date->formatLikeSQL('W7'), 'W7 (294)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (294)');
-
-$date->addDays(1);
-
-// Saturday, 23rd October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (295)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (295)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (295)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (295)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (295)');
-
-$date->addDays(1);
-
-// Sunday, 24th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (296)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (296)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (296)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (296)');
-compare('42', $date->formatLikeSQL('IW'), 'IW (296)');
-
-$date->addDays(1);
-
-// Monday, 25th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (297)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (297)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (297)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (297)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (297)');
-
-$date->addDays(1);
-
-// Tuesday, 26th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (298)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (298)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (298)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (298)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (298)');
-
-$date->addDays(1);
-
-// Wednesday, 27th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (299)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (299)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (299)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (299)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (299)');
-
-$date->addDays(1);
-
-// Thursday, 28th October 1999
-compare('43', $date->formatLikeSQL('WW'), 'WW (300)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (300)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (300)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (300)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (300)');
-
-$date->addDays(1);
-
-// Friday, 29th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (301)');
-compare('44', $date->formatLikeSQL('W1'), 'W1 (301)');
-compare('43', $date->formatLikeSQL('W4'), 'W4 (301)');
-compare('43', $date->formatLikeSQL('W7'), 'W7 (301)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (301)');
-
-$date->addDays(1);
-
-// Saturday, 30th October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (302)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (302)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (302)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (302)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (302)');
-
-$date->addDays(1);
-
-// Sunday, 31st October 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (303)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (303)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (303)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (303)');
-compare('43', $date->formatLikeSQL('IW'), 'IW (303)');
-
-$date->addDays(1);
-
-// Monday, 1st November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (304)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (304)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (304)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (304)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (304)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (305)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (305)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (305)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (305)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (305)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (306)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (306)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (306)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (306)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (306)');
-
-$date->addDays(1);
-
-// Thursday, 4th November 1999
-compare('44', $date->formatLikeSQL('WW'), 'WW (307)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (307)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (307)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (307)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (307)');
-
-$date->addDays(1);
-
-// Friday, 5th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (308)');
-compare('45', $date->formatLikeSQL('W1'), 'W1 (308)');
-compare('44', $date->formatLikeSQL('W4'), 'W4 (308)');
-compare('44', $date->formatLikeSQL('W7'), 'W7 (308)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (308)');
-
-$date->addDays(1);
-
-// Saturday, 6th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (309)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (309)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (309)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (309)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (309)');
-
-$date->addDays(1);
-
-// Sunday, 7th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (310)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (310)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (310)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (310)');
-compare('44', $date->formatLikeSQL('IW'), 'IW (310)');
-
-$date->addDays(1);
-
-// Monday, 8th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (311)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (311)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (311)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (311)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (311)');
-
-$date->addDays(1);
-
-// Tuesday, 9th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (312)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (312)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (312)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (312)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (312)');
-
-$date->addDays(1);
-
-// Wednesday, 10th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (313)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (313)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (313)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (313)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (313)');
-
-$date->addDays(1);
-
-// Thursday, 11th November 1999
-compare('45', $date->formatLikeSQL('WW'), 'WW (314)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (314)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (314)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (314)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (314)');
-
-$date->addDays(1);
-
-// Friday, 12th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (315)');
-compare('46', $date->formatLikeSQL('W1'), 'W1 (315)');
-compare('45', $date->formatLikeSQL('W4'), 'W4 (315)');
-compare('45', $date->formatLikeSQL('W7'), 'W7 (315)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (315)');
-
-$date->addDays(1);
-
-// Saturday, 13th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (316)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (316)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (316)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (316)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (316)');
-
-$date->addDays(1);
-
-// Sunday, 14th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (317)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (317)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (317)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (317)');
-compare('45', $date->formatLikeSQL('IW'), 'IW (317)');
-
-$date->addDays(1);
-
-// Monday, 15th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (318)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (318)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (318)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (318)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (318)');
-
-$date->addDays(1);
-
-// Tuesday, 16th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (319)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (319)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (319)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (319)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (319)');
-
-$date->addDays(1);
-
-// Wednesday, 17th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (320)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (320)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (320)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (320)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (320)');
-
-$date->addDays(1);
-
-// Thursday, 18th November 1999
-compare('46', $date->formatLikeSQL('WW'), 'WW (321)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (321)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (321)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (321)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (321)');
-
-$date->addDays(1);
-
-// Friday, 19th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (322)');
-compare('47', $date->formatLikeSQL('W1'), 'W1 (322)');
-compare('46', $date->formatLikeSQL('W4'), 'W4 (322)');
-compare('46', $date->formatLikeSQL('W7'), 'W7 (322)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (322)');
-
-$date->addDays(1);
-
-// Saturday, 20th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (323)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (323)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (323)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (323)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (323)');
-
-$date->addDays(1);
-
-// Sunday, 21st November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (324)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (324)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (324)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (324)');
-compare('46', $date->formatLikeSQL('IW'), 'IW (324)');
-
-$date->addDays(1);
-
-// Monday, 22nd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (325)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (325)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (325)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (325)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (325)');
-
-$date->addDays(1);
-
-// Tuesday, 23rd November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (326)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (326)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (326)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (326)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (326)');
-
-$date->addDays(1);
-
-// Wednesday, 24th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (327)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (327)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (327)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (327)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (327)');
-
-$date->addDays(1);
-
-// Thursday, 25th November 1999
-compare('47', $date->formatLikeSQL('WW'), 'WW (328)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (328)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (328)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (328)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (328)');
-
-$date->addDays(1);
-
-// Friday, 26th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (329)');
-compare('48', $date->formatLikeSQL('W1'), 'W1 (329)');
-compare('47', $date->formatLikeSQL('W4'), 'W4 (329)');
-compare('47', $date->formatLikeSQL('W7'), 'W7 (329)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (329)');
-
-$date->addDays(1);
-
-// Saturday, 27th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (330)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (330)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (330)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (330)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (330)');
-
-$date->addDays(1);
-
-// Sunday, 28th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (331)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (331)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (331)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (331)');
-compare('47', $date->formatLikeSQL('IW'), 'IW (331)');
-
-$date->addDays(1);
-
-// Monday, 29th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (332)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (332)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (332)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (332)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (332)');
-
-$date->addDays(1);
-
-// Tuesday, 30th November 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (333)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (333)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (333)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (333)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (333)');
-
-$date->addDays(1);
-
-// Wednesday, 1st December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (334)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (334)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (334)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (334)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (334)');
-
-$date->addDays(1);
-
-// Thursday, 2nd December 1999
-compare('48', $date->formatLikeSQL('WW'), 'WW (335)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (335)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (335)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (335)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (335)');
-
-$date->addDays(1);
-
-// Friday, 3rd December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (336)');
-compare('49', $date->formatLikeSQL('W1'), 'W1 (336)');
-compare('48', $date->formatLikeSQL('W4'), 'W4 (336)');
-compare('48', $date->formatLikeSQL('W7'), 'W7 (336)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (336)');
-
-$date->addDays(1);
-
-// Saturday, 4th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (337)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (337)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (337)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (337)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (337)');
-
-$date->addDays(1);
-
-// Sunday, 5th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (338)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (338)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (338)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (338)');
-compare('48', $date->formatLikeSQL('IW'), 'IW (338)');
-
-$date->addDays(1);
-
-// Monday, 6th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (339)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (339)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (339)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (339)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (339)');
-
-$date->addDays(1);
-
-// Tuesday, 7th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (340)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (340)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (340)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (340)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (340)');
-
-$date->addDays(1);
-
-// Wednesday, 8th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (341)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (341)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (341)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (341)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (341)');
-
-$date->addDays(1);
-
-// Thursday, 9th December 1999
-compare('49', $date->formatLikeSQL('WW'), 'WW (342)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (342)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (342)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (342)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (342)');
-
-$date->addDays(1);
-
-// Friday, 10th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (343)');
-compare('50', $date->formatLikeSQL('W1'), 'W1 (343)');
-compare('49', $date->formatLikeSQL('W4'), 'W4 (343)');
-compare('49', $date->formatLikeSQL('W7'), 'W7 (343)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (343)');
-
-$date->addDays(1);
-
-// Saturday, 11th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (344)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (344)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (344)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (344)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (344)');
-
-$date->addDays(1);
-
-// Sunday, 12th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (345)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (345)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (345)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (345)');
-compare('49', $date->formatLikeSQL('IW'), 'IW (345)');
-
-$date->addDays(1);
-
-// Monday, 13th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (346)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (346)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (346)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (346)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (346)');
-
-$date->addDays(1);
-
-// Tuesday, 14th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (347)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (347)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (347)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (347)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (347)');
-
-$date->addDays(1);
-
-// Wednesday, 15th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (348)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (348)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (348)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (348)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (348)');
-
-$date->addDays(1);
-
-// Thursday, 16th December 1999
-compare('50', $date->formatLikeSQL('WW'), 'WW (349)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (349)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (349)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (349)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (349)');
-
-$date->addDays(1);
-
-// Friday, 17th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (350)');
-compare('51', $date->formatLikeSQL('W1'), 'W1 (350)');
-compare('50', $date->formatLikeSQL('W4'), 'W4 (350)');
-compare('50', $date->formatLikeSQL('W7'), 'W7 (350)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (350)');
-
-$date->addDays(1);
-
-// Saturday, 18th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (351)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (351)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (351)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (351)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (351)');
-
-$date->addDays(1);
-
-// Sunday, 19th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (352)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (352)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (352)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (352)');
-compare('50', $date->formatLikeSQL('IW'), 'IW (352)');
-
-$date->addDays(1);
-
-// Monday, 20th December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (353)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (353)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (353)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (353)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (353)');
-
-$date->addDays(1);
-
-// Tuesday, 21st December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (354)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (354)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (354)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (354)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (354)');
-
-$date->addDays(1);
-
-// Wednesday, 22nd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (355)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (355)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (355)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (355)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (355)');
-
-$date->addDays(1);
-
-// Thursday, 23rd December 1999
-compare('51', $date->formatLikeSQL('WW'), 'WW (356)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (356)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (356)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (356)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (356)');
-
-$date->addDays(1);
-
-// Friday, 24th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (357)');
-compare('52', $date->formatLikeSQL('W1'), 'W1 (357)');
-compare('51', $date->formatLikeSQL('W4'), 'W4 (357)');
-compare('51', $date->formatLikeSQL('W7'), 'W7 (357)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (357)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (358)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (358)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (358)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (358)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (358)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (359)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (359)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (359)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (359)');
-compare('51', $date->formatLikeSQL('IW'), 'IW (359)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (360)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (360)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (360)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (360)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (360)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (361)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (361)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (361)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (361)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (361)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (362)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (362)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (362)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (362)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (362)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1999
-compare('52', $date->formatLikeSQL('WW'), 'WW (363)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (363)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (363)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (363)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (363)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1999
-compare('53', $date->formatLikeSQL('WW'), 'WW (364)');
-compare('53', $date->formatLikeSQL('W1'), 'W1 (364)');
-compare('52', $date->formatLikeSQL('W4'), 'W4 (364)');
-compare('52', $date->formatLikeSQL('W7'), 'W7 (364)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (364)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (365)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (365)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (365)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (365)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (365)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (366)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (366)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (366)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (366)');
-compare('52', $date->formatLikeSQL('IW'), 'IW (366)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (367)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (367)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (367)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (367)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (367)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (368)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (368)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (368)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (368)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (368)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (369)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (369)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (369)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (369)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (369)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (370)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (370)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (370)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (370)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (370)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2000
-compare('01', $date->formatLikeSQL('WW'), 'WW (371)');
-compare('01', $date->formatLikeSQL('W1'), 'W1 (371)');
-compare('01', $date->formatLikeSQL('W4'), 'W4 (371)');
-compare('01', $date->formatLikeSQL('W7'), 'W7 (371)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (371)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2000
-compare('02', $date->formatLikeSQL('WW'), 'WW (372)');
-compare('02', $date->formatLikeSQL('W1'), 'W1 (372)');
-compare('02', $date->formatLikeSQL('W4'), 'W4 (372)');
-compare('02', $date->formatLikeSQL('W7'), 'W7 (372)');
-compare('01', $date->formatLikeSQL('IW'), 'IW (372)');
+++ /dev/null
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Tests for the Date_Calc::isoWeekDate() function
- *
- * Any individual tests that fail will have their name, expected result
- * and actual result printed out. So seeing no output when executing
- * this file is a good thing.
- *
- * Can be run via CLI or a web server.
- *
- * This test senses whether it is from an installation of PEAR::Date or if
- * it's from CVS or a .tar file. If it's an installed version, use the
- * installed version of Date. Otherwise, use the local development
- * copy of Date.
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * All rights reserved.
- *
- * This source file is subject to the New BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to pear-dev@lists.php.net so we can send you a copy immediately.
- *
- * @category Date and Time
- * @package Date
- * @author C.A. Woodcock <c01234@netcomuk.co.uk>
- * @copyright Copyright (c) 2007 C.A. Woodcock <c01234@netcomuk.co.uk>
- * @license http://www.opensource.org/licenses/bsd-license.php
- * BSD License
- * @link http://pear.php.net/package/Date
- * @since [next version]
- */
-
-if ('@include_path@' != '@' . 'include_path' . '@') {
- ini_set(
- 'include_path',
- ini_get('include_path')
- . PATH_SEPARATOR . '.'
- );
-} else {
- ini_set(
- 'include_path',
- realpath(dirname(__FILE__) . '/../')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
- );
-}
-
-
-/**
- * Get the needed class
- */
-require_once 'Date.php';
-
-/**
- * Compare the test result to the expected result
- *
- * If the test fails, echo out the results.
- *
- * @param mixed $expect the scalar or array you expect from the test
- * @param mixed $actual the scalar or array results from the test
- * @param string $test_name the name of the test
- *
- * @return void
- */
-function compare($expect, $actual, $test_name)
-{
- if (is_array($expect)) {
- if (count(array_diff($actual, $expect))) {
- echo "$test_name failed. Expect:\n";
- print_r($expect);
- echo "Actual:\n";
- print_r($actual);
- }
- } else {
- if ($expect !== $actual) {
- echo "'$test_name' failed. Expect: '$expect' Actual: '$actual'\n";
- }
- }
-}
-
-if (php_sapi_name() != 'cli') {
- echo "<pre>\n";
-}
-
-
-$date = new Date("1989-12-24 00:00:00Z");
-
-// Sunday, 24th December 1989
-compare('1989 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 -8)');
-
-$date->addDays(1);
-
-// Monday, 25th December 1989
-compare('1989 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 -7)');
-
-$date->addDays(1);
-
-// Tuesday, 26th December 1989
-compare('1989 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 -6)');
-
-$date->addDays(1);
-
-// Wednesday, 27th December 1989
-compare('1989 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 -5)');
-
-$date->addDays(1);
-
-// Thursday, 28th December 1989
-compare('1989 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 -4)');
-
-$date->addDays(1);
-
-// Friday, 29th December 1989
-compare('1989 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 -3)');
-
-$date->addDays(1);
-
-// Saturday, 30th December 1989
-compare('1989 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 -2)');
-
-$date->addDays(1);
-
-// Sunday, 31st December 1989
-compare('1989 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 -1)');
-
-$date->addDays(1);
-
-// Monday, 1st January 1990
-compare('1990 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 0)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd January 1990
-compare('1990 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 1)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd January 1990
-compare('1990 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 2)');
-
-$date->addDays(1);
-
-// Thursday, 4th January 1990
-compare('1990 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 3)');
-
-$date->addDays(1);
-
-// Friday, 5th January 1990
-compare('1990 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 4)');
-
-$date->addDays(1);
-
-// Saturday, 6th January 1990
-compare('1990 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 5)');
-
-$date->addDays(1);
-
-// Sunday, 7th January 1990
-compare('1990 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 6)');
-
-$date->addDays(1);
-
-// Monday, 8th January 1990
-compare('1990 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1990 7)');
-
-$date->setDayMonthYear(24, 12, 1990);
-
-// Monday, 24th December 1990
-compare('1990 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 -8)');
-
-$date->addDays(1);
-
-// Tuesday, 25th December 1990
-compare('1990 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 -7)');
-
-$date->addDays(1);
-
-// Wednesday, 26th December 1990
-compare('1990 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 -6)');
-
-$date->addDays(1);
-
-// Thursday, 27th December 1990
-compare('1990 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 -5)');
-
-$date->addDays(1);
-
-// Friday, 28th December 1990
-compare('1990 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 -4)');
-
-$date->addDays(1);
-
-// Saturday, 29th December 1990
-compare('1990 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 -3)');
-
-$date->addDays(1);
-
-// Sunday, 30th December 1990
-compare('1990 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 -2)');
-
-$date->addDays(1);
-
-// Monday, 31st December 1990
-compare('1991 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 -1)');
-
-$date->addDays(1);
-
-// Tuesday, 1st January 1991
-compare('1991 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 0)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd January 1991
-compare('1991 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 1)');
-
-$date->addDays(1);
-
-// Thursday, 3rd January 1991
-compare('1991 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 2)');
-
-$date->addDays(1);
-
-// Friday, 4th January 1991
-compare('1991 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 3)');
-
-$date->addDays(1);
-
-// Saturday, 5th January 1991
-compare('1991 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 4)');
-
-$date->addDays(1);
-
-// Sunday, 6th January 1991
-compare('1991 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 5)');
-
-$date->addDays(1);
-
-// Monday, 7th January 1991
-compare('1991 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 6)');
-
-$date->addDays(1);
-
-// Tuesday, 8th January 1991
-compare('1991 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1991 7)');
-
-$date->setDayMonthYear(24, 12, 1991);
-
-// Tuesday, 24th December 1991
-compare('1991 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 -8)');
-
-$date->addDays(1);
-
-// Wednesday, 25th December 1991
-compare('1991 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 -7)');
-
-$date->addDays(1);
-
-// Thursday, 26th December 1991
-compare('1991 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 -6)');
-
-$date->addDays(1);
-
-// Friday, 27th December 1991
-compare('1991 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 -5)');
-
-$date->addDays(1);
-
-// Saturday, 28th December 1991
-compare('1991 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 -4)');
-
-$date->addDays(1);
-
-// Sunday, 29th December 1991
-compare('1991 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 -3)');
-
-$date->addDays(1);
-
-// Monday, 30th December 1991
-compare('1992 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 -2)');
-
-$date->addDays(1);
-
-// Tuesday, 31st December 1991
-compare('1992 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 -1)');
-
-$date->addDays(1);
-
-// Wednesday, 1st January 1992
-compare('1992 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 0)');
-
-$date->addDays(1);
-
-// Thursday, 2nd January 1992
-compare('1992 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 1)');
-
-$date->addDays(1);
-
-// Friday, 3rd January 1992
-compare('1992 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 2)');
-
-$date->addDays(1);
-
-// Saturday, 4th January 1992
-compare('1992 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 3)');
-
-$date->addDays(1);
-
-// Sunday, 5th January 1992
-compare('1992 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 4)');
-
-$date->addDays(1);
-
-// Monday, 6th January 1992
-compare('1992 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 5)');
-
-$date->addDays(1);
-
-// Tuesday, 7th January 1992
-compare('1992 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 6)');
-
-$date->addDays(1);
-
-// Wednesday, 8th January 1992
-compare('1992 02 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1992 7)');
-
-$date->setDayMonthYear(24, 12, 1992);
-
-// Thursday, 24th December 1992
-compare('1992 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 -8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1992
-compare('1992 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 -7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1992
-compare('1992 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 -6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1992
-compare('1992 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 -5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1992
-compare('1992 53 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 -4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1992
-compare('1992 53 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 -3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1992
-compare('1992 53 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 -2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1992
-compare('1992 53 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 -1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1993
-compare('1992 53 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1993
-compare('1992 53 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1993
-compare('1992 53 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1993
-compare('1993 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1993
-compare('1993 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1993
-compare('1993 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1993
-compare('1993 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1993
-compare('1993 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1993 7)');
-
-$date->setDayMonthYear(24, 12, 1993);
-
-// Friday, 24th December 1993
-compare('1993 51 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 -8)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1993
-compare('1993 51 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 -7)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1993
-compare('1993 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 -6)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1993
-compare('1993 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 -5)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1993
-compare('1993 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 -4)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1993
-compare('1993 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 -3)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1993
-compare('1993 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 -2)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1993
-compare('1993 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 -1)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 1994
-compare('1993 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 0)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 1994
-compare('1993 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 1)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 1994
-compare('1994 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 2)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 1994
-compare('1994 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 3)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 1994
-compare('1994 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 4)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 1994
-compare('1994 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 5)');
-
-$date->addDays(1);
-
-// Friday, 7th January 1994
-compare('1994 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 6)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 1994
-compare('1994 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1994 7)');
-
-$date->setDayMonthYear(24, 12, 1994);
-
-// Saturday, 24th December 1994
-compare('1994 51 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 -8)');
-
-$date->addDays(1);
-
-// Sunday, 25th December 1994
-compare('1994 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 -7)');
-
-$date->addDays(1);
-
-// Monday, 26th December 1994
-compare('1994 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 -6)');
-
-$date->addDays(1);
-
-// Tuesday, 27th December 1994
-compare('1994 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 -5)');
-
-$date->addDays(1);
-
-// Wednesday, 28th December 1994
-compare('1994 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 -4)');
-
-$date->addDays(1);
-
-// Thursday, 29th December 1994
-compare('1994 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 -3)');
-
-$date->addDays(1);
-
-// Friday, 30th December 1994
-compare('1994 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 -2)');
-
-$date->addDays(1);
-
-// Saturday, 31st December 1994
-compare('1994 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 -1)');
-
-$date->addDays(1);
-
-// Sunday, 1st January 1995
-compare('1994 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 0)');
-
-$date->addDays(1);
-
-// Monday, 2nd January 1995
-compare('1995 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 1)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd January 1995
-compare('1995 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 2)');
-
-$date->addDays(1);
-
-// Wednesday, 4th January 1995
-compare('1995 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 3)');
-
-$date->addDays(1);
-
-// Thursday, 5th January 1995
-compare('1995 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 4)');
-
-$date->addDays(1);
-
-// Friday, 6th January 1995
-compare('1995 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 5)');
-
-$date->addDays(1);
-
-// Saturday, 7th January 1995
-compare('1995 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 6)');
-
-$date->addDays(1);
-
-// Sunday, 8th January 1995
-compare('1995 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1995 7)');
-
-$date->setDayMonthYear(24, 12, 1995);
-
-// Sunday, 24th December 1995
-compare('1995 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 -8)');
-
-$date->addDays(1);
-
-// Monday, 25th December 1995
-compare('1995 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 -7)');
-
-$date->addDays(1);
-
-// Tuesday, 26th December 1995
-compare('1995 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 -6)');
-
-$date->addDays(1);
-
-// Wednesday, 27th December 1995
-compare('1995 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 -5)');
-
-$date->addDays(1);
-
-// Thursday, 28th December 1995
-compare('1995 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 -4)');
-
-$date->addDays(1);
-
-// Friday, 29th December 1995
-compare('1995 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 -3)');
-
-$date->addDays(1);
-
-// Saturday, 30th December 1995
-compare('1995 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 -2)');
-
-$date->addDays(1);
-
-// Sunday, 31st December 1995
-compare('1995 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 -1)');
-
-$date->addDays(1);
-
-// Monday, 1st January 1996
-compare('1996 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 0)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd January 1996
-compare('1996 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 1)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd January 1996
-compare('1996 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 2)');
-
-$date->addDays(1);
-
-// Thursday, 4th January 1996
-compare('1996 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 3)');
-
-$date->addDays(1);
-
-// Friday, 5th January 1996
-compare('1996 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 4)');
-
-$date->addDays(1);
-
-// Saturday, 6th January 1996
-compare('1996 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 5)');
-
-$date->addDays(1);
-
-// Sunday, 7th January 1996
-compare('1996 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 6)');
-
-$date->addDays(1);
-
-// Monday, 8th January 1996
-compare('1996 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1996 7)');
-
-$date->setDayMonthYear(24, 12, 1996);
-
-// Tuesday, 24th December 1996
-compare('1996 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 -8)');
-
-$date->addDays(1);
-
-// Wednesday, 25th December 1996
-compare('1996 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 -7)');
-
-$date->addDays(1);
-
-// Thursday, 26th December 1996
-compare('1996 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 -6)');
-
-$date->addDays(1);
-
-// Friday, 27th December 1996
-compare('1996 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 -5)');
-
-$date->addDays(1);
-
-// Saturday, 28th December 1996
-compare('1996 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 -4)');
-
-$date->addDays(1);
-
-// Sunday, 29th December 1996
-compare('1996 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 -3)');
-
-$date->addDays(1);
-
-// Monday, 30th December 1996
-compare('1997 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 -2)');
-
-$date->addDays(1);
-
-// Tuesday, 31st December 1996
-compare('1997 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 -1)');
-
-$date->addDays(1);
-
-// Wednesday, 1st January 1997
-compare('1997 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 0)');
-
-$date->addDays(1);
-
-// Thursday, 2nd January 1997
-compare('1997 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 1)');
-
-$date->addDays(1);
-
-// Friday, 3rd January 1997
-compare('1997 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 2)');
-
-$date->addDays(1);
-
-// Saturday, 4th January 1997
-compare('1997 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 3)');
-
-$date->addDays(1);
-
-// Sunday, 5th January 1997
-compare('1997 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 4)');
-
-$date->addDays(1);
-
-// Monday, 6th January 1997
-compare('1997 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 5)');
-
-$date->addDays(1);
-
-// Tuesday, 7th January 1997
-compare('1997 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 6)');
-
-$date->addDays(1);
-
-// Wednesday, 8th January 1997
-compare('1997 02 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1997 7)');
-
-$date->setDayMonthYear(24, 12, 1997);
-
-// Wednesday, 24th December 1997
-compare('1997 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 -8)');
-
-$date->addDays(1);
-
-// Thursday, 25th December 1997
-compare('1997 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 -7)');
-
-$date->addDays(1);
-
-// Friday, 26th December 1997
-compare('1997 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 -6)');
-
-$date->addDays(1);
-
-// Saturday, 27th December 1997
-compare('1997 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 -5)');
-
-$date->addDays(1);
-
-// Sunday, 28th December 1997
-compare('1997 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 -4)');
-
-$date->addDays(1);
-
-// Monday, 29th December 1997
-compare('1998 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 -3)');
-
-$date->addDays(1);
-
-// Tuesday, 30th December 1997
-compare('1998 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 -2)');
-
-$date->addDays(1);
-
-// Wednesday, 31st December 1997
-compare('1998 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 -1)');
-
-$date->addDays(1);
-
-// Thursday, 1st January 1998
-compare('1998 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 0)');
-
-$date->addDays(1);
-
-// Friday, 2nd January 1998
-compare('1998 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 1)');
-
-$date->addDays(1);
-
-// Saturday, 3rd January 1998
-compare('1998 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 2)');
-
-$date->addDays(1);
-
-// Sunday, 4th January 1998
-compare('1998 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 3)');
-
-$date->addDays(1);
-
-// Monday, 5th January 1998
-compare('1998 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 4)');
-
-$date->addDays(1);
-
-// Tuesday, 6th January 1998
-compare('1998 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 5)');
-
-$date->addDays(1);
-
-// Wednesday, 7th January 1998
-compare('1998 02 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 6)');
-
-$date->addDays(1);
-
-// Thursday, 8th January 1998
-compare('1998 02 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1998 7)');
-
-$date->setDayMonthYear(24, 12, 1998);
-
-// Thursday, 24th December 1998
-compare('1998 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 -8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 1998
-compare('1998 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 -7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 1998
-compare('1998 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 -6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 1998
-compare('1998 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 -5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 1998
-compare('1998 53 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 -4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 1998
-compare('1998 53 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 -3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 1998
-compare('1998 53 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 -2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 1998
-compare('1998 53 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 -1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 1999
-compare('1998 53 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 1999
-compare('1998 53 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 1999
-compare('1998 53 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 1999
-compare('1999 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 1999
-compare('1999 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 1999
-compare('1999 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 1999
-compare('1999 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 1999
-compare('1999 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (1999 7)');
-
-$date->setDayMonthYear(24, 12, 1999);
-
-// Friday, 24th December 1999
-compare('1999 51 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 -8)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 1999
-compare('1999 51 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 -7)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 1999
-compare('1999 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 -6)');
-
-$date->addDays(1);
-
-// Monday, 27th December 1999
-compare('1999 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 -5)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 1999
-compare('1999 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 -4)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 1999
-compare('1999 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 -3)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 1999
-compare('1999 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 -2)');
-
-$date->addDays(1);
-
-// Friday, 31st December 1999
-compare('1999 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 -1)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2000
-compare('1999 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 0)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2000
-compare('1999 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 1)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2000
-compare('2000 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 2)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2000
-compare('2000 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 3)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2000
-compare('2000 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 4)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2000
-compare('2000 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 5)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2000
-compare('2000 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 6)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2000
-compare('2000 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2000 7)');
-
-$date->setDayMonthYear(24, 12, 2000);
-
-// Sunday, 24th December 2000
-compare('2000 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 -8)');
-
-$date->addDays(1);
-
-// Monday, 25th December 2000
-compare('2000 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 -7)');
-
-$date->addDays(1);
-
-// Tuesday, 26th December 2000
-compare('2000 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 -6)');
-
-$date->addDays(1);
-
-// Wednesday, 27th December 2000
-compare('2000 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 -5)');
-
-$date->addDays(1);
-
-// Thursday, 28th December 2000
-compare('2000 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 -4)');
-
-$date->addDays(1);
-
-// Friday, 29th December 2000
-compare('2000 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 -3)');
-
-$date->addDays(1);
-
-// Saturday, 30th December 2000
-compare('2000 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 -2)');
-
-$date->addDays(1);
-
-// Sunday, 31st December 2000
-compare('2000 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 -1)');
-
-$date->addDays(1);
-
-// Monday, 1st January 2001
-compare('2001 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 0)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd January 2001
-compare('2001 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 1)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd January 2001
-compare('2001 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 2)');
-
-$date->addDays(1);
-
-// Thursday, 4th January 2001
-compare('2001 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 3)');
-
-$date->addDays(1);
-
-// Friday, 5th January 2001
-compare('2001 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 4)');
-
-$date->addDays(1);
-
-// Saturday, 6th January 2001
-compare('2001 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 5)');
-
-$date->addDays(1);
-
-// Sunday, 7th January 2001
-compare('2001 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 6)');
-
-$date->addDays(1);
-
-// Monday, 8th January 2001
-compare('2001 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2001 7)');
-
-$date->setDayMonthYear(24, 12, 2001);
-
-// Monday, 24th December 2001
-compare('2001 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 -8)');
-
-$date->addDays(1);
-
-// Tuesday, 25th December 2001
-compare('2001 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 -7)');
-
-$date->addDays(1);
-
-// Wednesday, 26th December 2001
-compare('2001 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 -6)');
-
-$date->addDays(1);
-
-// Thursday, 27th December 2001
-compare('2001 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 -5)');
-
-$date->addDays(1);
-
-// Friday, 28th December 2001
-compare('2001 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 -4)');
-
-$date->addDays(1);
-
-// Saturday, 29th December 2001
-compare('2001 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 -3)');
-
-$date->addDays(1);
-
-// Sunday, 30th December 2001
-compare('2001 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 -2)');
-
-$date->addDays(1);
-
-// Monday, 31st December 2001
-compare('2002 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 -1)');
-
-$date->addDays(1);
-
-// Tuesday, 1st January 2002
-compare('2002 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 0)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd January 2002
-compare('2002 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 1)');
-
-$date->addDays(1);
-
-// Thursday, 3rd January 2002
-compare('2002 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 2)');
-
-$date->addDays(1);
-
-// Friday, 4th January 2002
-compare('2002 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 3)');
-
-$date->addDays(1);
-
-// Saturday, 5th January 2002
-compare('2002 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 4)');
-
-$date->addDays(1);
-
-// Sunday, 6th January 2002
-compare('2002 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 5)');
-
-$date->addDays(1);
-
-// Monday, 7th January 2002
-compare('2002 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 6)');
-
-$date->addDays(1);
-
-// Tuesday, 8th January 2002
-compare('2002 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2002 7)');
-
-$date->setDayMonthYear(24, 12, 2002);
-
-// Tuesday, 24th December 2002
-compare('2002 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 -8)');
-
-$date->addDays(1);
-
-// Wednesday, 25th December 2002
-compare('2002 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 -7)');
-
-$date->addDays(1);
-
-// Thursday, 26th December 2002
-compare('2002 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 -6)');
-
-$date->addDays(1);
-
-// Friday, 27th December 2002
-compare('2002 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 -5)');
-
-$date->addDays(1);
-
-// Saturday, 28th December 2002
-compare('2002 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 -4)');
-
-$date->addDays(1);
-
-// Sunday, 29th December 2002
-compare('2002 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 -3)');
-
-$date->addDays(1);
-
-// Monday, 30th December 2002
-compare('2003 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 -2)');
-
-$date->addDays(1);
-
-// Tuesday, 31st December 2002
-compare('2003 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 -1)');
-
-$date->addDays(1);
-
-// Wednesday, 1st January 2003
-compare('2003 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 0)');
-
-$date->addDays(1);
-
-// Thursday, 2nd January 2003
-compare('2003 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 1)');
-
-$date->addDays(1);
-
-// Friday, 3rd January 2003
-compare('2003 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 2)');
-
-$date->addDays(1);
-
-// Saturday, 4th January 2003
-compare('2003 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 3)');
-
-$date->addDays(1);
-
-// Sunday, 5th January 2003
-compare('2003 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 4)');
-
-$date->addDays(1);
-
-// Monday, 6th January 2003
-compare('2003 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 5)');
-
-$date->addDays(1);
-
-// Tuesday, 7th January 2003
-compare('2003 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 6)');
-
-$date->addDays(1);
-
-// Wednesday, 8th January 2003
-compare('2003 02 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2003 7)');
-
-$date->setDayMonthYear(24, 12, 2003);
-
-// Wednesday, 24th December 2003
-compare('2003 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 -8)');
-
-$date->addDays(1);
-
-// Thursday, 25th December 2003
-compare('2003 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 -7)');
-
-$date->addDays(1);
-
-// Friday, 26th December 2003
-compare('2003 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 -6)');
-
-$date->addDays(1);
-
-// Saturday, 27th December 2003
-compare('2003 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 -5)');
-
-$date->addDays(1);
-
-// Sunday, 28th December 2003
-compare('2003 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 -4)');
-
-$date->addDays(1);
-
-// Monday, 29th December 2003
-compare('2004 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 -3)');
-
-$date->addDays(1);
-
-// Tuesday, 30th December 2003
-compare('2004 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 -2)');
-
-$date->addDays(1);
-
-// Wednesday, 31st December 2003
-compare('2004 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 -1)');
-
-$date->addDays(1);
-
-// Thursday, 1st January 2004
-compare('2004 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 0)');
-
-$date->addDays(1);
-
-// Friday, 2nd January 2004
-compare('2004 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 1)');
-
-$date->addDays(1);
-
-// Saturday, 3rd January 2004
-compare('2004 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 2)');
-
-$date->addDays(1);
-
-// Sunday, 4th January 2004
-compare('2004 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 3)');
-
-$date->addDays(1);
-
-// Monday, 5th January 2004
-compare('2004 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 4)');
-
-$date->addDays(1);
-
-// Tuesday, 6th January 2004
-compare('2004 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 5)');
-
-$date->addDays(1);
-
-// Wednesday, 7th January 2004
-compare('2004 02 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 6)');
-
-$date->addDays(1);
-
-// Thursday, 8th January 2004
-compare('2004 02 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2004 7)');
-
-$date->setDayMonthYear(24, 12, 2004);
-
-// Friday, 24th December 2004
-compare('2004 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 -8)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 2004
-compare('2004 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 -7)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 2004
-compare('2004 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 -6)');
-
-$date->addDays(1);
-
-// Monday, 27th December 2004
-compare('2004 53 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 -5)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 2004
-compare('2004 53 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 -4)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 2004
-compare('2004 53 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 -3)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 2004
-compare('2004 53 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 -2)');
-
-$date->addDays(1);
-
-// Friday, 31st December 2004
-compare('2004 53 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 -1)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2005
-compare('2004 53 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 0)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2005
-compare('2004 53 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 1)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2005
-compare('2005 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 2)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2005
-compare('2005 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 3)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2005
-compare('2005 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 4)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2005
-compare('2005 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 5)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2005
-compare('2005 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 6)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2005
-compare('2005 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2005 7)');
-
-$date->setDayMonthYear(24, 12, 2005);
-
-// Saturday, 24th December 2005
-compare('2005 51 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 -8)');
-
-$date->addDays(1);
-
-// Sunday, 25th December 2005
-compare('2005 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 -7)');
-
-$date->addDays(1);
-
-// Monday, 26th December 2005
-compare('2005 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 -6)');
-
-$date->addDays(1);
-
-// Tuesday, 27th December 2005
-compare('2005 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 -5)');
-
-$date->addDays(1);
-
-// Wednesday, 28th December 2005
-compare('2005 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 -4)');
-
-$date->addDays(1);
-
-// Thursday, 29th December 2005
-compare('2005 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 -3)');
-
-$date->addDays(1);
-
-// Friday, 30th December 2005
-compare('2005 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 -2)');
-
-$date->addDays(1);
-
-// Saturday, 31st December 2005
-compare('2005 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 -1)');
-
-$date->addDays(1);
-
-// Sunday, 1st January 2006
-compare('2005 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 0)');
-
-$date->addDays(1);
-
-// Monday, 2nd January 2006
-compare('2006 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 1)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd January 2006
-compare('2006 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 2)');
-
-$date->addDays(1);
-
-// Wednesday, 4th January 2006
-compare('2006 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 3)');
-
-$date->addDays(1);
-
-// Thursday, 5th January 2006
-compare('2006 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 4)');
-
-$date->addDays(1);
-
-// Friday, 6th January 2006
-compare('2006 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 5)');
-
-$date->addDays(1);
-
-// Saturday, 7th January 2006
-compare('2006 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 6)');
-
-$date->addDays(1);
-
-// Sunday, 8th January 2006
-compare('2006 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2006 7)');
-
-$date->setDayMonthYear(24, 12, 2006);
-
-// Sunday, 24th December 2006
-compare('2006 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 -8)');
-
-$date->addDays(1);
-
-// Monday, 25th December 2006
-compare('2006 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 -7)');
-
-$date->addDays(1);
-
-// Tuesday, 26th December 2006
-compare('2006 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 -6)');
-
-$date->addDays(1);
-
-// Wednesday, 27th December 2006
-compare('2006 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 -5)');
-
-$date->addDays(1);
-
-// Thursday, 28th December 2006
-compare('2006 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 -4)');
-
-$date->addDays(1);
-
-// Friday, 29th December 2006
-compare('2006 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 -3)');
-
-$date->addDays(1);
-
-// Saturday, 30th December 2006
-compare('2006 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 -2)');
-
-$date->addDays(1);
-
-// Sunday, 31st December 2006
-compare('2006 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 -1)');
-
-$date->addDays(1);
-
-// Monday, 1st January 2007
-compare('2007 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 0)');
-
-$date->addDays(1);
-
-// Tuesday, 2nd January 2007
-compare('2007 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 1)');
-
-$date->addDays(1);
-
-// Wednesday, 3rd January 2007
-compare('2007 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 2)');
-
-$date->addDays(1);
-
-// Thursday, 4th January 2007
-compare('2007 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 3)');
-
-$date->addDays(1);
-
-// Friday, 5th January 2007
-compare('2007 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 4)');
-
-$date->addDays(1);
-
-// Saturday, 6th January 2007
-compare('2007 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 5)');
-
-$date->addDays(1);
-
-// Sunday, 7th January 2007
-compare('2007 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 6)');
-
-$date->addDays(1);
-
-// Monday, 8th January 2007
-compare('2007 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2007 7)');
-
-$date->setDayMonthYear(24, 12, 2007);
-
-// Monday, 24th December 2007
-compare('2007 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 -8)');
-
-$date->addDays(1);
-
-// Tuesday, 25th December 2007
-compare('2007 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 -7)');
-
-$date->addDays(1);
-
-// Wednesday, 26th December 2007
-compare('2007 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 -6)');
-
-$date->addDays(1);
-
-// Thursday, 27th December 2007
-compare('2007 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 -5)');
-
-$date->addDays(1);
-
-// Friday, 28th December 2007
-compare('2007 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 -4)');
-
-$date->addDays(1);
-
-// Saturday, 29th December 2007
-compare('2007 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 -3)');
-
-$date->addDays(1);
-
-// Sunday, 30th December 2007
-compare('2007 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 -2)');
-
-$date->addDays(1);
-
-// Monday, 31st December 2007
-compare('2008 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 -1)');
-
-$date->addDays(1);
-
-// Tuesday, 1st January 2008
-compare('2008 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 0)');
-
-$date->addDays(1);
-
-// Wednesday, 2nd January 2008
-compare('2008 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 1)');
-
-$date->addDays(1);
-
-// Thursday, 3rd January 2008
-compare('2008 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 2)');
-
-$date->addDays(1);
-
-// Friday, 4th January 2008
-compare('2008 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 3)');
-
-$date->addDays(1);
-
-// Saturday, 5th January 2008
-compare('2008 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 4)');
-
-$date->addDays(1);
-
-// Sunday, 6th January 2008
-compare('2008 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 5)');
-
-$date->addDays(1);
-
-// Monday, 7th January 2008
-compare('2008 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 6)');
-
-$date->addDays(1);
-
-// Tuesday, 8th January 2008
-compare('2008 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2008 7)');
-
-$date->setDayMonthYear(24, 12, 2008);
-
-// Wednesday, 24th December 2008
-compare('2008 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 -8)');
-
-$date->addDays(1);
-
-// Thursday, 25th December 2008
-compare('2008 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 -7)');
-
-$date->addDays(1);
-
-// Friday, 26th December 2008
-compare('2008 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 -6)');
-
-$date->addDays(1);
-
-// Saturday, 27th December 2008
-compare('2008 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 -5)');
-
-$date->addDays(1);
-
-// Sunday, 28th December 2008
-compare('2008 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 -4)');
-
-$date->addDays(1);
-
-// Monday, 29th December 2008
-compare('2009 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 -3)');
-
-$date->addDays(1);
-
-// Tuesday, 30th December 2008
-compare('2009 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 -2)');
-
-$date->addDays(1);
-
-// Wednesday, 31st December 2008
-compare('2009 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 -1)');
-
-$date->addDays(1);
-
-// Thursday, 1st January 2009
-compare('2009 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 0)');
-
-$date->addDays(1);
-
-// Friday, 2nd January 2009
-compare('2009 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 1)');
-
-$date->addDays(1);
-
-// Saturday, 3rd January 2009
-compare('2009 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 2)');
-
-$date->addDays(1);
-
-// Sunday, 4th January 2009
-compare('2009 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 3)');
-
-$date->addDays(1);
-
-// Monday, 5th January 2009
-compare('2009 02 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 4)');
-
-$date->addDays(1);
-
-// Tuesday, 6th January 2009
-compare('2009 02 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 5)');
-
-$date->addDays(1);
-
-// Wednesday, 7th January 2009
-compare('2009 02 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 6)');
-
-$date->addDays(1);
-
-// Thursday, 8th January 2009
-compare('2009 02 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2009 7)');
-
-$date->setDayMonthYear(24, 12, 2009);
-
-// Thursday, 24th December 2009
-compare('2009 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 -8)');
-
-$date->addDays(1);
-
-// Friday, 25th December 2009
-compare('2009 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 -7)');
-
-$date->addDays(1);
-
-// Saturday, 26th December 2009
-compare('2009 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 -6)');
-
-$date->addDays(1);
-
-// Sunday, 27th December 2009
-compare('2009 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 -5)');
-
-$date->addDays(1);
-
-// Monday, 28th December 2009
-compare('2009 53 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 -4)');
-
-$date->addDays(1);
-
-// Tuesday, 29th December 2009
-compare('2009 53 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 -3)');
-
-$date->addDays(1);
-
-// Wednesday, 30th December 2009
-compare('2009 53 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 -2)');
-
-$date->addDays(1);
-
-// Thursday, 31st December 2009
-compare('2009 53 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 -1)');
-
-$date->addDays(1);
-
-// Friday, 1st January 2010
-compare('2009 53 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 0)');
-
-$date->addDays(1);
-
-// Saturday, 2nd January 2010
-compare('2009 53 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 1)');
-
-$date->addDays(1);
-
-// Sunday, 3rd January 2010
-compare('2009 53 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 2)');
-
-$date->addDays(1);
-
-// Monday, 4th January 2010
-compare('2010 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 3)');
-
-$date->addDays(1);
-
-// Tuesday, 5th January 2010
-compare('2010 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 4)');
-
-$date->addDays(1);
-
-// Wednesday, 6th January 2010
-compare('2010 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 5)');
-
-$date->addDays(1);
-
-// Thursday, 7th January 2010
-compare('2010 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 6)');
-
-$date->addDays(1);
-
-// Friday, 8th January 2010
-compare('2010 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2010 7)');
-
-$date->setDayMonthYear(24, 12, 2010);
-
-// Friday, 24th December 2010
-compare('2010 51 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 -8)');
-
-$date->addDays(1);
-
-// Saturday, 25th December 2010
-compare('2010 51 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 -7)');
-
-$date->addDays(1);
-
-// Sunday, 26th December 2010
-compare('2010 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 -6)');
-
-$date->addDays(1);
-
-// Monday, 27th December 2010
-compare('2010 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 -5)');
-
-$date->addDays(1);
-
-// Tuesday, 28th December 2010
-compare('2010 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 -4)');
-
-$date->addDays(1);
-
-// Wednesday, 29th December 2010
-compare('2010 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 -3)');
-
-$date->addDays(1);
-
-// Thursday, 30th December 2010
-compare('2010 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 -2)');
-
-$date->addDays(1);
-
-// Friday, 31st December 2010
-compare('2010 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 -1)');
-
-$date->addDays(1);
-
-// Saturday, 1st January 2011
-compare('2010 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 0)');
-
-$date->addDays(1);
-
-// Sunday, 2nd January 2011
-compare('2010 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 1)');
-
-$date->addDays(1);
-
-// Monday, 3rd January 2011
-compare('2011 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 2)');
-
-$date->addDays(1);
-
-// Tuesday, 4th January 2011
-compare('2011 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 3)');
-
-$date->addDays(1);
-
-// Wednesday, 5th January 2011
-compare('2011 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 4)');
-
-$date->addDays(1);
-
-// Thursday, 6th January 2011
-compare('2011 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 5)');
-
-$date->addDays(1);
-
-// Friday, 7th January 2011
-compare('2011 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 6)');
-
-$date->addDays(1);
-
-// Saturday, 8th January 2011
-compare('2011 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2011 7)');
-
-$date->setDayMonthYear(24, 12, 2011);
-
-// Saturday, 24th December 2011
-compare('2011 51 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 -8)');
-
-$date->addDays(1);
-
-// Sunday, 25th December 2011
-compare('2011 51 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 -7)');
-
-$date->addDays(1);
-
-// Monday, 26th December 2011
-compare('2011 52 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 -6)');
-
-$date->addDays(1);
-
-// Tuesday, 27th December 2011
-compare('2011 52 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 -5)');
-
-$date->addDays(1);
-
-// Wednesday, 28th December 2011
-compare('2011 52 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 -4)');
-
-$date->addDays(1);
-
-// Thursday, 29th December 2011
-compare('2011 52 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 -3)');
-
-$date->addDays(1);
-
-// Friday, 30th December 2011
-compare('2011 52 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 -2)');
-
-$date->addDays(1);
-
-// Saturday, 31st December 2011
-compare('2011 52 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 -1)');
-
-$date->addDays(1);
-
-// Sunday, 1st January 2012
-compare('2011 52 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 0)');
-
-$date->addDays(1);
-
-// Monday, 2nd January 2012
-compare('2012 01 1', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 1)');
-
-$date->addDays(1);
-
-// Tuesday, 3rd January 2012
-compare('2012 01 2', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 2)');
-
-$date->addDays(1);
-
-// Wednesday, 4th January 2012
-compare('2012 01 3', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 3)');
-
-$date->addDays(1);
-
-// Thursday, 5th January 2012
-compare('2012 01 4', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 4)');
-
-$date->addDays(1);
-
-// Friday, 6th January 2012
-compare('2012 01 5', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 5)');
-
-$date->addDays(1);
-
-// Saturday, 7th January 2012
-compare('2012 01 6', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 6)');
-
-$date->addDays(1);
-
-// Sunday, 8th January 2012
-compare('2012 01 7', $date->formatLikeSQL('IYYY IW ID'), 'IW (2012 7)');
/**#@+
* ERROR constants
*/
-define('PEAR_ERROR_RETURN', 1);
-define('PEAR_ERROR_PRINT', 2);
-define('PEAR_ERROR_TRIGGER', 4);
-define('PEAR_ERROR_DIE', 8);
-define('PEAR_ERROR_CALLBACK', 16);
+define('PEAR_ERROR_RETURN', 1);
+define('PEAR_ERROR_PRINT', 2);
+define('PEAR_ERROR_TRIGGER', 4);
+define('PEAR_ERROR_DIE', 8);
+define('PEAR_ERROR_CALLBACK', 16);
/**
* WARNING: obsolete
* @deprecated
if (substr(PHP_OS, 0, 3) == 'WIN') {
define('OS_WINDOWS', true);
- define('OS_UNIX', false);
- define('PEAR_OS', 'Windows');
+ define('OS_UNIX', false);
+ define('PEAR_OS', 'Windows');
} else {
define('OS_WINDOWS', false);
- define('OS_UNIX', true);
- define('PEAR_OS', 'Unix'); // blatant assumption
+ define('OS_UNIX', true);
+ define('PEAR_OS', 'Unix'); // blatant assumption
}
-$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
-$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
+$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
+$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
$GLOBALS['_PEAR_destructor_object_list'] = array();
-$GLOBALS['_PEAR_shutdown_funcs'] = array();
-$GLOBALS['_PEAR_error_handler_stack'] = array();
+$GLOBALS['_PEAR_shutdown_funcs'] = array();
+$GLOBALS['_PEAR_error_handler_stack'] = array();
@ini_set('track_errors', true);
*/
class PEAR
{
- /**
- * List of methods that can be called both statically and non-statically.
- * @var array
- */
- protected static $bivalentMethods = array(
- 'setErrorHandling' => true,
- 'raiseError' => true,
- 'throwError' => true,
- 'pushErrorHandling' => true,
- 'popErrorHandling' => true,
- );
/**
* Whether to enable internal debug messages.
*
* @access private
*/
var $_debug = false;
+
/**
* Default error mode for this object.
*
* @access private
*/
var $_default_error_mode = null;
+
/**
* Default error options used for this object when error mode
* is PEAR_ERROR_TRIGGER.
* @access private
*/
var $_default_error_options = null;
+
/**
* Default error handler (callback) for this object, if error mode is
* PEAR_ERROR_CALLBACK.
* @access private
*/
var $_default_error_handler = '';
+
/**
* Which class to use for error objects.
*
* @access private
*/
var $_error_class = 'PEAR_Error';
+
/**
* An array of expected errors.
*
*/
var $_expected_errors = array();
+ /**
+ * List of methods that can be called both statically and non-statically.
+ * @var array
+ */
+ protected static $bivalentMethods = array(
+ 'setErrorHandling' => true,
+ 'raiseError' => true,
+ 'throwError' => true,
+ 'pushErrorHandling' => true,
+ 'popErrorHandling' => true,
+ );
+
+ /**
+ * Constructor. Registers this object in
+ * $_PEAR_destructor_object_list for destructor emulation if a
+ * destructor object exists.
+ *
+ * @param string $error_class (optional) which class to use for
+ * error objects, defaults to PEAR_Error.
+ * @access public
+ * @return void
+ */
+ function __construct($error_class = null)
+ {
+ $classname = strtolower(get_class($this));
+ if ($this->_debug) {
+ print "PEAR constructor called, class=$classname\n";
+ }
+
+ if ($error_class !== null) {
+ $this->_error_class = $error_class;
+ }
+
+ while ($classname && strcasecmp($classname, "pear")) {
+ $destructor = "_$classname";
+ if (method_exists($this, $destructor)) {
+ global $_PEAR_destructor_object_list;
+ $_PEAR_destructor_object_list[] = $this;
+ if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
+ register_shutdown_function("_PEAR_call_destructors");
+ $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
+ }
+ break;
+ } else {
+ $classname = get_parent_class($classname);
+ }
+ }
+ }
+
+ /**
+ * Only here for backwards compatibility.
+ * E.g. Archive_Tar calls $this->PEAR() in its constructor.
+ *
+ * @param string $error_class Which class to use for error objects,
+ * defaults to PEAR_Error.
+ */
+ public function PEAR($error_class = null)
+ {
+ self::__construct($error_class);
+ }
+
+ /**
+ * Destructor (the emulated type of...). Does nothing right now,
+ * but is included for forward compatibility, so subclass
+ * destructors should always call it.
+ *
+ * See the note in the class desciption about output from
+ * destructors.
+ *
+ * @access public
+ * @return void
+ */
+ function _PEAR() {
+ if ($this->_debug) {
+ printf("PEAR destructor called, class=%s\n", strtolower(get_class($this)));
+ }
+ }
+
+ public function __call($method, $arguments)
+ {
+ if (!isset(self::$bivalentMethods[$method])) {
+ trigger_error(
+ 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
+ );
+ }
+ return call_user_func_array(
+ array(get_class(), '_' . $method),
+ array_merge(array($this), $arguments)
+ );
+ }
+
public static function __callStatic($method, $arguments)
{
if (!isset(self::$bivalentMethods[$method])) {
}
/**
- * If you have a class that's mostly/entirely static, and you need static
- * properties, you can use this method to simulate them. Eg. in your method(s)
- * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar');
- * You MUST use a reference, or they will not persist!
- *
- * @param string $class The calling classname, to prevent clashes
- * @param string $var The variable to retrieve.
- * @return mixed A reference to the variable. If not set it will be
- * auto initialised to NULL.
- */
+ * If you have a class that's mostly/entirely static, and you need static
+ * properties, you can use this method to simulate them. Eg. in your method(s)
+ * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar');
+ * You MUST use a reference, or they will not persist!
+ *
+ * @param string $class The calling classname, to prevent clashes
+ * @param string $var The variable to retrieve.
+ * @return mixed A reference to the variable. If not set it will be
+ * auto initialised to NULL.
+ */
public static function &getStaticProperty($class, $var)
{
static $properties;
}
/**
- * Use this function to register a shutdown method for static
- * classes.
- *
- * @param mixed $func The function name (or array of class/method) to call
- * @param mixed $args The arguments to pass to the function
- *
- * @return void
- */
+ * Use this function to register a shutdown method for static
+ * classes.
+ *
+ * @param mixed $func The function name (or array of class/method) to call
+ * @param mixed $args The arguments to pass to the function
+ *
+ * @return void
+ */
public static function registerShutdownFunc($func, $args = array())
{
// if we are called statically, there is a potential
/**
* Tell whether a value is a PEAR error.
*
- * @param mixed $data the value to test
- * @param int $code if $data is an error object, return true
+ * @param mixed $data the value to test
+ * @param int $code if $data is an error object, return true
* only if $code is a string and
* $obj->getMessage() == $code or
* $code is an integer and $obj->getCode() == $code
return $data->getCode() == $code;
}
- public static function staticPushErrorHandling($mode, $options = null)
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
- $def_options = &$GLOBALS['_PEAR_default_error_options'];
- $stack[] = array($def_mode, $def_options);
- switch ($mode) {
- case PEAR_ERROR_EXCEPTION:
- case PEAR_ERROR_RETURN:
- case PEAR_ERROR_PRINT:
- case PEAR_ERROR_TRIGGER:
- case PEAR_ERROR_DIE:
- case null:
- $def_mode = $mode;
- $def_options = $options;
- break;
-
- case PEAR_ERROR_CALLBACK:
- $def_mode = $mode;
- // class/object method callback
- if (is_callable($options)) {
- $def_options = $options;
- } else {
- trigger_error("invalid error callback", E_USER_WARNING);
- }
- break;
-
- default:
- trigger_error("invalid error mode", E_USER_WARNING);
- break;
- }
- $stack[] = array($mode, $options);
- return true;
- }
-
- public static function staticPopErrorHandling()
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- $setmode = &$GLOBALS['_PEAR_default_error_mode'];
- $setoptions = &$GLOBALS['_PEAR_default_error_options'];
- array_pop($stack);
- list($mode, $options) = $stack[sizeof($stack) - 1];
- array_pop($stack);
- switch ($mode) {
- case PEAR_ERROR_EXCEPTION:
- case PEAR_ERROR_RETURN:
- case PEAR_ERROR_PRINT:
- case PEAR_ERROR_TRIGGER:
- case PEAR_ERROR_DIE:
- case null:
- $setmode = $mode;
- $setoptions = $options;
- break;
-
- case PEAR_ERROR_CALLBACK:
- $setmode = $mode;
- // class/object method callback
- if (is_callable($options)) {
- $setoptions = $options;
- } else {
- trigger_error("invalid error callback", E_USER_WARNING);
- }
- break;
-
- default:
- trigger_error("invalid error mode", E_USER_WARNING);
- break;
- }
- return true;
- }
-
- /**
- * OS independent PHP extension load. Remember to take care
- * on the correct extension name for case sensitive OSes.
- *
- * @param string $ext The extension name
- * @return bool Success or not on the dl() call
- */
- public static function loadExtension($ext)
- {
- if (extension_loaded($ext)) {
- return true;
- }
-
- // if either returns true dl() will produce a FATAL error, stop that
- if (
- function_exists('dl') === false ||
- ini_get('enable_dl') != 1
- ) {
- return false;
- }
-
- if (OS_WINDOWS) {
- $suffix = '.dll';
- } elseif (PHP_OS == 'HP-UX') {
- $suffix = '.sl';
- } elseif (PHP_OS == 'AIX') {
- $suffix = '.a';
- } elseif (PHP_OS == 'OSX') {
- $suffix = '.bundle';
- } else {
- $suffix = '.so';
- }
-
- return @dl('php_' . $ext . $suffix) || @dl($ext . $suffix);
- }
-
/**
* Sets how errors generated by this object should be handled.
* Can be invoked both in objects and statically. If called
*/
protected static function _setErrorHandling(
$object, $mode = null, $options = null
- )
- {
+ ) {
if ($object !== null) {
- $setmode = &$object->_default_error_mode;
- $setoptions = &$object->_default_error_options;
+ $setmode = &$object->_default_error_mode;
+ $setoptions = &$object->_default_error_options;
} else {
- $setmode = &$GLOBALS['_PEAR_default_error_mode'];
- $setoptions = &$GLOBALS['_PEAR_default_error_options'];
+ $setmode = &$GLOBALS['_PEAR_default_error_mode'];
+ $setoptions = &$GLOBALS['_PEAR_default_error_options'];
}
switch ($mode) {
}
}
+ /**
+ * This method is used to tell which errors you expect to get.
+ * Expected errors are always returned with error mode
+ * PEAR_ERROR_RETURN. Expected error codes are stored in a stack,
+ * and this method pushes a new element onto it. The list of
+ * expected errors are in effect until they are popped off the
+ * stack with the popExpect() method.
+ *
+ * Note that this method can not be called statically
+ *
+ * @param mixed $code a single error code or an array of error codes to expect
+ *
+ * @return int the new depth of the "expected errors" stack
+ * @access public
+ */
+ function expectError($code = '*')
+ {
+ if (is_array($code)) {
+ array_push($this->_expected_errors, $code);
+ } else {
+ array_push($this->_expected_errors, array($code));
+ }
+ return count($this->_expected_errors);
+ }
+
+ /**
+ * This method pops one element off the expected error codes
+ * stack.
+ *
+ * @return array the list of error codes that were popped
+ */
+ function popExpect()
+ {
+ return array_pop($this->_expected_errors);
+ }
+
+ /**
+ * This method checks unsets an error code if available
+ *
+ * @param mixed error code
+ * @return bool true if the error code was unset, false otherwise
+ * @access private
+ * @since PHP 4.3.0
+ */
+ function _checkDelExpect($error_code)
+ {
+ $deleted = false;
+ foreach ($this->_expected_errors as $key => $error_array) {
+ if (in_array($error_code, $error_array)) {
+ unset($this->_expected_errors[$key][array_search($error_code, $error_array)]);
+ $deleted = true;
+ }
+
+ // clean up empty arrays
+ if (0 == count($this->_expected_errors[$key])) {
+ unset($this->_expected_errors[$key]);
+ }
+ }
+
+ return $deleted;
+ }
+
+ /**
+ * This method deletes all occurrences of the specified element from
+ * the expected error codes stack.
+ *
+ * @param mixed $error_code error code that should be deleted
+ * @return mixed list of error codes that were deleted or error
+ * @access public
+ * @since PHP 4.3.0
+ */
+ function delExpect($error_code)
+ {
+ $deleted = false;
+ if ((is_array($error_code) && (0 != count($error_code)))) {
+ // $error_code is a non-empty array here; we walk through it trying
+ // to unset all values
+ foreach ($error_code as $key => $error) {
+ $deleted = $this->_checkDelExpect($error) ? true : false;
+ }
+
+ return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
+ } elseif (!empty($error_code)) {
+ // $error_code comes alone, trying to unset it
+ if ($this->_checkDelExpect($error_code)) {
+ return true;
+ }
+
+ return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
+ }
+
+ // $error_code is empty
+ return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
+ }
+
/**
* This method is a wrapper that returns an instance of the
* configured error class with this object's default error
* handling applied. If the $mode and $options parameters are not
* specified, the object's defaults are used.
*
- * @param $object
* @param mixed $message a text error message or a PEAR error object
*
- * @param int $code a numeric error code (it is up to your class
+ * @param int $code a numeric error code (it is up to your class
* to define these if you want to use codes)
*
- * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
+ * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
* PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE,
* PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION.
*
* @since PHP 4.0.5
*/
protected static function _raiseError($object,
- $message = null,
- $code = null,
- $mode = null,
- $options = null,
- $userinfo = null,
- $error_class = null,
- $skipmsg = false)
+ $message = null,
+ $code = null,
+ $mode = null,
+ $options = null,
+ $userinfo = null,
+ $error_class = null,
+ $skipmsg = false)
{
// The error is yet a PEAR error object
if (is_object($message)) {
- $code = $message->getCode();
- $userinfo = $message->getUserInfo();
+ $code = $message->getCode();
+ $userinfo = $message->getUserInfo();
$error_class = $message->getType();
$message->error_message_prefix = '';
- $message = $message->getMessage();
+ $message = $message->getMessage();
}
if (
if ($mode === null) {
// Class error handler
if ($object !== null && isset($object->_default_error_mode)) {
- $mode = $object->_default_error_mode;
+ $mode = $object->_default_error_mode;
$options = $object->_default_error_options;
- // Global error handler
+ // Global error handler
} elseif (isset($GLOBALS['_PEAR_default_error_mode'])) {
- $mode = $GLOBALS['_PEAR_default_error_mode'];
+ $mode = $GLOBALS['_PEAR_default_error_mode'];
$options = $GLOBALS['_PEAR_default_error_options'];
}
}
* Simpler form of raiseError with fewer options. In most cases
* message, code and userinfo are enough.
*
- * @param $object
* @param mixed $message a text error message or a PEAR error object
*
- * @param int $code a numeric error code (it is up to your class
+ * @param int $code a numeric error code (it is up to your class
* to define these if you want to use codes)
*
* @param string $userinfo If you need to pass along for example debug
return $a;
}
- $a = PEAR::raiseError($message, $code, null, null, $userinfo);
- return $a;
+ $a = PEAR::raiseError($message, $code, null, null, $userinfo);
+ return $a;
+ }
+
+ public static function staticPushErrorHandling($mode, $options = null)
+ {
+ $stack = &$GLOBALS['_PEAR_error_handler_stack'];
+ $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
+ $def_options = &$GLOBALS['_PEAR_default_error_options'];
+ $stack[] = array($def_mode, $def_options);
+ switch ($mode) {
+ case PEAR_ERROR_EXCEPTION:
+ case PEAR_ERROR_RETURN:
+ case PEAR_ERROR_PRINT:
+ case PEAR_ERROR_TRIGGER:
+ case PEAR_ERROR_DIE:
+ case null:
+ $def_mode = $mode;
+ $def_options = $options;
+ break;
+
+ case PEAR_ERROR_CALLBACK:
+ $def_mode = $mode;
+ // class/object method callback
+ if (is_callable($options)) {
+ $def_options = $options;
+ } else {
+ trigger_error("invalid error callback", E_USER_WARNING);
+ }
+ break;
+
+ default:
+ trigger_error("invalid error mode", E_USER_WARNING);
+ break;
+ }
+ $stack[] = array($mode, $options);
+ return true;
+ }
+
+ public static function staticPopErrorHandling()
+ {
+ $stack = &$GLOBALS['_PEAR_error_handler_stack'];
+ $setmode = &$GLOBALS['_PEAR_default_error_mode'];
+ $setoptions = &$GLOBALS['_PEAR_default_error_options'];
+ array_pop($stack);
+ list($mode, $options) = $stack[sizeof($stack) - 1];
+ array_pop($stack);
+ switch ($mode) {
+ case PEAR_ERROR_EXCEPTION:
+ case PEAR_ERROR_RETURN:
+ case PEAR_ERROR_PRINT:
+ case PEAR_ERROR_TRIGGER:
+ case PEAR_ERROR_DIE:
+ case null:
+ $setmode = $mode;
+ $setoptions = $options;
+ break;
+
+ case PEAR_ERROR_CALLBACK:
+ $setmode = $mode;
+ // class/object method callback
+ if (is_callable($options)) {
+ $setoptions = $options;
+ } else {
+ trigger_error("invalid error callback", E_USER_WARNING);
+ }
+ break;
+
+ default:
+ trigger_error("invalid error mode", E_USER_WARNING);
+ break;
+ }
+ return true;
}
/**
* you can easily override the actual error handler for some code and restore
* it later with popErrorHandling.
*
- * @param $object
* @param mixed $mode (same as setErrorHandling)
* @param mixed $options (same as setErrorHandling)
*
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
if ($object !== null) {
- $def_mode = &$object->_default_error_mode;
+ $def_mode = &$object->_default_error_mode;
$def_options = &$object->_default_error_options;
} else {
- $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
+ $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
$def_options = &$GLOBALS['_PEAR_default_error_options'];
}
$stack[] = array($def_mode, $def_options);
}
/**
- * Pop the last error handler used
- *
- * @param $object
- * @return bool Always true
- *
- * @see PEAR::pushErrorHandling
- */
+ * Pop the last error handler used
+ *
+ * @return bool Always true
+ *
+ * @see PEAR::pushErrorHandling
+ */
protected static function _popErrorHandling($object)
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
}
/**
- * Only here for backwards compatibility.
- * E.g. Archive_Tar calls $this->PEAR() in its constructor.
- *
- * @param string $error_class Which class to use for error objects,
- * defaults to PEAR_Error.
- */
- public function PEAR($error_class = null)
- {
- self::__construct($error_class);
- }
-
- /**
- * Constructor. Registers this object in
- * $_PEAR_destructor_object_list for destructor emulation if a
- * destructor object exists.
- *
- * @param string $error_class (optional) which class to use for
- * error objects, defaults to PEAR_Error.
- * @access public
- * @return void
- */
- function __construct($error_class = null)
- {
- $classname = strtolower(get_class($this));
- if ($this->_debug) {
- print "PEAR constructor called, class=$classname\n";
- }
-
- if ($error_class !== null) {
- $this->_error_class = $error_class;
- }
-
- while ($classname && strcasecmp($classname, "pear")) {
- $destructor = "_$classname";
- if (method_exists($this, $destructor)) {
- global $_PEAR_destructor_object_list;
- $_PEAR_destructor_object_list[] = $this;
- if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
- register_shutdown_function("_PEAR_call_destructors");
- $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
- }
- break;
- } else {
- $classname = get_parent_class($classname);
- }
- }
- }
-
- /**
- * Destructor (the emulated type of...). Does nothing right now,
- * but is included for forward compatibility, so subclass
- * destructors should always call it.
- *
- * See the note in the class desciption about output from
- * destructors.
- *
- * @access public
- * @return void
- */
- function _PEAR()
+ * OS independent PHP extension load. Remember to take care
+ * on the correct extension name for case sensitive OSes.
+ *
+ * @param string $ext The extension name
+ * @return bool Success or not on the dl() call
+ */
+ public static function loadExtension($ext)
{
- if ($this->_debug) {
- printf("PEAR destructor called, class=%s\n", strtolower(get_class($this)));
+ if (extension_loaded($ext)) {
+ return true;
}
- }
- public function __call($method, $arguments)
- {
- if (!isset(self::$bivalentMethods[$method])) {
- trigger_error(
- 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
- );
+ // if either returns true dl() will produce a FATAL error, stop that
+ if (
+ function_exists('dl') === false ||
+ ini_get('enable_dl') != 1
+ ) {
+ return false;
}
- return call_user_func_array(
- array(get_class(), '_' . $method),
- array_merge(array($this), $arguments)
- );
- }
- /**
- * This method is used to tell which errors you expect to get.
- * Expected errors are always returned with error mode
- * PEAR_ERROR_RETURN. Expected error codes are stored in a stack,
- * and this method pushes a new element onto it. The list of
- * expected errors are in effect until they are popped off the
- * stack with the popExpect() method.
- *
- * Note that this method can not be called statically
- *
- * @param mixed $code a single error code or an array of error codes to expect
- *
- * @return int the new depth of the "expected errors" stack
- * @access public
- */
- function expectError($code = '*')
- {
- if (is_array($code)) {
- array_push($this->_expected_errors, $code);
+ if (OS_WINDOWS) {
+ $suffix = '.dll';
+ } elseif (PHP_OS == 'HP-UX') {
+ $suffix = '.sl';
+ } elseif (PHP_OS == 'AIX') {
+ $suffix = '.a';
+ } elseif (PHP_OS == 'OSX') {
+ $suffix = '.bundle';
} else {
- array_push($this->_expected_errors, array($code));
- }
- return count($this->_expected_errors);
- }
-
- /**
- * This method pops one element off the expected error codes
- * stack.
- *
- * @return array the list of error codes that were popped
- */
- function popExpect()
- {
- return array_pop($this->_expected_errors);
- }
-
- /**
- * This method deletes all occurrences of the specified element from
- * the expected error codes stack.
- *
- * @param mixed $error_code error code that should be deleted
- * @return mixed list of error codes that were deleted or error
- * @access public
- * @since PHP 4.3.0
- */
- function delExpect($error_code)
- {
- $deleted = false;
- if ((is_array($error_code) && (0 != count($error_code)))) {
- // $error_code is a non-empty array here; we walk through it trying
- // to unset all values
- foreach ($error_code as $key => $error) {
- $deleted = $this->_checkDelExpect($error) ? true : false;
- }
-
- return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
- } elseif (!empty($error_code)) {
- // $error_code comes alone, trying to unset it
- if ($this->_checkDelExpect($error_code)) {
- return true;
- }
-
- return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
- }
-
- // $error_code is empty
- return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
- }
-
- /**
- * This method checks unsets an error code if available
- *
- * @param mixed error code
- * @return bool true if the error code was unset, false otherwise
- * @access private
- * @since PHP 4.3.0
- */
- function _checkDelExpect($error_code)
- {
- $deleted = false;
- foreach ($this->_expected_errors as $key => $error_array) {
- if (in_array($error_code, $error_array)) {
- unset($this->_expected_errors[$key][array_search($error_code, $error_array)]);
- $deleted = true;
- }
-
- // clean up empty arrays
- if (0 == count($this->_expected_errors[$key])) {
- unset($this->_expected_errors[$key]);
- }
+ $suffix = '.so';
}
- return $deleted;
+ return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
}
}
{
global $_PEAR_destructor_object_list;
if (is_array($_PEAR_destructor_object_list) &&
- sizeof($_PEAR_destructor_object_list)) {
+ sizeof($_PEAR_destructor_object_list))
+ {
reset($_PEAR_destructor_object_list);
$destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
class PEAR_Error
{
var $error_message_prefix = '';
- var $mode = PEAR_ERROR_RETURN;
- var $level = E_USER_NOTICE;
- var $code = -1;
- var $message = '';
- var $userinfo = '';
- var $backtrace = null;
-
- /**
- * Only here for backwards compatibility.
- *
- * Class "Cache_Error" still uses it, among others.
- *
- * @param string $message Message
- * @param int $code Error code
- * @param int $mode Error mode
- * @param mixed $options See __construct()
- * @param string $userinfo Additional user/debug info
- */
- public function PEAR_Error(
- $message = 'unknown error', $code = null, $mode = null,
- $options = null, $userinfo = null
- )
- {
- self::__construct($message, $code, $mode, $options, $userinfo);
- }
+ var $mode = PEAR_ERROR_RETURN;
+ var $level = E_USER_NOTICE;
+ var $code = -1;
+ var $message = '';
+ var $userinfo = '';
+ var $backtrace = null;
/**
* PEAR_Error constructor
*
- * @param string $message message
+ * @param string $message message
*
- * @param int $code (optional) error code
+ * @param int $code (optional) error code
*
- * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN,
+ * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN,
* PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER,
* PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION
*
- * @param mixed $options (optional) error level, _OR_ in the case of
+ * @param mixed $options (optional) error level, _OR_ in the case of
* PEAR_ERROR_CALLBACK, the callback function or object/method
* tuple.
*
*
*/
function __construct($message = 'unknown error', $code = null,
- $mode = null, $options = null, $userinfo = null)
+ $mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
$mode = PEAR_ERROR_RETURN;
}
- $this->message = $message;
- $this->code = $code;
- $this->mode = $mode;
- $this->userinfo = $userinfo;
+ $this->message = $message;
+ $this->code = $code;
+ $this->mode = $mode;
+ $this->userinfo = $userinfo;
$skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
}
/**
- * Get the error message from an error object.
+ * Only here for backwards compatibility.
*
- * @return string full error message
- * @access public
+ * Class "Cache_Error" still uses it, among others.
+ *
+ * @param string $message Message
+ * @param int $code Error code
+ * @param int $mode Error mode
+ * @param mixed $options See __construct()
+ * @param string $userinfo Additional user/debug info
*/
- function getMessage()
- {
- return ($this->error_message_prefix . $this->message);
+ public function PEAR_Error(
+ $message = 'unknown error', $code = null, $mode = null,
+ $options = null, $userinfo = null
+ ) {
+ self::__construct($message, $code, $mode, $options, $userinfo);
}
/**
return $this->callback;
}
+ /**
+ * Get the error message from an error object.
+ *
+ * @return string full error message
+ * @access public
+ */
+ function getMessage()
+ {
+ return ($this->error_message_prefix . $this->message);
+ }
+
/**
* Get error code from an error object
*
* @return int error code
* @access public
*/
- function getCode()
- {
+ function getCode()
+ {
return $this->code;
- }
+ }
/**
* Get the name of this error/exception.
}
/**
- * Get additional debug information supplied by the application.
+ * Get additional user-supplied information.
*
- * @return string debug information
+ * @return string user-supplied information
* @access public
*/
- function getDebugInfo()
+ function getUserInfo()
{
- return $this->getUserInfo();
+ return $this->userinfo;
}
/**
- * Get additional user-supplied information.
+ * Get additional debug information supplied by the application.
*
- * @return string user-supplied information
+ * @return string debug information
* @access public
*/
- function getUserInfo()
+ function getDebugInfo()
{
- return $this->userinfo;
+ return $this->getUserInfo();
}
/**
function toString()
{
$modes = array();
- $levels = array(E_USER_NOTICE => 'notice',
- E_USER_WARNING => 'warning',
- E_USER_ERROR => 'error');
+ $levels = array(E_USER_NOTICE => 'notice',
+ E_USER_WARNING => 'warning',
+ E_USER_ERROR => 'error');
if ($this->mode & PEAR_ERROR_CALLBACK) {
if (is_array($this->callback)) {
$callback = (is_object($this->callback[0]) ?
- strtolower(get_class($this->callback[0])) :
- $this->callback[0]) . '::' .
+ strtolower(get_class($this->callback[0])) :
+ $this->callback[0]) . '::' .
$this->callback[1];
} else {
$callback = $this->callback;
}
- return sprintf('[%s: message="%s" code=%d mode=callback ' .
- 'callback=%s prefix="%s" info="%s"]',
- strtolower(get_class($this)), $this->message, $this->code,
- $callback, $this->error_message_prefix,
- $this->userinfo);
+ return sprintf('[%s: message="%s" code=%d mode=callback '.
+ 'callback=%s prefix="%s" info="%s"]',
+ strtolower(get_class($this)), $this->message, $this->code,
+ $callback, $this->error_message_prefix,
+ $this->userinfo);
}
if ($this->mode & PEAR_ERROR_PRINT) {
$modes[] = 'print';
if ($this->mode & PEAR_ERROR_RETURN) {
$modes[] = 'return';
}
- return sprintf('[%s: message="%s" code=%d mode=%s level=%s ' .
- 'prefix="%s" info="%s"]',
- strtolower(get_class($this)), $this->message, $this->code,
- implode("|", $modes), $levels[$this->level],
- $this->error_message_prefix,
- $this->userinfo);
+ return sprintf('[%s: message="%s" code=%d mode=%s level=%s '.
+ 'prefix="%s" info="%s"]',
+ strtolower(get_class($this)), $this->message, $this->code,
+ implode("|", $modes), $levels[$this->level],
+ $this->error_message_prefix,
+ $this->userinfo);
}
}
<?php
/**
* Error Stack Implementation
- *
+ *
* This is an incredibly simple implementation of a very complex error handling
* facility. It contains the ability
* to track multiple errors from multiple packages simultaneously. In addition,
* information such as the exact file, line number, class and function that
* generated the error, and if necessary, it can raise a traditional PEAR_Error.
* It has built-in support for PEAR::Log, to log errors as they occur
- *
+ *
* Since version 0.2alpha, it is also possible to selectively ignore errors,
* through the use of an error callback, see {@link pushCallback()}
- *
+ *
* Since version 0.3alpha, it is possible to specify the exception class
* returned from {@link push()}
*
/**
* Singleton storage
- *
+ *
* Format:
* <pre>
* array(
/**
* Global error callback (default)
- *
+ *
* This is only used if set to non-false. * is the default callback for
* all packages, whereas specific packages may set a default callback
* for all instances, regardless of whether they are a singleton or not.
/**
* Global Log object (default)
- *
+ *
* This is only used if set to non-false. Use to set a default log object for
* all stacks, regardless of instantiation order or location
* @see PEAR_ErrorStack::setDefaultLogger()
/**
* Global Overriding Callback
- *
+ *
* This callback will override any error callbacks that specific loggers have set.
* Use with EXTREME caution
* @see PEAR_ErrorStack::staticPushCallback()
* @access protected
*/
var $_package;
-
+
/**
* Determines whether a PEAR_Error is thrown upon every error addition
* @var boolean
* @access private
*/
var $_compat = false;
-
+
/**
* If set to a valid callback, this will be used to generate the error
* message from the error code, otherwise the message passed in will be
* @access private
*/
var $_msgCallback = false;
-
+
/**
* If set to a valid callback, this will be used to generate the error
* context for an error. For PHP-related errors, this will be a file
$this->setContextCallback($contextCallback);
$this->_compat = $throwPEAR_Error;
}
-
+
/**
* Return a single error stack for this package.
- *
+ *
* Note that all parameters are ignored if the stack for package $package
* has already been instantiated
* @param string $package name of the package this error stack represents
/**
* Internal error handler for PEAR_ErrorStack class
- *
+ *
* Dies if the error is an exception (and would have died anyway)
* @access private
*/
die($message);
}
}
-
+
/**
* Set up a PEAR::Log object for all error stacks that don't have one
- * @param Log $log
+ * @param Log $log
*/
public static function setDefaultLogger(&$log)
{
$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log;
}
}
-
+
/**
* Set up a PEAR::Log object for this error stack
- * @param Log $log
+ * @param Log $log
*/
function setLogger(&$log)
{
$this->_logger = &$log;
}
}
-
+
/**
* Set an error code => error message mapping callback
- *
+ *
* This method sets the callback that can be used to generate error
* messages for any instance
* @param array|string Callback function/method
}
}
}
-
+
/**
* Get an error code => error message mapping callback
- *
+ *
* This method returns the current callback that can be used to generate error
* messages
* @return array|string|false Callback function/method or false if none
{
return $this->_msgCallback;
}
-
+
/**
* Sets a default callback to be used by all error stacks
- *
+ *
* This method sets the callback that can be used to generate error
* messages for a singleton
* @param array|string Callback function/method
$package = $package ? $package : '*';
$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$package] = $callback;
}
-
+
/**
* Set a callback that generates context information (location of error) for an error stack
- *
+ *
* This method sets the callback that can be used to generate context
* information for an error. Passing in NULL will disable context generation
* and remove the expensive call to debug_backtrace()
* @param array|string|null Callback function/method
- * @return bool
- * @return array|bool|callable|false|string
*/
function setContextCallback($contextCallback)
{
return $this->_contextCallback = false;
}
if (!$contextCallback) {
- $this->_contextCallback = [&$this, 'getFileLine'];
+ $this->_contextCallback = array(&$this, 'getFileLine');
} else {
if (is_callable($contextCallback)) {
$this->_contextCallback = $contextCallback;
}
}
- return $this->_contextCallback;
}
-
+
/**
* Set an error Callback
* If set to a valid callback, this will be called every time an error
* is pushed onto the stack. The return value will be used to determine
* whether to allow an error to be pushed or logged.
- *
+ *
* The return value must be one of the ERRORSTACK_* constants.
- *
+ *
* This functionality can be used to emulate PEAR's pushErrorHandling, and
* the PEAR_ERROR_CALLBACK mode, without affecting the integrity of
* the error stack or logging
{
array_push($this->_errorCallback, $cb);
}
-
+
/**
* Remove a callback from the error callback stack
* @see pushCallback()
}
return array_pop($this->_errorCallback);
}
-
+
/**
* Set a temporary overriding error callback for every package error stack
*
{
array_push($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'], $cb);
}
-
+
/**
* Remove a temporary overriding error callback
* @see staticPushCallback()
}
return $ret;
}
-
+
/**
* Add an error to the stack
- *
+ *
* If the message generator exists, it is called with 2 parameters.
* - the current Error Stack object
* - an array that is in the same format as an error. Available indices
* are 'code', 'package', 'time', 'params', 'level', and 'context'
- *
+ *
* Next, if the error should contain context information, this is
* handled by the context grabbing method.
* Finally, the error is pushed onto the proper error stack
* @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also
* thrown. If a PEAR_Error is returned, the userinfo
* property is set to the following array:
- *
+ *
* <code>
* array(
* 'code' => $code,
* //['repackage' => $err] repackaged error array/Exception class
* );
* </code>
- *
+ *
* Normally, the previous array is returned.
*/
function push($code, $level = 'error', $params = array(), $msg = false,
}
$context = call_user_func($this->_contextCallback, $code, $params, $backtrace);
}
-
+
// save error
$time = explode(' ', microtime());
$time = $time[1] + $time[0];
$err = array(
- 'code' => $code,
- 'params' => $params,
- 'package' => $this->_package,
- 'level' => $level,
- 'time' => $time,
- 'context' => $context,
- 'message' => $msg,
- );
+ 'code' => $code,
+ 'params' => $params,
+ 'package' => $this->_package,
+ 'level' => $level,
+ 'time' => $time,
+ 'context' => $context,
+ 'message' => $msg,
+ );
if ($repackage) {
$err['repackage'] = $repackage;
// set up the error message, if necessary
if ($this->_msgCallback) {
$msg = call_user_func_array($this->_msgCallback,
- array(&$this, $err));
+ array(&$this, $err));
$err['message'] = $msg;
- }
+ }
$push = $log = true;
$die = false;
// try the overriding callback first
}
if (is_callable($callback)) {
switch(call_user_func($callback, $err)){
- case PEAR_ERRORSTACK_IGNORE:
- return $err;
- break;
- case PEAR_ERRORSTACK_PUSH:
- $log = false;
- break;
- case PEAR_ERRORSTACK_LOG:
- $push = false;
- break;
- case PEAR_ERRORSTACK_DIE:
- $die = true;
- break;
+ case PEAR_ERRORSTACK_IGNORE:
+ return $err;
+ break;
+ case PEAR_ERRORSTACK_PUSH:
+ $log = false;
+ break;
+ case PEAR_ERRORSTACK_LOG:
+ $push = false;
+ break;
+ case PEAR_ERRORSTACK_DIE:
+ $die = true;
+ break;
// anything else returned has the same effect as pushandlog
}
}
}
return $err;
}
-
+
/**
* Static version of {@link push()}
- *
+ *
* @param string $package Package name this error belongs to
* @param int $code Package-specific error code
* @param string $level Error level. This is NOT spell-checked
}
return $s->push($code, $level, $params, $msg, $repackage, $backtrace);
}
-
+
/**
* Log an error using PEAR::Log
* @param array $err Error array
}
}
-
+
/**
* Pop an error off of the error stack
- *
+ *
* @return false|array
* @since 0.4alpha it is no longer possible to specify a specific error
* level to return - the last error pushed will be returned, instead
}
return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->pop();
}
- return false;
}
/**
* Determine whether there are any errors on the stack
- * @param string|array|bool $level name. Use to determine if any errors
+ * @param string|array Level name. Use to determine if any errors
* of level (string), or levels (array) have been pushed
* @return boolean
*/
}
return count($this->_errors);
}
-
+
/**
* Retrieve all errors since last purge
- *
+ *
* @param boolean set in order to empty the error stack
* @param string level name, to return only errors of a particular severity
* @return array
$this->_errorsByLevel = array();
return $ret;
}
-
+
/**
* Determine whether there are any errors on a single error stack, or on any error stack
*
}
return false;
}
-
+
/**
* Get a list of all errors since last purge, organized by package
* @since PEAR 1.4.0dev BC break! $level is now in the place $merge used to be
* @param array $sortfunc Function used to sort a merged array - default
* sorts by time, and should be good for most cases
*
- * @return array
+ * @return array
*/
public static function staticGetErrors(
$purge = false, $level = false, $merge = false,
}
return $ret;
}
-
+
/**
* Error sorting function, sorts by time
* @access private
$functionframe = 0;
} else {
while (isset($backtrace[$functionframe]['function']) &&
- $backtrace[$functionframe]['function'] == 'eval' &&
- isset($backtrace[$functionframe + 1])) {
+ $backtrace[$functionframe]['function'] == 'eval' &&
+ isset($backtrace[$functionframe + 1])) {
$functionframe++;
}
}
$funcbacktrace = $backtrace[$functionframe];
$filebacktrace = $backtrace[$frame];
$ret = array('file' => $filebacktrace['file'],
- 'line' => $filebacktrace['line']);
+ 'line' => $filebacktrace['line']);
// rearrange for eval'd code or create function errors
- if (strpos($filebacktrace['file'], '(') &&
- preg_match(';^(.*?)\((\d+)\) : (.*?)\\z;', $filebacktrace['file'],
- $matches)) {
+ if (strpos($filebacktrace['file'], '(') &&
+ preg_match(';^(.*?)\((\d+)\) : (.*?)\\z;', $filebacktrace['file'],
+ $matches)) {
$ret['file'] = $matches[1];
$ret['line'] = $matches[2] + 0;
}
}
return false;
}
-
+
/**
* Standard error message generation callback
- *
+ *
* This method may also be called by a custom error message generator
* to fill in template values from the params array, simply
* set the third parameter to the error message template string to use
- *
+ *
* The special variable %__msg% is reserved: use it only to specify
* where a message passed in by the user should be placed in the template,
* like so:
- *
+ *
* Error message: %msg% - internal error
- *
+ *
* If the message passed like so:
- *
+ *
* <code>
* $stack->push(ERROR_CODE, 'error', array(), 'server error 500');
* </code>
- *
+ *
* The returned error message will be "Error message: server error 500 -
* internal error"
* @param PEAR_ErrorStack
}
return $mainmsg;
}
-
+
/**
* Standard Error Message Template generator from code
* @return string
}
return $this->_errorMsgs[$code];
}
-
+
/**
* Set the Error Message Template array
- *
+ *
* The array format must be:
* <pre>
* array(error code => 'message template',...)
* </pre>
- *
+ *
* Error message parameters passed into {@link push()} will be used as input
* for the error message. If the template is 'message %foo% was %bar%', and the
* parameters are array('foo' => 'one', 'bar' => 'six'), the error message returned will
* be 'message one was six'
- *
- * Returns string via property
- * @param $template
- * @return null
+ * @return string
*/
function setErrorMessageTemplate($template)
{
$this->_errorMsgs = $template;
- return null;
}
-
-
+
+
/**
* emulate PEAR::raiseError()
- *
+ *
* @return PEAR_Error
*/
function raiseError()
{
- require_once '../PEAR.php';
+ require_once 'PEAR.php';
$args = func_get_args();
return call_user_func_array(array('PEAR', 'raiseError'), $args);
}
}
$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
-$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
\ No newline at end of file
+$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
+?>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Exception.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.3
*/
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.4
+ * @version Release: @package_version@
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.3
*
const OBSERVER_PRINT = -2;
const OBSERVER_TRIGGER = -4;
const OBSERVER_DIE = -8;
+ protected $cause;
private static $_observers = array();
private static $_uniqueid = 0;
- protected $cause;
private $_trace;
/**
* @param string exception message
* @param int|Exception|PEAR_Error|array|null exception cause
* @param int|null exception code or null
- * @throws PEAR_Exception
*/
public function __construct($message, $p2 = null, $p3 = null)
{
$this->signal();
}
+ /**
+ * @param mixed $callback - A valid php callback, see php func is_callable()
+ * - A PEAR_Exception::OBSERVER_* constant
+ * - An array(const PEAR_Exception::OBSERVER_*,
+ * mixed $options)
+ * @param string $label The name of the observer. Use this if you want
+ * to remove it later with removeObserver()
+ */
+ public static function addObserver($callback, $label = 'default')
+ {
+ self::$_observers[$label] = $callback;
+ }
+
+ public static function removeObserver($label = 'default')
+ {
+ unset(self::$_observers[$label]);
+ }
+
+ /**
+ * @return int unique identifier for an observer
+ */
+ public static function getUniqueId()
+ {
+ return self::$_uniqueid++;
+ }
+
private function signal()
{
foreach (self::$_observers as $func) {
}
}
- /**
- * @param mixed $callback - A valid php callback, see php func is_callable()
- * - A PEAR_Exception::OBSERVER_* constant
- * - An array(const PEAR_Exception::OBSERVER_*,
- * mixed $options)
- * @param string $label The name of the observer. Use this if you want
- * to remove it later with removeObserver()
- */
- public static function addObserver($callback, $label = 'default')
- {
- self::$_observers[$label] = $callback;
- }
-
- public static function removeObserver($label = 'default')
- {
- unset(self::$_observers[$label]);
- }
-
- /**
- * @return int unique identifier for an observer
- */
- public static function getUniqueId()
- {
- return self::$_uniqueid++;
- }
-
/**
* Return specific error information that can be used for more detailed
* error messages or translation.
return $this->cause;
}
+ /**
+ * Function must be public to call on caused exceptions
+ * @param array
+ */
+ public function getCauseMessage(&$causes)
+ {
+ $trace = $this->getTraceSafe();
+ $cause = array('class' => get_class($this),
+ 'message' => $this->message,
+ 'file' => 'unknown',
+ 'line' => 'unknown');
+ if (isset($trace[0])) {
+ if (isset($trace[0]['file'])) {
+ $cause['file'] = $trace[0]['file'];
+ $cause['line'] = $trace[0]['line'];
+ }
+ }
+ $causes[] = $cause;
+ if ($this->cause instanceof PEAR_Exception) {
+ $this->cause->getCauseMessage($causes);
+ } elseif ($this->cause instanceof Exception) {
+ $causes[] = array('class' => get_class($this->cause),
+ 'message' => $this->cause->getMessage(),
+ 'file' => $this->cause->getFile(),
+ 'line' => $this->cause->getLine());
+ } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) {
+ $causes[] = array('class' => get_class($this->cause),
+ 'message' => $this->cause->getMessage(),
+ 'file' => 'unknown',
+ 'line' => 'unknown');
+ } elseif (is_array($this->cause)) {
+ foreach ($this->cause as $cause) {
+ if ($cause instanceof PEAR_Exception) {
+ $cause->getCauseMessage($causes);
+ } elseif ($cause instanceof Exception) {
+ $causes[] = array('class' => get_class($cause),
+ 'message' => $cause->getMessage(),
+ 'file' => $cause->getFile(),
+ 'line' => $cause->getLine());
+ } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) {
+ $causes[] = array('class' => get_class($cause),
+ 'message' => $cause->getMessage(),
+ 'file' => 'unknown',
+ 'line' => 'unknown');
+ } elseif (is_array($cause) && isset($cause['message'])) {
+ // PEAR_ErrorStack warning
+ $causes[] = array(
+ 'class' => $cause['package'],
+ 'message' => $cause['message'],
+ 'file' => isset($cause['context']['file']) ?
+ $cause['context']['file'] :
+ 'unknown',
+ 'line' => isset($cause['context']['line']) ?
+ $cause['context']['line'] :
+ 'unknown',
+ );
+ }
+ }
+ }
+ }
+
+ public function getTraceSafe()
+ {
+ if (!isset($this->_trace)) {
+ $this->_trace = $this->getTrace();
+ if (empty($this->_trace)) {
+ $backtrace = debug_backtrace();
+ $this->_trace = array($backtrace[count($backtrace)-1]);
+ }
+ }
+ return $this->_trace;
+ }
+
public function getErrorClass()
{
$trace = $this->getTraceSafe();
$trace = $this->getTraceSafe();
$causes = array();
$this->getCauseMessage($causes);
- $html = '<table style="border: 1px" cellspacing="0">' . "\n";
+ $html = '<table style="border: 1px" cellspacing="0">' . "\n";
foreach ($causes as $i => $cause) {
$html .= '<tr><td colspan="3" style="background: #ff9999">'
- . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: '
- . htmlspecialchars($cause['message']) . ' in <b>' . $cause['file'] . '</b> '
- . 'on line <b>' . $cause['line'] . '</b>'
- . "</td></tr>\n";
+ . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: '
+ . htmlspecialchars($cause['message']) . ' in <b>' . $cause['file'] . '</b> '
+ . 'on line <b>' . $cause['line'] . '</b>'
+ . "</td></tr>\n";
}
$html .= '<tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>' . "\n"
- . '<tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td>'
- . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td>'
- . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>' . "\n";
+ . '<tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td>'
+ . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td>'
+ . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>' . "\n";
foreach ($trace as $k => $v) {
$html .= '<tr><td style="text-align: center;">' . $k . '</td>'
- . '<td>';
+ . '<td>';
if (!empty($v['class'])) {
$html .= $v['class'] . $v['type'];
}
foreach ($v['args'] as $arg) {
if (is_null($arg)) $args[] = 'null';
elseif (is_array($arg)) $args[] = 'Array';
- elseif (is_object($arg)) $args[] = 'Object(' . get_class($arg) . ')';
+ elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')';
elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false';
elseif (is_int($arg) || is_double($arg)) $args[] = $arg;
else {
}
}
}
- $html .= '(' . implode(', ', $args) . ')'
- . '</td>'
- . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown')
- . ':' . (isset($v['line']) ? $v['line'] : 'unknown')
- . '</td></tr>' . "\n";
+ $html .= '(' . implode(', ',$args) . ')'
+ . '</td>'
+ . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown')
+ . ':' . (isset($v['line']) ? $v['line'] : 'unknown')
+ . '</td></tr>' . "\n";
}
- $html .= '<tr><td style="text-align: center;">' . ($k + 1) . '</td>'
- . '<td>{main}</td>'
- . '<td> </td></tr>' . "\n"
- . '</table>';
+ $html .= '<tr><td style="text-align: center;">' . ($k+1) . '</td>'
+ . '<td>{main}</td>'
+ . '<td> </td></tr>' . "\n"
+ . '</table>';
return $html;
}
- /**
- * Function must be public to call on caused exceptions
- * @param array
- */
- public function getCauseMessage(&$causes)
- {
- $trace = $this->getTraceSafe();
- $cause = array('class' => get_class($this),
- 'message' => $this->message,
- 'file' => 'unknown',
- 'line' => 'unknown');
- if (isset($trace[0])) {
- if (isset($trace[0]['file'])) {
- $cause['file'] = $trace[0]['file'];
- $cause['line'] = $trace[0]['line'];
- }
- }
- $causes[] = $cause;
- if ($this->cause instanceof PEAR_Exception) {
- $this->cause->getCauseMessage($causes);
- } elseif ($this->cause instanceof Exception) {
- $causes[] = array('class' => get_class($this->cause),
- 'message' => $this->cause->getMessage(),
- 'file' => $this->cause->getFile(),
- 'line' => $this->cause->getLine());
- } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) {
- $causes[] = array('class' => get_class($this->cause),
- 'message' => $this->cause->getMessage(),
- 'file' => 'unknown',
- 'line' => 'unknown');
- } elseif (is_array($this->cause)) {
- foreach ($this->cause as $cause) {
- if ($cause instanceof PEAR_Exception) {
- $cause->getCauseMessage($causes);
- } elseif ($cause instanceof Exception) {
- $causes[] = array('class' => get_class($cause),
- 'message' => $cause->getMessage(),
- 'file' => $cause->getFile(),
- 'line' => $cause->getLine());
- } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) {
- $causes[] = array('class' => get_class($cause),
- 'message' => $cause->getMessage(),
- 'file' => 'unknown',
- 'line' => 'unknown');
- } elseif (is_array($cause) && isset($cause['message'])) {
- // PEAR_ErrorStack warning
- $causes[] = array(
- 'class' => $cause['package'],
- 'message' => $cause['message'],
- 'file' => isset($cause['context']['file']) ?
- $cause['context']['file'] :
- 'unknown',
- 'line' => isset($cause['context']['line']) ?
- $cause['context']['line'] :
- 'unknown',
- );
- }
- }
- }
- }
-
- public function getTraceSafe()
- {
- if (!isset($this->_trace)) {
- $this->_trace = $this->getTrace();
- if (empty($this->_trace)) {
- $backtrace = debug_backtrace();
- $this->_trace = array($backtrace[count($backtrace) - 1]);
- }
- }
- return $this->_trace;
- }
-
public function toText()
{
$causes = array();
$causeMsg = '';
foreach ($causes as $i => $cause) {
$causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': '
- . $cause['message'] . ' in ' . $cause['file']
- . ' on line ' . $cause['line'] . "\n";
+ . $cause['message'] . ' in ' . $cause['file']
+ . ' on line ' . $cause['line'] . "\n";
}
return $causeMsg . $this->getTraceAsString();
}
--- /dev/null
+Copyright (c) 1997-2009,
+ Stig Bakken <ssb@php.net>,
+ Gregory Beaver <cellog@php.net>,
+ Helgi Þormar Þorbjörnsson <helgi@php.net>,
+ Tomas V.V.Cox <cox@idecnet.com>,
+ Martin Jansen <mj@php.net>.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
$GLOBALS['_System_temp_files'] = array();
/**
- * System offers cross platform compatible system functions
- *
- * Static functions for different operations. Should work under
- * Unix and Windows. The names and usage has been taken from its respectively
- * GNU commands. The functions will return (bool) false on error and will
- * trigger the error with the PHP trigger_error() function (you can silence
- * the error by prefixing a '@' sign after the function call, but this
- * is not recommended practice. Instead use an error handler with
- * {@link set_error_handler()}).
- *
- * Documentation on this class you can find in:
- * http://pear.php.net/manual/
- *
- * Example usage:
- * if (!@System::rm('-r file1 dir1')) {
- * print "could not delete file1 or dir1";
- * }
- *
- * In case you need to to pass file names with spaces,
- * pass the params as an array:
- *
- * System::rm(array('-r', $file1, $dir1));
- *
- * @category pear
- * @package System
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- * @static
- */
+* System offers cross platform compatible system functions
+*
+* Static functions for different operations. Should work under
+* Unix and Windows. The names and usage has been taken from its respectively
+* GNU commands. The functions will return (bool) false on error and will
+* trigger the error with the PHP trigger_error() function (you can silence
+* the error by prefixing a '@' sign after the function call, but this
+* is not recommended practice. Instead use an error handler with
+* {@link set_error_handler()}).
+*
+* Documentation on this class you can find in:
+* http://pear.php.net/manual/
+*
+* Example usage:
+* if (!@System::rm('-r file1 dir1')) {
+* print "could not delete file1 or dir1";
+* }
+*
+* In case you need to to pass file names with spaces,
+* pass the params as an array:
+*
+* System::rm(array('-r', $file1, $dir1));
+*
+* @category pear
+* @package System
+* @author Tomas V.V. Cox <cox@idecnet.com>
+* @copyright 1997-2006 The PHP Group
+* @license http://opensource.org/licenses/bsd-license.php New BSD License
+* @version Release: @package_version@
+* @link http://pear.php.net/package/PEAR
+* @since Class available since Release 0.1
+* @static
+*/
class System
{
+ /**
+ * returns the commandline arguments of a function
+ *
+ * @param string $argv the commandline
+ * @param string $short_options the allowed option short-tags
+ * @param string $long_options the allowed option long-tags
+ * @return array the given options and there values
+ */
+ public static function _parseArgs($argv, $short_options, $long_options = null)
+ {
+ if (!is_array($argv) && $argv !== null) {
+ /*
+ // Quote all items that are a short option
+ $av = preg_split('/(\A| )--?[a-z0-9]+[ =]?((?<!\\\\)((,\s*)|((?<!,)\s+))?)/i', $argv, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);
+ $offset = 0;
+ foreach ($av as $a) {
+ $b = trim($a[0]);
+ if ($b{0} == '"' || $b{0} == "'") {
+ continue;
+ }
+
+ $escape = escapeshellarg($b);
+ $pos = $a[1] + $offset;
+ $argv = substr_replace($argv, $escape, $pos, strlen($b));
+ $offset += 2;
+ }
+ */
+
+ // Find all items, quoted or otherwise
+ preg_match_all("/(?:[\"'])(.*?)(?:['\"])|([^\s]+)/", $argv, $av);
+ $argv = $av[1];
+ foreach ($av[2] as $k => $a) {
+ if (empty($a)) {
+ continue;
+ }
+ $argv[$k] = trim($a) ;
+ }
+ }
+
+ return Console_Getopt::getopt2($argv, $short_options, $long_options);
+ }
+
+ /**
+ * Output errors with PHP trigger_error(). You can silence the errors
+ * with prefixing a "@" sign to the function call: @System::mkdir(..);
+ *
+ * @param mixed $error a PEAR error or a string with the error message
+ * @return bool false
+ */
+ protected static function raiseError($error)
+ {
+ if (PEAR::isError($error)) {
+ $error = $error->getMessage();
+ }
+ trigger_error($error, E_USER_WARNING);
+ return false;
+ }
+
+ /**
+ * Creates a nested array representing the structure of a directory
+ *
+ * System::_dirToStruct('dir1', 0) =>
+ * Array
+ * (
+ * [dirs] => Array
+ * (
+ * [0] => dir1
+ * )
+ *
+ * [files] => Array
+ * (
+ * [0] => dir1/file2
+ * [1] => dir1/file3
+ * )
+ * )
+ * @param string $sPath Name of the directory
+ * @param integer $maxinst max. deep of the lookup
+ * @param integer $aktinst starting deep of the lookup
+ * @param bool $silent if true, do not emit errors.
+ * @return array the structure of the dir
+ */
+ protected static function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
+ {
+ $struct = array('dirs' => array(), 'files' => array());
+ if (($dir = @opendir($sPath)) === false) {
+ if (!$silent) {
+ System::raiseError("Could not open dir $sPath");
+ }
+ return $struct; // XXX could not open error
+ }
+
+ $struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ?
+ $list = array();
+ while (false !== ($file = readdir($dir))) {
+ if ($file != '.' && $file != '..') {
+ $list[] = $file;
+ }
+ }
+
+ closedir($dir);
+ natsort($list);
+ if ($aktinst < $maxinst || $maxinst == 0) {
+ foreach ($list as $val) {
+ $path = $sPath . DIRECTORY_SEPARATOR . $val;
+ if (is_dir($path) && !is_link($path)) {
+ $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1, $silent);
+ $struct = array_merge_recursive($struct, $tmp);
+ } else {
+ $struct['files'][] = $path;
+ }
+ }
+ }
+
+ return $struct;
+ }
+
+ /**
+ * Creates a nested array representing the structure of a directory and files
+ *
+ * @param array $files Array listing files and dirs
+ * @return array
+ * @static
+ * @see System::_dirToStruct()
+ */
+ protected static function _multipleToStruct($files)
+ {
+ $struct = array('dirs' => array(), 'files' => array());
+ settype($files, 'array');
+ foreach ($files as $file) {
+ if (is_dir($file) && !is_link($file)) {
+ $tmp = System::_dirToStruct($file, 0);
+ $struct = array_merge_recursive($tmp, $struct);
+ } else {
+ if (!in_array($file, $struct['files'])) {
+ $struct['files'][] = $file;
+ }
+ }
+ }
+ return $struct;
+ }
+
+ /**
+ * The rm command for removing files.
+ * Supports multiple files and dirs and also recursive deletes
+ *
+ * @param string $args the arguments for rm
+ * @return mixed PEAR_Error or true for success
+ * @static
+ * @access public
+ */
+ public static function rm($args)
+ {
+ $opts = System::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-)
+ if (PEAR::isError($opts)) {
+ return System::raiseError($opts);
+ }
+ foreach ($opts[0] as $opt) {
+ if ($opt[0] == 'r') {
+ $do_recursive = true;
+ }
+ }
+ $ret = true;
+ if (isset($do_recursive)) {
+ $struct = System::_multipleToStruct($opts[1]);
+ foreach ($struct['files'] as $file) {
+ if (!@unlink($file)) {
+ $ret = false;
+ }
+ }
+
+ rsort($struct['dirs']);
+ foreach ($struct['dirs'] as $dir) {
+ if (!@rmdir($dir)) {
+ $ret = false;
+ }
+ }
+ } else {
+ foreach ($opts[1] as $file) {
+ $delete = (is_dir($file)) ? 'rmdir' : 'unlink';
+ if (!@$delete($file)) {
+ $ret = false;
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Make directories.
+ *
+ * The -p option will create parent directories
+ * @param string $args the name of the director(y|ies) to create
+ * @return bool True for success
+ */
+ public static function mkDir($args)
+ {
+ $opts = System::_parseArgs($args, 'pm:');
+ if (PEAR::isError($opts)) {
+ return System::raiseError($opts);
+ }
+
+ $mode = 0777; // default mode
+ foreach ($opts[0] as $opt) {
+ if ($opt[0] == 'p') {
+ $create_parents = true;
+ } elseif ($opt[0] == 'm') {
+ // if the mode is clearly an octal number (starts with 0)
+ // convert it to decimal
+ if (strlen($opt[1]) && $opt[1]{0} == '0') {
+ $opt[1] = octdec($opt[1]);
+ } else {
+ // convert to int
+ $opt[1] += 0;
+ }
+ $mode = $opt[1];
+ }
+ }
+
+ $ret = true;
+ if (isset($create_parents)) {
+ foreach ($opts[1] as $dir) {
+ $dirstack = array();
+ while ((!file_exists($dir) || !is_dir($dir)) &&
+ $dir != DIRECTORY_SEPARATOR) {
+ array_unshift($dirstack, $dir);
+ $dir = dirname($dir);
+ }
+
+ while ($newdir = array_shift($dirstack)) {
+ if (!is_writeable(dirname($newdir))) {
+ $ret = false;
+ break;
+ }
+
+ if (!mkdir($newdir, $mode)) {
+ $ret = false;
+ }
+ }
+ }
+ } else {
+ foreach($opts[1] as $dir) {
+ if ((@file_exists($dir) || !is_dir($dir)) && !mkdir($dir, $mode)) {
+ $ret = false;
+ }
+ }
+ }
+
+ return $ret;
+ }
+
/**
* Concatenate files
*
*
* Note: as the class use fopen, urls should work also
*
- * @param string $args the arguments
+ * @param string $args the arguments
* @return boolean true on success
*/
public static function &cat($args)
for ($i = 0; $i < $count_args; $i++) {
if ($args[$i] == '>') {
$mode = 'wb';
- $outputfile = $args[$i + 1];
+ $outputfile = $args[$i+1];
break;
} elseif ($args[$i] == '>>') {
$mode = 'ab+';
- $outputfile = $args[$i + 1];
+ $outputfile = $args[$i+1];
break;
} else {
$files[] = $args[$i];
return $ret;
}
- /**
- * Output errors with PHP trigger_error(). You can silence the errors
- * with prefixing a "@" sign to the function call: @System::mkdir(..);
- *
- * @param mixed $error a PEAR error or a string with the error message
- * @return bool false
- */
- protected static function raiseError($error)
- {
- if (PEAR::isError($error)) {
- $error = $error->getMessage();
- }
- trigger_error($error, E_USER_WARNING);
- return false;
- }
-
/**
* Creates temporary files or directories. This function will remove
* the created files when the scripts finish its execution.
* TMPDIR in Unix will be used. If these vars are also missing
* c:\windows\temp or /tmp will be used.
*
- * @param string $args The arguments
+ * @param string $args The arguments
* @return mixed the full path of the created (file|dir) or false
* @see System::tmpdir()
*/
$tmpdir = System::tmpdir();
}
- if (!System::mkDir(['-p', $tmpdir])) {
+ if (!System::mkDir(array('-p', $tmpdir))) {
return false;
}
}
$GLOBALS['_System_temp_files'][] = $tmp;
- /*if (isset($tmp_is_dir)) {
+ if (isset($tmp_is_dir)) {
//$GLOBALS['_System_temp_files'][] = dirname($tmp);
- }*/
+ }
if ($first_time) {
PEAR::registerShutdownFunc(array('System', '_removeTmpFiles'));
}
/**
- * returns the commandline arguments of a function
- *
- * @param string $argv the commandline
- * @param string $short_options the allowed option short-tags
- * @param string $long_options the allowed option long-tags
- * @return array the given options and there values
+ * Remove temporary files created my mkTemp. This function is executed
+ * at script shutdown time
*/
- public static function _parseArgs($argv, $short_options, $long_options = null)
+ public static function _removeTmpFiles()
{
- if (!is_array($argv) && $argv !== null) {
- /*
- // Quote all items that are a short option
- $av = preg_split('/(\A| )--?[a-z0-9]+[ =]?((?<!\\\\)((,\s*)|((?<!,)\s+))?)/i', $argv, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);
- $offset = 0;
- foreach ($av as $a) {
- $b = trim($a[0]);
- if ($b{0} == '"' || $b{0} == "'") {
- continue;
- }
-
- $escape = escapeshellarg($b);
- $pos = $a[1] + $offset;
- $argv = substr_replace($argv, $escape, $pos, strlen($b));
- $offset += 2;
- }
- */
-
- // Find all items, quoted or otherwise
- preg_match_all("/(?:[\"'])(.*?)(?:['\"])|([^\s]+)/", $argv, $av);
- $argv = $av[1];
- foreach ($av[2] as $k => $a) {
- if (empty($a)) {
- continue;
- }
- $argv[$k] = trim($a);
- }
+ if (count($GLOBALS['_System_temp_files'])) {
+ $delete = $GLOBALS['_System_temp_files'];
+ array_unshift($delete, '-r');
+ System::rm($delete);
+ $GLOBALS['_System_temp_files'] = array();
}
-
- return (new Console_Getopt)->getopt2($argv, $short_options, $long_options);
}
/**
return realpath('/tmp');
}
- /**
- * Make directories.
- *
- * The -p option will create parent directories
- * @param string $args the name of the director(y|ies) to create
- * @return bool True for success
- */
- public static function mkDir($args)
- {
- $opts = System::_parseArgs($args, 'pm:');
- if (PEAR::isError($opts)) {
- return System::raiseError($opts);
- }
-
- $mode = 0777; // default mode
- foreach ($opts[0] as $opt) {
- if ($opt[0] == 'p') {
- $create_parents = true;
- } elseif ($opt[0] == 'm') {
- // if the mode is clearly an octal number (starts with 0)
- // convert it to decimal
- if (strlen($opt[1]) && $opt[1]{0} == '0') {
- $opt[1] = octdec($opt[1]);
- } else {
- // convert to int
- $opt[1] += 0;
- }
- $mode = $opt[1];
- }
- }
-
- $ret = true;
- if (isset($create_parents)) {
- foreach ($opts[1] as $dir) {
- $dirstack = array();
- while ((!file_exists($dir) || !is_dir($dir)) &&
- $dir != DIRECTORY_SEPARATOR) {
- array_unshift($dirstack, $dir);
- $dir = dirname($dir);
- }
-
- while ($newdir = array_shift($dirstack)) {
- if (!is_writeable(dirname($newdir))) {
- $ret = false;
- break;
- }
-
- if (!mkdir($newdir, $mode)) {
- $ret = false;
- }
- }
- }
- } else {
- foreach ($opts[1] as $dir) {
- if ((@file_exists($dir) || !is_dir($dir)) && !mkdir($dir, $mode)) {
- $ret = false;
- }
- }
- }
-
- return $ret;
- }
-
- /**
- * Remove temporary files created my mkTemp. This function is executed
- * at script shutdown time
- */
- public static function _removeTmpFiles()
- {
- if (count($GLOBALS['_System_temp_files'])) {
- $delete = $GLOBALS['_System_temp_files'];
- array_unshift($delete, '-r');
- System::rm($delete);
- $GLOBALS['_System_temp_files'] = array();
- }
- }
-
- /**
- * The rm command for removing files.
- * Supports multiple files and dirs and also recursive deletes
- *
- * @param string $args the arguments for rm
- * @return mixed PEAR_Error or true for success
- * @static
- * @access public
- */
- public static function rm($args)
- {
- $opts = System::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-)
- if (PEAR::isError($opts)) {
- return System::raiseError($opts);
- }
- foreach ($opts[0] as $opt) {
- if ($opt[0] == 'r') {
- $do_recursive = true;
- }
- }
- $ret = true;
- if (isset($do_recursive)) {
- $struct = System::_multipleToStruct($opts[1]);
- foreach ($struct['files'] as $file) {
- if (!@unlink($file)) {
- $ret = false;
- }
- }
-
- rsort($struct['dirs']);
- foreach ($struct['dirs'] as $dir) {
- if (!@rmdir($dir)) {
- $ret = false;
- }
- }
- } else {
- foreach ($opts[1] as $file) {
- $delete = (is_dir($file)) ? 'rmdir' : 'unlink';
- if (!@$delete($file)) {
- $ret = false;
- }
- }
- }
- return $ret;
- }
-
- /**
- * Creates a nested array representing the structure of a directory and files
- *
- * @param array $files Array listing files and dirs
- * @return array
- * @static
- * @see System::_dirToStruct()
- */
- protected static function _multipleToStruct($files)
- {
- $struct = array('dirs' => array(), 'files' => array());
- settype($files, 'array');
- foreach ($files as $file) {
- if (is_dir($file) && !is_link($file)) {
- $tmp = System::_dirToStruct($file, 0);
- $struct = array_merge_recursive($tmp, $struct);
- } else {
- if (!in_array($file, $struct['files'])) {
- $struct['files'][] = $file;
- }
- }
- }
- return $struct;
- }
-
- /**
- * Creates a nested array representing the structure of a directory
- *
- * System::_dirToStruct('dir1', 0) =>
- * Array
- * (
- * [dirs] => Array
- * (
- * [0] => dir1
- * )
- *
- * [files] => Array
- * (
- * [0] => dir1/file2
- * [1] => dir1/file3
- * )
- * )
- * @param string $sPath Name of the directory
- * @param integer $maxinst max. deep of the lookup
- * @param integer $aktinst starting deep of the lookup
- * @param bool $silent if true, do not emit errors.
- * @return array the structure of the dir
- */
- protected static function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
- {
- $struct = array('dirs' => array(), 'files' => array());
- if (($dir = @opendir($sPath)) === false) {
- if (!$silent) {
- System::raiseError("Could not open dir $sPath");
- }
- return $struct; // XXX could not open error
- }
-
- $struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ?
- $list = array();
- while (false !== ($file = readdir($dir))) {
- if ($file != '.' && $file != '..') {
- $list[] = $file;
- }
- }
-
- closedir($dir);
- natsort($list);
- if ($aktinst < $maxinst || $maxinst == 0) {
- foreach ($list as $val) {
- $path = $sPath . DIRECTORY_SEPARATOR . $val;
- if (is_dir($path) && !is_link($path)) {
- $tmp = System::_dirToStruct($path, $maxinst, $aktinst + 1, $silent);
- $struct = array_merge_recursive($struct, $tmp);
- } else {
- $struct['files'][] = $path;
- }
- }
- }
-
- return $struct;
- }
-
/**
* The "which" command (show the full path of a command)
*
* @param string $program The command to search for
- * @param mixed $fallback Value to return if $program is not found
+ * @param mixed $fallback Value to return if $program is not found
*
* @return mixed A string with the full path or false if not found
* @author Stig Bakken <ssb@php.net>
if (OS_WINDOWS) {
$exe_suffixes = getenv('PATHEXT')
- ? explode(PATH_SEPARATOR, getenv('PATHEXT'))
- : array('.exe', '.bat', '.cmd', '.com');
+ ? explode(PATH_SEPARATOR, getenv('PATHEXT'))
+ : array('.exe','.bat','.cmd','.com');
// allow passing a command.exe param
if (strpos($program, '.') !== false) {
array_unshift($exe_suffixes, '');
* -maxdepth <n> -> max depth of recursion
* -name <pattern> -> search pattern (bash style). Multiple -name param allowed
*
- * @param mixed Either array or string with the command line
+ * @param mixed Either array or string with the command line
* @return array Array of found files
*/
public static function find($args)
for ($i = 0; $i < $args_count; $i++) {
switch ($args[$i]) {
case '-type':
- if (in_array($args[$i + 1], array('d', 'f'))) {
- if ($args[$i + 1] == 'd') {
+ if (in_array($args[$i+1], array('d', 'f'))) {
+ if ($args[$i+1] == 'd') {
$do_files = false;
} else {
$do_dirs = false;
$i++;
break;
case '-name':
- $name = preg_quote($args[$i + 1], '#');
+ $name = preg_quote($args[$i+1], '#');
// our magic characters ? and * have just been escaped,
// so now we change the escaped versions to PCRE operators
$name = strtr($name, array('\?' => '.', '\*' => '.*'));
- $patterns[] = '(' . $name . ')';
+ $patterns[] = '('.$name.')';
$i++;
break;
case '-maxdepth':
- $depth = $args[$i + 1];
+ $depth = $args[$i+1];
break;
}
}
}
if (count($patterns)) {
$dsq = preg_quote(DIRECTORY_SEPARATOR, '#');
- $pattern = '#(^|' . $dsq . ')' . implode('|', $patterns) . '($|' . $dsq . ')#';
+ $pattern = '#(^|'.$dsq.')'.implode('|', $patterns).'($|'.$dsq.')#';
$ret = array();
$files_count = count($files);
for ($i = 0; $i < $files_count; $i++) {
return false;
}
- /**
- * Validate date and times. Note that this method need the Date_Calc class
- *
- * @param string $date Date to validate
- * @param array $options array options where :
- * 'format' The format of the date (%d-%m-%Y)
- * or rfc822_compliant
- * 'min' The date has to be greater
- * than this [$day, $month, $year]
- * or PEAR::Date object
- * 'max' The date has to be smaller than
- * this [$day, $month, $year]
- * or PEAR::Date object
- *
- * @return bool true if valid date/time, false if not
- *
- * @access public
- */
- public function date(string $date, array $options): bool
- {
- $max = false;
- $min = false;
- $format = '';
-
- extract($options);
-
- if (strtolower($format) == 'rfc822_compliant') {
- $preg = '&^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),) \s+
- (?:(\d{2})?) \s+
- (?:(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)?) \s+
- (?:(\d{2}(\d{2})?)?) \s+
- (?:(\d{2}?)):(?:(\d{2}?))(:(?:(\d{2}?)))? \s+
- (?:[+-]\d{4}|UT|GMT|EST|EDT|CST|CDT|MST|MDT|PST|PDT|[A-IK-Za-ik-z])$&xi';
-
- if (!preg_match($preg, $date, $matches)) {
- return false;
- }
-
- $year = (int)$matches[4];
- $months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
- $month = array_keys($months, $matches[3]);
- $month = (int)$month[0] + 1;
- $day = (int)$matches[2];
- $weekday = $matches[1];
- $hour = (int)$matches[6];
- $minute = (int)$matches[7];
- isset($matches[9]) ? $second = (int)$matches[9] : $second = 0;
-
- if ((strlen($year) != 4) ||
- ($day > 31 || $day < 1) ||
- ($hour > 23) ||
- ($minute > 59) ||
- ($second > 59)) {
- return false;
- }
- } else {
- $date_len = strlen($format);
- for ($i = 0; $i < $date_len; $i++) {
- $c = $format{$i};
- if ($c == '%') {
- $next = $format{$i + 1};
- switch ($next) {
- case 'j':
- case 'd':
- if ($next == 'j') {
- $day = (int)Validate::_substr($date, 1, 2);
- } else {
- $day = (int)Validate::_substr($date, 0, 2);
- }
- if ($day < 1 || $day > 31) {
- return false;
- }
- break;
- case 'm':
- case 'n':
- if ($next == 'm') {
- $month = (int)Validate::_substr($date, 0, 2);
- } else {
- $month = (int)Validate::_substr($date, 1, 2);
- }
- if ($month < 1 || $month > 12) {
- return false;
- }
- break;
- case 'Y':
- case 'y':
- if ($next == 'Y') {
- $year = Validate::_substr($date, 4);
- $year = (int)$year ? $year : '';
- } else {
- $year = (int)(substr(date('Y'), 0, 2) .
- Validate::_substr($date, 2));
- }
- if (strlen($year) != 4 || $year < 0 || $year > 9999) {
- return false;
- }
- break;
- case 'g':
- case 'h':
- if ($next == 'g') {
- $hour = Validate::_substr($date, 1, 2);
- } else {
- $hour = Validate::_substr($date, 2);
- }
- if (!preg_match('/^\d+$/', $hour) || $hour < 0 || $hour > 12) {
- return false;
- }
- break;
- case 'G':
- case 'H':
- if ($next == 'G') {
- $hour = Validate::_substr($date, 1, 2);
- } else {
- $hour = Validate::_substr($date, 2);
- }
- if (!preg_match('/^\d+$/', $hour) || $hour < 0 || $hour > 24) {
- return false;
- }
- break;
- case 's':
- case 'i':
- $t = Validate::_substr($date, 2);
- if (!preg_match('/^\d+$/', $t) || $t < 0 || $t > 59) {
- return false;
- }
- break;
- default:
- trigger_error("Not supported char `$next' after % in offset " . ($i + 2), E_USER_WARNING);
- }
- $i++;
- } else {
- //literal
- if (Validate::_substr($date, 1) != $c) {
- return false;
- }
- }
- }
- }
- // there is remaing data, we don't want it
- if (strlen($date) && (strtolower($format) != 'rfc822_compliant')) {
- return false;
- }
-
- if (isset($day) && isset($month) && isset($year) && isset($weekday)) {
- if (!checkdate($month, $day, $year)) {
- return false;
- }
-
- if (strtolower($format) == 'rfc822_compliant') {
- if ($weekday != date("D", mktime(0, 0, 0, $month, $day, $year))) {
- return false;
- }
- }
-
- if ($min) {
- include_once 'Date/Calc.php';
- if (is_a($min, 'Date') &&
- (Date_Calc::compareDates(
- $day,
- $month,
- $year,
- $min->getDay(),
- $min->getMonth(),
- $min->getYear()
- ) < 0)
- ) {
- return false;
- } elseif (is_array($min) &&
- (Date_Calc::compareDates(
- $day,
- $month,
- $year,
- $min[0],
- $min[1],
- $min[2]
- ) < 0)
- ) {
- return false;
- }
- }
-
- if ($max) {
- include_once 'Date/Calc.php';
- if (is_a($max, 'Date') &&
- (Date_Calc::compareDates(
- $day,
- $month,
- $year,
- $max->getDay(),
- $max->getMonth(),
- $max->getYear()
- ) > 0)
- ) {
- return false;
- } elseif (is_array($max) &&
- (Date_Calc::compareDates(
- $day,
- $month,
- $year,
- $max[0],
- $max[1],
- $max[2]
- ) > 0)
- ) {
- return false;
- }
- }
- }
-
- return true;
- }
-
/**
* Substr
*
--- /dev/null
+Redistribution and use in source and binary forms, with or without modification
+, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, th
+ is list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/
+ or other materials provided with the distribution.
+
+3. The name of the author may not be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WA
+RRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABIL
+ITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR C
+ONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOW
+EVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILI
+TY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U
+SE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
+define('INSTALLDIR', realpath(__DIR__ . '/..'));
$shortoptions = 'i:n:o';
$longoptions = array('id=', 'nickname=', 'owner');
END_OF_USERROLE_HELP;
-require_once INSTALLDIR.'/scripts/commandline.inc';
+require_once INSTALLDIR . '/scripts/commandline.inc';
function interpretCommand($user, $body)
{
mb_internal_encoding('UTF-8');
error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);
-// Add extlib to our path so we can get Console_Getopt
-
-$_extra_path = array(INSTALLDIR.'/extlib/');
-
+// Autoload composer dependencies
+require_once INSTALLDIR . '/vendor/autoload.php';
+// Add extlib to our path
+$_extra_path = [INSTALLDIR.'/extlib/'];
set_include_path(implode(PATH_SEPARATOR, $_extra_path) . PATH_SEPARATOR . get_include_path());
-require_once 'Console/Getopt.php';
-
// Note: $shortoptions and $longoptions should be pre-defined!
$_default_shortoptions = 'qvhc:s:p:';
ENDOFHELP;
-define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
+define('INSTALLDIR', dirname(__DIR__));
set_include_path(INSTALLDIR . DIRECTORY_SEPARATOR . 'extlib' . PATH_SEPARATOR . get_include_path());
$pattern = "*.php *.inc";
$exclude = 'config.php */extlib/* */local/* */plugins/* */scripts/*';
$plugin = false;
-require_once 'Console/Getopt.php';
+require_once INSTALLDIR . '/vendor/autoload.php';
$parser = new Console_Getopt();
$result = $parser->getopt($_SERVER['argv'], $shortoptions, $longoptions);
if (PEAR::isError($result)) {
'CAS_Request_MultiRequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php',
'CAS_Request_RequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/RequestInterface.php',
'CAS_TypeMismatchException' => $vendorDir . '/apereo/phpcas/source/CAS/TypeMismatchException.php',
+ 'Console_Getopt' => $vendorDir . '/pear/console_getopt/Console/Getopt.php',
'HTMLPurifier' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.php',
'HTMLPurifier_Arborize' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php',
'HTMLPurifier_AttrCollections' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php',
return array(
'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'),
+ 'Console' => array($vendorDir . '/pear/console_getopt'),
);
0 => __DIR__ . '/..' . '/ezyang/htmlpurifier/library',
),
),
+ 'C' =>
+ array (
+ 'Console' =>
+ array (
+ 0 => __DIR__ . '/..' . '/pear/console_getopt',
+ ),
+ ),
);
public static $classMap = array (
'CAS_Request_MultiRequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php',
'CAS_Request_RequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/RequestInterface.php',
'CAS_TypeMismatchException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/TypeMismatchException.php',
+ 'Console_Getopt' => __DIR__ . '/..' . '/pear/console_getopt/Console/Getopt.php',
'HTMLPurifier' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.php',
'HTMLPurifier_Arborize' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php',
'HTMLPurifier_AttrCollections' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php',
return array(
$vendorDir . '/openid/php-openid',
+ $vendorDir . '/pear/console_getopt',
);
"random"
]
},
+ {
+ "name": "pear/console_getopt",
+ "version": "v1.4.2",
+ "version_normalized": "1.4.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/pear/Console_Getopt.git",
+ "reference": "6c77aeb625b32bd752e89ee17972d103588b90c0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/6c77aeb625b32bd752e89ee17972d103588b90c0",
+ "reference": "6c77aeb625b32bd752e89ee17972d103588b90c0",
+ "shasum": ""
+ },
+ "time": "2019-02-06T16:52:33+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Console": "./"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ "./"
+ ],
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Greg Beaver",
+ "email": "cellog@php.net",
+ "role": "Helper"
+ },
+ {
+ "name": "Andrei Zmievski",
+ "email": "andrei@php.net",
+ "role": "Lead"
+ },
+ {
+ "name": "Stig Bakken",
+ "email": "stig@php.net",
+ "role": "Developer"
+ }
+ ],
+ "description": "More info available on: http://pear.php.net/package/Console_Getopt"
+ },
{
"name": "phpseclib/phpseclib",
"version": "dev-master",
--- /dev/null
+# composer related
+composer.lock
+composer.phar
+vendor
+README.html
+dist/
--- /dev/null
+language: php
+php:
+ - 7
+ - 5.6
+ - 5.5
+ - 5.4
+sudo: false
+script:
+ - pear run-tests -r tests/
--- /dev/null
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+/**
+ * PHP Version 5
+ *
+ * Copyright (c) 2001-2015, The PEAR developers
+ *
+ * This source file is subject to the BSD-2-Clause license,
+ * that is bundled with this package in the file LICENSE, and is
+ * available through the world-wide-web at the following url:
+ * http://opensource.org/licenses/bsd-license.php.
+ *
+ * @category Console
+ * @package Console_Getopt
+ * @author Andrei Zmievski <andrei@php.net>
+ * @license http://opensource.org/licenses/bsd-license.php BSD-2-Clause
+ * @version CVS: $Id$
+ * @link http://pear.php.net/package/Console_Getopt
+ */
+
+require_once 'PEAR.php';
+
+/**
+ * Command-line options parsing class.
+ *
+ * @category Console
+ * @package Console_Getopt
+ * @author Andrei Zmievski <andrei@php.net>
+ * @license http://opensource.org/licenses/bsd-license.php BSD-2-Clause
+ * @link http://pear.php.net/package/Console_Getopt
+ */
+class Console_Getopt
+{
+
+ /**
+ * Parses the command-line options.
+ *
+ * The first parameter to this function should be the list of command-line
+ * arguments without the leading reference to the running program.
+ *
+ * The second parameter is a string of allowed short options. Each of the
+ * option letters can be followed by a colon ':' to specify that the option
+ * requires an argument, or a double colon '::' to specify that the option
+ * takes an optional argument.
+ *
+ * The third argument is an optional array of allowed long options. The
+ * leading '--' should not be included in the option name. Options that
+ * require an argument should be followed by '=', and options that take an
+ * option argument should be followed by '=='.
+ *
+ * The return value is an array of two elements: the list of parsed
+ * options and the list of non-option command-line arguments. Each entry in
+ * the list of parsed options is a pair of elements - the first one
+ * specifies the option, and the second one specifies the option argument,
+ * if there was one.
+ *
+ * Long and short options can be mixed.
+ *
+ * Most of the semantics of this function are based on GNU getopt_long().
+ *
+ * @param array $args an array of command-line arguments
+ * @param string $short_options specifies the list of allowed short options
+ * @param array $long_options specifies the list of allowed long options
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
+ *
+ * @return array two-element array containing the list of parsed options and
+ * the non-option arguments
+ */
+ public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
+ {
+ return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
+ }
+
+ /**
+ * This function expects $args to start with the script name (POSIX-style).
+ * Preserved for backwards compatibility.
+ *
+ * @param array $args an array of command-line arguments
+ * @param string $short_options specifies the list of allowed short options
+ * @param array $long_options specifies the list of allowed long options
+ *
+ * @see getopt2()
+ * @return array two-element array containing the list of parsed options and
+ * the non-option arguments
+ */
+ public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
+ {
+ return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
+ }
+
+ /**
+ * The actual implementation of the argument parsing code.
+ *
+ * @param int $version Version to use
+ * @param array $args an array of command-line arguments
+ * @param string $short_options specifies the list of allowed short options
+ * @param array $long_options specifies the list of allowed long options
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
+ *
+ * @return array
+ */
+ public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
+ {
+ // in case you pass directly readPHPArgv() as the first arg
+ if (PEAR::isError($args)) {
+ return $args;
+ }
+
+ if (empty($args)) {
+ return array(array(), array());
+ }
+
+ $non_opts = $opts = array();
+
+ settype($args, 'array');
+
+ if ($long_options) {
+ sort($long_options);
+ }
+
+ /*
+ * Preserve backwards compatibility with callers that relied on
+ * erroneous POSIX fix.
+ */
+ if ($version < 2) {
+ if (isset($args[0]{0}) && $args[0]{0} != '-') {
+ array_shift($args);
+ }
+ }
+
+ for ($i = 0; $i < count($args); $i++) {
+ $arg = $args[$i];
+ /* The special element '--' means explicit end of
+ options. Treat the rest of the arguments as non-options
+ and end the loop. */
+ if ($arg == '--') {
+ $non_opts = array_merge($non_opts, array_slice($args, $i + 1));
+ break;
+ }
+
+ if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-' && !$long_options)) {
+ $non_opts = array_merge($non_opts, array_slice($args, $i));
+ break;
+ } elseif (strlen($arg) > 1 && $arg{1} == '-') {
+ $error = Console_Getopt::_parseLongOption(substr($arg, 2),
+ $long_options,
+ $opts,
+ $i,
+ $args,
+ $skip_unknown);
+ if (PEAR::isError($error)) {
+ return $error;
+ }
+ } elseif ($arg == '-') {
+ // - is stdin
+ $non_opts = array_merge($non_opts, array_slice($args, $i));
+ break;
+ } else {
+ $error = Console_Getopt::_parseShortOption(substr($arg, 1),
+ $short_options,
+ $opts,
+ $i,
+ $args,
+ $skip_unknown);
+ if (PEAR::isError($error)) {
+ return $error;
+ }
+ }
+ }
+
+ return array($opts, $non_opts);
+ }
+
+ /**
+ * Parse short option
+ *
+ * @param string $arg Argument
+ * @param string[] $short_options Available short options
+ * @param string[][] &$opts
+ * @param int &$argIdx
+ * @param string[] $args
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
+ *
+ * @return void
+ */
+ protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
+ {
+ for ($i = 0; $i < strlen($arg); $i++) {
+ $opt = $arg{$i};
+ $opt_arg = null;
+
+ /* Try to find the short option in the specifier string. */
+ if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':') {
+ if ($skip_unknown === true) {
+ break;
+ }
+
+ $msg = "Console_Getopt: unrecognized option -- $opt";
+ return PEAR::raiseError($msg);
+ }
+
+ if (strlen($spec) > 1 && $spec{1} == ':') {
+ if (strlen($spec) > 2 && $spec{2} == ':') {
+ if ($i + 1 < strlen($arg)) {
+ /* Option takes an optional argument. Use the remainder of
+ the arg string if there is anything left. */
+ $opts[] = array($opt, substr($arg, $i + 1));
+ break;
+ }
+ } else {
+ /* Option requires an argument. Use the remainder of the arg
+ string if there is anything left. */
+ if ($i + 1 < strlen($arg)) {
+ $opts[] = array($opt, substr($arg, $i + 1));
+ break;
+ } else if (isset($args[++$argIdx])) {
+ $opt_arg = $args[$argIdx];
+ /* Else use the next argument. */;
+ if (Console_Getopt::_isShortOpt($opt_arg)
+ || Console_Getopt::_isLongOpt($opt_arg)) {
+ $msg = "option requires an argument --$opt";
+ return PEAR::raiseError("Console_Getopt: " . $msg);
+ }
+ } else {
+ $msg = "option requires an argument --$opt";
+ return PEAR::raiseError("Console_Getopt: " . $msg);
+ }
+ }
+ }
+
+ $opts[] = array($opt, $opt_arg);
+ }
+ }
+
+ /**
+ * Checks if an argument is a short option
+ *
+ * @param string $arg Argument to check
+ *
+ * @return bool
+ */
+ protected static function _isShortOpt($arg)
+ {
+ return strlen($arg) == 2 && $arg[0] == '-'
+ && preg_match('/[a-zA-Z]/', $arg[1]);
+ }
+
+ /**
+ * Checks if an argument is a long option
+ *
+ * @param string $arg Argument to check
+ *
+ * @return bool
+ */
+ protected static function _isLongOpt($arg)
+ {
+ return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' &&
+ preg_match('/[a-zA-Z]+$/', substr($arg, 2));
+ }
+
+ /**
+ * Parse long option
+ *
+ * @param string $arg Argument
+ * @param string[] $long_options Available long options
+ * @param string[][] &$opts
+ * @param int &$argIdx
+ * @param string[] $args
+ *
+ * @return void|PEAR_Error
+ */
+ protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
+ {
+ @list($opt, $opt_arg) = explode('=', $arg, 2);
+
+ $opt_len = strlen($opt);
+
+ for ($i = 0; $i < count($long_options); $i++) {
+ $long_opt = $long_options[$i];
+ $opt_start = substr($long_opt, 0, $opt_len);
+
+ $long_opt_name = str_replace('=', '', $long_opt);
+
+ /* Option doesn't match. Go on to the next one. */
+ if ($long_opt_name != $opt) {
+ continue;
+ }
+
+ $opt_rest = substr($long_opt, $opt_len);
+
+ /* Check that the options uniquely matches one of the allowed
+ options. */
+ if ($i + 1 < count($long_options)) {
+ $next_option_rest = substr($long_options[$i + 1], $opt_len);
+ } else {
+ $next_option_rest = '';
+ }
+
+ if ($opt_rest != '' && $opt{0} != '=' &&
+ $i + 1 < count($long_options) &&
+ $opt == substr($long_options[$i+1], 0, $opt_len) &&
+ $next_option_rest != '' &&
+ $next_option_rest{0} != '=') {
+
+ $msg = "Console_Getopt: option --$opt is ambiguous";
+ return PEAR::raiseError($msg);
+ }
+
+ if (substr($long_opt, -1) == '=') {
+ if (substr($long_opt, -2) != '==') {
+ /* Long option requires an argument.
+ Take the next argument if one wasn't specified. */;
+ if (!strlen($opt_arg)) {
+ if (!isset($args[++$argIdx])) {
+ $msg = "Console_Getopt: option requires an argument --$opt";
+ return PEAR::raiseError($msg);
+ }
+ $opt_arg = $args[$argIdx];
+ }
+
+ if (Console_Getopt::_isShortOpt($opt_arg)
+ || Console_Getopt::_isLongOpt($opt_arg)) {
+ $msg = "Console_Getopt: option requires an argument --$opt";
+ return PEAR::raiseError($msg);
+ }
+ }
+ } else if ($opt_arg) {
+ $msg = "Console_Getopt: option --$opt doesn't allow an argument";
+ return PEAR::raiseError($msg);
+ }
+
+ $opts[] = array('--' . $opt, $opt_arg);
+ return;
+ }
+
+ if ($skip_unknown === true) {
+ return;
+ }
+
+ return PEAR::raiseError("Console_Getopt: unrecognized option --$opt");
+ }
+
+ /**
+ * Safely read the $argv PHP array across different PHP configurations.
+ * Will take care on register_globals and register_argc_argv ini directives
+ *
+ * @return mixed the $argv PHP array or PEAR error if not registered
+ */
+ public static function readPHPArgv()
+ {
+ global $argv;
+ if (!is_array($argv)) {
+ if (!@is_array($_SERVER['argv'])) {
+ if (!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) {
+ $msg = "Could not read cmd args (register_argc_argv=Off?)";
+ return PEAR::raiseError("Console_Getopt: " . $msg);
+ }
+ return $GLOBALS['HTTP_SERVER_VARS']['argv'];
+ }
+ return $_SERVER['argv'];
+ }
+ return $argv;
+ }
+
+}
--- /dev/null
+Copyright (c) 2001-2015, The PEAR developers
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+*******************************************
+Console_Getopt - Command-line option parser
+*******************************************
+
+This is a PHP implementation of "getopt" supporting both short and long options.
+It helps parsing command line options in your PHP script.
+
+Homepage: http://pear.php.net/package/Console_Getopt
+
+.. image:: https://travis-ci.org/pear/Console_Getopt.svg?branch=master
+ :target: https://travis-ci.org/pear/Console_Getopt
+
+
+Alternatives
+============
+
+* Console_CommandLine__ (recommended)
+* Console_GetoptPlus__
+
+__ http://pear.php.net/package/Console_CommandLine
+__ http://pear.php.net/package/Console_GetoptPlus
+
+
+License
+=======
+BSD-2-Clause
--- /dev/null
+{
+ "authors": [
+ {
+ "email": "andrei@php.net",
+ "name": "Andrei Zmievski",
+ "role": "Lead"
+ },
+ {
+ "email": "stig@php.net",
+ "name": "Stig Bakken",
+ "role": "Developer"
+ },
+ {
+ "email": "cellog@php.net",
+ "name": "Greg Beaver",
+ "role": "Helper"
+ }
+ ],
+ "autoload": {
+ "psr-0": {
+ "Console": "./"
+ }
+ },
+ "description": "More info available on: http://pear.php.net/package/Console_Getopt",
+ "include-path": [
+ "./"
+ ],
+ "license": "BSD-2-Clause",
+ "name": "pear/console_getopt",
+ "support": {
+ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Getopt",
+ "source": "https://github.com/pear/Console_Getopt"
+ },
+ "type": "library"
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<package packagerversion="1.9.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+ <name>Console_Getopt</name>
+ <channel>pear.php.net</channel>
+ <summary>Command-line option parser</summary>
+ <description>This is a PHP implementation of "getopt" supporting both
+short and long options.</description>
+ <lead>
+ <name>Andrei Zmievski</name>
+ <user>andrei</user>
+ <email>andrei@php.net</email>
+ <active>no</active>
+ </lead>
+ <developer>
+ <name>Stig Bakken</name>
+ <user>ssb</user>
+ <email>stig@php.net</email>
+ <active>no</active>
+ </developer>
+ <helper>
+ <name>Greg Beaver</name>
+ <user>cellog</user>
+ <email>cellog@php.net</email>
+ <active>no</active>
+ </helper>
+
+ <date>2019-02-06</date>
+ <version>
+ <release>1.4.2</release>
+ <api>1.4.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://opensource.org/licenses/bsd-license.php">BSD-2-Clause</license>
+
+ <notes>
+* Remove use of each(), which is removed in PHP 8
+ </notes>
+
+ <contents>
+ <dir name="/">
+ <dir name="Console">
+ <file name="Getopt.php" role="php" />
+ </dir>
+ <dir name="tests">
+ <file role="test" name="001-getopt.phpt" />
+ <file role="test" name="bug10557.phpt" />
+ <file role="test" name="bug11068.phpt" />
+ <file role="test" name="bug13140.phpt" />
+ </dir>
+ </dir>
+ </contents>
+
+ <compatible>
+ <name>PEAR</name>
+ <channel>pear.php.net</channel>
+ <min>1.4.0</min>
+ <max>1.999.999</max>
+ </compatible>
+
+ <dependencies>
+ <required>
+ <php>
+ <min>5.4.0</min>
+ </php>
+ <pearinstaller>
+ <min>1.8.0</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+
+ <phprelease />
+
+ <changelog>
+
+ <release>
+ <date>2019-02-06</date>
+ <version>
+ <release>1.4.2</release>
+ <api>1.4.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://opensource.org/licenses/bsd-license.php">BSD-2-Clause</license>
+ <notes>
+ * Remove use of each(), which is removed in PHP 8
+ </notes>
+ </release>
+
+ <release>
+ <date>2015-07-20</date>
+ <version>
+ <release>1.4.1</release>
+ <api>1.4.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://opensource.org/licenses/bsd-license.php">BSD-2-Clause</license>
+ <notes>
+ * Fix unit test on PHP 7 [cweiske]
+ </notes>
+ </release>
+
+ <release>
+ <date>2015-02-22</date>
+ <version>
+ <release>1.4.0</release>
+ <api>1.4.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://opensource.org/licenses/bsd-license.php">BSD-2-Clause</license>
+ <notes>
+ * Change license to BSD-2-Clause
+ * Set minimum PHP version to 5.4.0
+ * Mark static methods with "static" keyword
+ </notes>
+ </release>
+
+ <release>
+ <date>2011-03-07</date>
+ <version>
+ <release>1.3.1</release>
+ <api>1.3.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+ * Change the minimum PEAR installer dep to be lower
+ </notes>
+ </release>
+
+ <release>
+ <date>2010-12-11</date>
+ <time>20:20:13</time>
+ <version>
+ <release>1.3.0</release>
+ <api>1.3.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+ * Implement Request #13140: [PATCH] to skip unknown parameters. [patch by rquadling, improved on by dufuz]
+ </notes>
+ </release>
+
+ <release>
+ <date>2007-06-12</date>
+ <version>
+ <release>1.2.3</release>
+ <api>1.2.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+* fix Bug #11068: No way to read plain "-" option [cardoe]
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.2.2</release>
+ <api>1.2.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2007-02-17</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+* fix Bug #4475: An ambiguous error occurred when specifying similar longoption name.
+* fix Bug #10055: Not failing properly on short options missing required values
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.2.1</release>
+ <api>1.2.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2006-12-08</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+Fixed bugs #4448 (Long parameter values truncated with longoption parameter) and #7444 (Trailing spaces after php closing tag)
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.2</release>
+ <api>1.2</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2003-12-11</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+Fix to preserve BC with 1.0 and allow correct behaviour for new users
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.0</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2002-09-13</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+Stable release
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>0.11</release>
+ <api>0.11</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2002-05-26</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+POSIX getopt compatibility fix: treat first element of args
+ array as command name
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>0.10</release>
+ <api>0.10</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2002-05-12</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+Packaging fix
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>0.9</release>
+ <api>0.9</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2002-05-12</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+Initial release
+ </notes>
+ </release>
+ </changelog>
+</package>
--- /dev/null
+--TEST--
+Console_Getopt
+--FILE--
+<?php
+require_once 'Console/Getopt.php';
+PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s\n\n");
+
+function test($argstr, $optstr) {
+ $argv = preg_split('/[[:space:]]+/', $argstr);
+ if (PEAR::isError($options = Console_Getopt::getopt($argv, $optstr))) {
+ return;
+ }
+ $opts = $options[0];
+ $non_opts = $options[1];
+ $i = 0;
+ print "options: ";
+ foreach ($opts as $o => $d) {
+ if ($i++ > 0) {
+ print ", ";
+ }
+ print $d[0] . '=' . $d[1];
+ }
+ print "\n";
+ print "params: " . implode(", ", $non_opts) . "\n";
+ print "\n";
+}
+
+test("-abc", "abc");
+test("-abc foo", "abc");
+test("-abc foo", "abc:");
+test("-abc foo bar gazonk", "abc");
+test("-abc foo bar gazonk", "abc:");
+test("-a -b -c", "abc");
+test("-a -b -c", "abc:");
+test("-abc", "ab:c");
+test("-abc foo -bar gazonk", "abc");
+?>
+--EXPECT--
+options: a=, b=, c=
+params:
+
+options: a=, b=, c=
+params: foo
+
+options: a=, b=, c=foo
+params:
+
+options: a=, b=, c=
+params: foo, bar, gazonk
+
+options: a=, b=, c=foo
+params: bar, gazonk
+
+options: a=, b=, c=
+params:
+
+Console_Getopt: option requires an argument --c
+
+options: a=, b=c
+params:
+
+options: a=, b=, c=
+params: foo, -bar, gazonk
--- /dev/null
+--TEST--
+Console_Getopt [bug 10557]
+--SKIPIF--
+--FILE--
+<?php
+$_SERVER['argv'] =
+$argv = array('hi', '-fjjohnston@mail.com', '--to', '--mailpack', '--debug');
+require_once 'Console/Getopt.php';
+$ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'f:t:',
+array('from=','to=','mailpack=','direction=','verbose','debug'));
+if(PEAR::isError($ret))
+{
+ echo $ret->getMessage()."\n";
+ echo 'FATAL';
+ exit;
+}
+
+print_r($ret);
+?>
+--EXPECT--
+Console_Getopt: option requires an argument --to
+FATAL
\ No newline at end of file
--- /dev/null
+--TEST--
+Console_Getopt [bug 11068]
+--SKIPIF--
+--FILE--
+<?php
+$_SERVER['argv'] =
+$argv = array('hi', '-fjjohnston@mail.com', '--to', 'hi', '-');
+require_once 'Console/Getopt.php';
+$ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'f:t:',
+array('from=','to=','mailpack=','direction=','verbose','debug'));
+if(PEAR::isError($ret))
+{
+ echo $ret->getMessage()."\n";
+ echo 'FATAL';
+ exit;
+}
+
+print_r($ret);
+?>
+--EXPECT--
+Array
+(
+ [0] => Array
+ (
+ [0] => Array
+ (
+ [0] => f
+ [1] => jjohnston@mail.com
+ )
+
+ [1] => Array
+ (
+ [0] => --to
+ [1] => hi
+ )
+
+ )
+
+ [1] => Array
+ (
+ [0] => -
+ )
+
+)
\ No newline at end of file
--- /dev/null
+--TEST--
+Console_Getopt [bug 13140]
+--SKIPIF--
+--FILE--
+<?php
+$_SERVER['argv'] = $argv =
+ array('--bob', '--foo' , '-bar', '--test', '-rq', 'thisshouldbehere');
+
+require_once 'Console/Getopt.php';
+$cg = new Console_GetOpt();
+
+print_r($cg->getopt2($cg->readPHPArgv(), 't', array('test'), true));
+print_r($cg->getopt2($cg->readPHPArgv(), 'bar', array('foo'), true));
+?>
+--EXPECT--
+Array
+(
+ [0] => Array
+ (
+ [0] => Array
+ (
+ [0] => --test
+ [1] =>
+ )
+
+ )
+
+ [1] => Array
+ (
+ [0] => thisshouldbehere
+ )
+
+)
+Array
+(
+ [0] => Array
+ (
+ [0] => Array
+ (
+ [0] => --foo
+ [1] =>
+ )
+
+ [1] => Array
+ (
+ [0] => b
+ [1] =>
+ )
+
+ [2] => Array
+ (
+ [0] => a
+ [1] =>
+ )
+
+ [3] => Array
+ (
+ [0] => r
+ [1] =>
+ )
+
+ [4] => Array
+ (
+ [0] => r
+ [1] =>
+ )
+
+ )
+
+ [1] => Array
+ (
+ [0] => thisshouldbehere
+ )
+
+)