# Copyright (c) 2005 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: Date.bunit,v 1.5 2010/02/20 21:36:46 nagler Exp $ Type(); DateTime()->set_test_now('1/1/1900 12:0:0', req()); [ class() => [ now => '2415021 79199', from_datetime => [ '2453740 44700' => '2453740 79199', ], from_literal => [ '1/1/1850' => '2396759 79199', '1/2/1800' => '2378498 79199', '1/1/1900' => '2415021 79199', '1/1/2000' => '2451545 79199', '1/1/2100' => '2488070 79199', '12/31/2199' => '2524593 79199', [undef] => [undef], '1/1/1970 x' => DATE(), '12/31/2003' => '2453005 79199', '12-31-2003' => '2453005 79199', '2003-12-31' => '2453005 79199', '2003/12/31' => '2453005 79199', '20031231', => '2453005 79199', '2453005 79199' => '2453005 79199', '1.3.1980' => Date('3/1/1980'), ], to_xml => [ '2453005 79199' => '2003-12-31', ], to_parts => [ class()->local_today => [59, 59, 21, 1, 1, 1900], ], to_string => [ '2378497 9' => '01/01/1800', ], from_sql_column => [ [undef] => [undef], '2453398 79199' => '2453398 79199', '2453398 0' => DIE(), ], to_literal => [ '2453398 79199' => '01/27/2005', [undef] => '', ], english_day_of_week => [ '2453398 79199' => 'Thursday', ], ], ];