Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* test/date/test_date_{parse,strptime}.rb: changed the format of

	  some extra messages.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit cb9beafd115d0d71033d70fe2b847668a40f175b 1 parent 8defbc4
tadf authored
Showing with 458 additions and 454 deletions.
  1. +5 −0 ChangeLog
  2. +370 −371 test/date/test_date_parse.rb
  3. +83 −83 test/date/test_date_strptime.rb
View
5 ChangeLog
@@ -1,3 +1,8 @@
+Sun Nov 11 18:58:55 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * test/date/test_date_{parse,strptime}.rb: changed the format of
+ some extra messages.
+
Sun Nov 11 18:41:34 2012 Tadayoshi Funaba <tadf@dotrb.org>
* ext/date/date_parse.c (date__parse): revised the tight parser
View
741 test/date/test_date_parse.rb
@@ -6,471 +6,470 @@ class TestDateParse < Test::Unit::TestCase
def test__parse
[
# ctime(3), asctime(3)
- [['Sat Aug 28 02:55:50 1999',false],[1999,8,28,2,55,50,nil,nil,6]],
- [['Sat Aug 28 02:55:50 02',false],[2,8,28,2,55,50,nil,nil,6]],
- [['Sat Aug 28 02:55:50 02',true],[2002,8,28,2,55,50,nil,nil,6]],
- [['Sat Aug 28 02:55:50 0002',false],[2,8,28,2,55,50,nil,nil,6]],
- [['Sat Aug 28 02:55:50 0002',true],[2,8,28,2,55,50,nil,nil,6]],
+ [['Sat Aug 28 02:55:50 1999',false],[1999,8,28,2,55,50,nil,nil,6], __LINE__],
+ [['Sat Aug 28 02:55:50 02',false],[2,8,28,2,55,50,nil,nil,6], __LINE__],
+ [['Sat Aug 28 02:55:50 02',true],[2002,8,28,2,55,50,nil,nil,6], __LINE__],
+ [['Sat Aug 28 02:55:50 0002',false],[2,8,28,2,55,50,nil,nil,6], __LINE__],
+ [['Sat Aug 28 02:55:50 0002',true],[2,8,28,2,55,50,nil,nil,6], __LINE__],
# date(1)
- [['Sat Aug 28 02:29:34 JST 1999',false],[1999,8,28,2,29,34,'JST',9*3600,6]],
- [['Sat Aug 28 02:29:34 MET DST 1999',false],[1999,8,28,2,29,34,'MET DST',2*3600,6]],
- [['Sat Aug 28 02:29:34 AMT 1999',false],[1999,8,28,2,29,34,'AMT',nil,6]],
- [['Sat Aug 28 02:29:34 PMT 1999',false],[1999,8,28,2,29,34,'PMT',nil,6]],
- [['Sat Aug 28 02:29:34 PMT -1999',false],[-1999,8,28,2,29,34,'PMT',nil,6]],
-
- [['Sat Aug 28 02:29:34 JST 02',false],[2,8,28,2,29,34,'JST',9*3600,6]],
- [['Sat Aug 28 02:29:34 JST 02',true],[2002,8,28,2,29,34,'JST',9*3600,6]],
- [['Sat Aug 28 02:29:34 JST 0002',false],[2,8,28,2,29,34,'JST',9*3600,6]],
- [['Sat Aug 28 02:29:34 JST 0002',true],[2,8,28,2,29,34,'JST',9*3600,6]],
-
- [['Sat Aug 28 02:29:34 GMT+09 0002',false],[2,8,28,2,29,34,'GMT+09',9*3600,6]],
- [['Sat Aug 28 02:29:34 GMT+0900 0002',false],[2,8,28,2,29,34,'GMT+0900',9*3600,6]],
- [['Sat Aug 28 02:29:34 GMT+09:00 0002',false],[2,8,28,2,29,34,'GMT+09:00',9*3600,6]],
- [['Sat Aug 28 02:29:34 GMT-09 0002',false],[2,8,28,2,29,34,'GMT-09',-9*3600,6]],
- [['Sat Aug 28 02:29:34 GMT-0900 0002',false],[2,8,28,2,29,34,'GMT-0900',-9*3600,6]],
- [['Sat Aug 28 02:29:34 GMT-09:00 0002',false],[2,8,28,2,29,34,'GMT-09:00',-9*3600,6]],
- [['Sat Aug 28 02:29:34 GMT-090102 0002',false],[2,8,28,2,29,34,'GMT-090102',-9*3600-60-2,6]],
- [['Sat Aug 28 02:29:34 GMT-09:01:02 0002',false],[2,8,28,2,29,34,'GMT-09:01:02',-9*3600-60-2,6]],
-
- [['Sat Aug 28 02:29:34 GMT Standard Time 2000',false],[2000,8,28,2,29,34,'GMT Standard Time',0*3600,6]],
- [['Sat Aug 28 02:29:34 Mountain Standard Time 2000',false],[2000,8,28,2,29,34,'Mountain Standard Time',-7*3600,6]],
- [['Sat Aug 28 02:29:34 Mountain Daylight Time 2000',false],[2000,8,28,2,29,34,'Mountain Daylight Time',-6*3600,6]],
- [['Sat Aug 28 02:29:34 Mexico Standard Time 2000',false],[2000,8,28,2,29,34,'Mexico Standard Time',-6*3600,6]],
-# [['Sat Aug 28 02:29:34 Mexico Standard Time 2 2000',false],[2000,8,28,2,29,34,'Mexico Standard Time 2',-7*3600,6]], # cp
- [['Sat Aug 28 02:29:34 E. Australia Standard Time 2000',false],[2000,8,28,2,29,34,'E. Australia Standard Time',10*3600,6]],
+ [['Sat Aug 28 02:29:34 JST 1999',false],[1999,8,28,2,29,34,'JST',9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 MET DST 1999',false],[1999,8,28,2,29,34,'MET DST',2*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 AMT 1999',false],[1999,8,28,2,29,34,'AMT',nil,6], __LINE__],
+ [['Sat Aug 28 02:29:34 PMT 1999',false],[1999,8,28,2,29,34,'PMT',nil,6], __LINE__],
+ [['Sat Aug 28 02:29:34 PMT -1999',false],[-1999,8,28,2,29,34,'PMT',nil,6], __LINE__],
+
+ [['Sat Aug 28 02:29:34 JST 02',false],[2,8,28,2,29,34,'JST',9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 JST 02',true],[2002,8,28,2,29,34,'JST',9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 JST 0002',false],[2,8,28,2,29,34,'JST',9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 JST 0002',true],[2,8,28,2,29,34,'JST',9*3600,6], __LINE__],
+
+ [['Sat Aug 28 02:29:34 GMT+09 0002',false],[2,8,28,2,29,34,'GMT+09',9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT+0900 0002',false],[2,8,28,2,29,34,'GMT+0900',9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT+09:00 0002',false],[2,8,28,2,29,34,'GMT+09:00',9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT-09 0002',false],[2,8,28,2,29,34,'GMT-09',-9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT-0900 0002',false],[2,8,28,2,29,34,'GMT-0900',-9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT-09:00 0002',false],[2,8,28,2,29,34,'GMT-09:00',-9*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT-090102 0002',false],[2,8,28,2,29,34,'GMT-090102',-9*3600-60-2,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT-09:01:02 0002',false],[2,8,28,2,29,34,'GMT-09:01:02',-9*3600-60-2,6], __LINE__],
+
+ [['Sat Aug 28 02:29:34 GMT Standard Time 2000',false],[2000,8,28,2,29,34,'GMT Standard Time',0*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 Mountain Standard Time 2000',false],[2000,8,28,2,29,34,'Mountain Standard Time',-7*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 Mountain Daylight Time 2000',false],[2000,8,28,2,29,34,'Mountain Daylight Time',-6*3600,6], __LINE__],
+ [['Sat Aug 28 02:29:34 Mexico Standard Time 2000',false],[2000,8,28,2,29,34,'Mexico Standard Time',-6*3600,6], __LINE__],
+# [['Sat Aug 28 02:29:34 Mexico Standard Time 2 2000',false],[2000,8,28,2,29,34,'Mexico Standard Time 2',-7*3600,6], __LINE__], # cp
+ [['Sat Aug 28 02:29:34 E. Australia Standard Time 2000',false],[2000,8,28,2,29,34,'E. Australia Standard Time',10*3600,6], __LINE__],
# part of iso 8601
- [['1999-05-23 23:55:21',false],[1999,5,23,23,55,21,nil,nil,nil]],
- [['1999-05-23 23:55:21+0900',false],[1999,5,23,23,55,21,'+0900',9*3600,nil]],
- [['1999-05-23 23:55:21-0900',false],[1999,5,23,23,55,21,'-0900',-9*3600,nil]],
- [['1999-05-23 23:55:21+09:00',false],[1999,5,23,23,55,21,'+09:00',9*3600,nil]],
- [['1999-05-23T23:55:21-09:00',false],[1999,5,23,23,55,21,'-09:00',-9*3600,nil]],
- [['1999-05-23 23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil]],
- [['1999-05-23T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil]],
- [['-1999-05-23T23:55:21Z',false],[-1999,5,23,23,55,21,'Z',0,nil]],
- [['-1999-05-23T23:55:21Z',true],[-1999,5,23,23,55,21,'Z',0,nil]],
- [['19990523T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil]],
-
- [['+011985-04-12',false],[11985,4,12,nil,nil,nil,nil,nil,nil]],
- [['+011985-04-12T10:15:30',false],[11985,4,12,10,15,30,nil,nil,nil]],
- [['-011985-04-12',false],[-11985,4,12,nil,nil,nil,nil,nil,nil]],
- [['-011985-04-12T10:15:30',false],[-11985,4,12,10,15,30,nil,nil,nil]],
-
- [['02-04-12',false],[2,4,12,nil,nil,nil,nil,nil,nil]],
- [['02-04-12',true],[2002,4,12,nil,nil,nil,nil,nil,nil]],
- [['0002-04-12',false],[2,4,12,nil,nil,nil,nil,nil,nil]],
- [['0002-04-12',true],[2,4,12,nil,nil,nil,nil,nil,nil]],
-
- [['19990523',true],[1999,5,23,nil,nil,nil,nil,nil,nil]],
- [['-19990523',true],[-1999,5,23,nil,nil,nil,nil,nil,nil]],
- [['990523',true],[1999,5,23,nil,nil,nil,nil,nil,nil]],
- [['0523',false],[nil,5,23,nil,nil,nil,nil,nil,nil]],
- [['23',false],[nil,nil,23,nil,nil,nil,nil,nil,nil]],
-
- [['19990523 235521',true],[1999,5,23,23,55,21,nil,nil,nil]],
- [['990523 235521',true],[1999,5,23,23,55,21,nil,nil,nil]],
- [['0523 2355',false],[nil,5,23,23,55,nil,nil,nil,nil]],
- [['23 2355',false],[nil,nil,23,23,55,nil,nil,nil,nil]],
-
- [['19990523T235521',true],[1999,5,23,23,55,21,nil,nil,nil]],
- [['990523T235521',true],[1999,5,23,23,55,21,nil,nil,nil]],
- [['19990523T235521.99',true],[1999,5,23,23,55,21,nil,nil,nil]],
- [['990523T235521.99',true],[1999,5,23,23,55,21,nil,nil,nil]],
- [['0523T2355',false],[nil,5,23,23,55,nil,nil,nil,nil]],
-
- [['19990523T235521+0900',true],[1999,5,23,23,55,21,'+0900',9*3600,nil]],
- [['990523T235521-0900',true],[1999,5,23,23,55,21,'-0900',-9*3600,nil]],
- [['19990523T235521.99+0900',true],[1999,5,23,23,55,21,'+0900',9*3600,nil]],
- [['990523T235521.99-0900',true],[1999,5,23,23,55,21,'-0900',-9*3600,nil]],
- [['0523T2355Z',false],[nil,5,23,23,55,nil,'Z',0,nil]],
-
- [['19990523235521.123456+0900',true],[1999,5,23,23,55,21,'+0900',9*3600,nil]],
- [['19990523235521.123456-0900',true],[1999,5,23,23,55,21,'-0900',-9*3600,nil]],
- [['19990523235521,123456+0900',true],[1999,5,23,23,55,21,'+0900',9*3600,nil]],
- [['19990523235521,123456-0900',true],[1999,5,23,23,55,21,'-0900',-9*3600,nil]],
-
- [['990523235521,123456-0900',false],[99,5,23,23,55,21,'-0900',-9*3600,nil]],
- [['0523235521,123456-0900',false],[nil,5,23,23,55,21,'-0900',-9*3600,nil]],
- [['23235521,123456-0900',false],[nil,nil,23,23,55,21,'-0900',-9*3600,nil]],
- [['235521,123456-0900',false],[nil,nil,nil,23,55,21,'-0900',-9*3600,nil]],
- [['5521,123456-0900',false],[nil,nil,nil,nil,55,21,'-0900',-9*3600,nil]],
- [['21,123456-0900',false],[nil,nil,nil,nil,nil,21,'-0900',-9*3600,nil]],
-
- [['3235521,123456-0900',false],[nil,nil,3,23,55,21,'-0900',-9*3600,nil]],
- [['35521,123456-0900',false],[nil,nil,nil,3,55,21,'-0900',-9*3600,nil]],
- [['521,123456-0900',false],[nil,nil,nil,nil,5,21,'-0900',-9*3600,nil]],
+ [['1999-05-23 23:55:21',false],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['1999-05-23 23:55:21+0900',false],[1999,5,23,23,55,21,'+0900',9*3600,nil], __LINE__],
+ [['1999-05-23 23:55:21-0900',false],[1999,5,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['1999-05-23 23:55:21+09:00',false],[1999,5,23,23,55,21,'+09:00',9*3600,nil], __LINE__],
+ [['1999-05-23T23:55:21-09:00',false],[1999,5,23,23,55,21,'-09:00',-9*3600,nil], __LINE__],
+ [['1999-05-23 23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__],
+ [['1999-05-23T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__],
+ [['-1999-05-23T23:55:21Z',false],[-1999,5,23,23,55,21,'Z',0,nil], __LINE__],
+ [['-1999-05-23T23:55:21Z',true],[-1999,5,23,23,55,21,'Z',0,nil], __LINE__],
+ [['19990523T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__],
+
+ [['+011985-04-12',false],[11985,4,12,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['+011985-04-12T10:15:30',false],[11985,4,12,10,15,30,nil,nil,nil], __LINE__],
+ [['-011985-04-12',false],[-11985,4,12,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['-011985-04-12T10:15:30',false],[-11985,4,12,10,15,30,nil,nil,nil], __LINE__],
+
+ [['02-04-12',false],[2,4,12,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['02-04-12',true],[2002,4,12,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['0002-04-12',false],[2,4,12,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['0002-04-12',true],[2,4,12,nil,nil,nil,nil,nil,nil], __LINE__],
+
+ [['19990523',true],[1999,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['-19990523',true],[-1999,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['990523',true],[1999,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['0523',false],[nil,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['23',false],[nil,nil,23,nil,nil,nil,nil,nil,nil], __LINE__],
+
+ [['19990523 235521',true],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['990523 235521',true],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['0523 2355',false],[nil,5,23,23,55,nil,nil,nil,nil], __LINE__],
+ [['23 2355',false],[nil,nil,23,23,55,nil,nil,nil,nil], __LINE__],
+
+ [['19990523T235521',true],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['990523T235521',true],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['19990523T235521.99',true],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['990523T235521.99',true],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['0523T2355',false],[nil,5,23,23,55,nil,nil,nil,nil], __LINE__],
+
+ [['19990523T235521+0900',true],[1999,5,23,23,55,21,'+0900',9*3600,nil], __LINE__],
+ [['990523T235521-0900',true],[1999,5,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['19990523T235521.99+0900',true],[1999,5,23,23,55,21,'+0900',9*3600,nil], __LINE__],
+ [['990523T235521.99-0900',true],[1999,5,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['0523T2355Z',false],[nil,5,23,23,55,nil,'Z',0,nil], __LINE__],
+
+ [['19990523235521.123456+0900',true],[1999,5,23,23,55,21,'+0900',9*3600,nil], __LINE__],
+ [['19990523235521.123456-0900',true],[1999,5,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['19990523235521,123456+0900',true],[1999,5,23,23,55,21,'+0900',9*3600,nil], __LINE__],
+ [['19990523235521,123456-0900',true],[1999,5,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+
+ [['990523235521,123456-0900',false],[99,5,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['0523235521,123456-0900',false],[nil,5,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['23235521,123456-0900',false],[nil,nil,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['235521,123456-0900',false],[nil,nil,nil,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['5521,123456-0900',false],[nil,nil,nil,nil,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['21,123456-0900',false],[nil,nil,nil,nil,nil,21,'-0900',-9*3600,nil], __LINE__],
+
+ [['3235521,123456-0900',false],[nil,nil,3,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['35521,123456-0900',false],[nil,nil,nil,3,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['521,123456-0900',false],[nil,nil,nil,nil,5,21,'-0900',-9*3600,nil], __LINE__],
# reversed iso 8601 (?)
- [['23-05-1999',false],[1999,5,23,nil,nil,nil,nil,nil,nil]],
- [['23-05-1999 23:55:21',false],[1999,5,23,23,55,21,nil,nil,nil]],
- [['23-05--1999 23:55:21',false],[-1999,5,23,23,55,21,nil,nil,nil]],
- [["23-05-'99",false],[99,5,23,nil,nil,nil,nil,nil,nil]],
- [["23-05-'99",true],[1999,5,23,nil,nil,nil,nil,nil,nil]],
+ [['23-05-1999',false],[1999,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['23-05-1999 23:55:21',false],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['23-05--1999 23:55:21',false],[-1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [["23-05-'99",false],[99,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["23-05-'99",true],[1999,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
# broken iso 8601 (?)
-# [['1999-05-23T235521Z',false],[1999,5,23,23,55,21,'Z',0,nil]], # cp
- [['19990523T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil]],
- [['19990523235521.1234-100',true],[1999,5,23,23,55,21,'-100',-1*3600,nil]],
- [['19990523235521.1234-10',true],[1999,5,23,23,55,21,'-10',-10*3600,nil]],
+# [['1999-05-23T235521Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__], # cp
+ [['19990523T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__],
+ [['19990523235521.1234-100',true],[1999,5,23,23,55,21,'-100',-1*3600,nil], __LINE__],
+ [['19990523235521.1234-10',true],[1999,5,23,23,55,21,'-10',-10*3600,nil], __LINE__],
# part of jis x0301
- [['M11.05.23',false],[1878,5,23,nil,nil,nil,nil,nil,nil]],
- [['T11.05.23 23:55:21+0900',false],[1922,5,23,23,55,21,'+0900',9*3600,nil]],
- [['S11.05.23 23:55:21-0900',false],[1936,5,23,23,55,21,'-0900',-9*3600,nil]],
- [['S40.05.23 23:55:21+09:00',false],[1965,5,23,23,55,21,'+09:00',9*3600,nil]],
- [['S40.05.23T23:55:21-09:00',false],[1965,5,23,23,55,21,'-09:00',-9*3600,nil]],
- [['H11.05.23 23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil]],
- [['H11.05.23T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil]],
+ [['M11.05.23',false],[1878,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['T11.05.23 23:55:21+0900',false],[1922,5,23,23,55,21,'+0900',9*3600,nil], __LINE__],
+ [['S11.05.23 23:55:21-0900',false],[1936,5,23,23,55,21,'-0900',-9*3600,nil], __LINE__],
+ [['S40.05.23 23:55:21+09:00',false],[1965,5,23,23,55,21,'+09:00',9*3600,nil], __LINE__],
+ [['S40.05.23T23:55:21-09:00',false],[1965,5,23,23,55,21,'-09:00',-9*3600,nil], __LINE__],
+ [['H11.05.23 23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__],
+ [['H11.05.23T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__],
# ofx date
- [['19990523235521',false],[1999,5,23,23,55,21,nil,nil,nil]],
- [['19990523235521.123',false],[1999,5,23,23,55,21,nil,nil,nil]],
- [['19990523235521.123[-9]',false],[1999,5,23,23,55,21,'-9',-(9*3600),nil]],
- [['19990523235521.123[+9]',false],[1999,5,23,23,55,21,'+9',+(9*3600),nil]],
- [['19990523235521.123[9]',false],[1999,5,23,23,55,21,'9',+(9*3600),nil]],
- [['19990523235521.123[-9.50]',false],[1999,5,23,23,55,21,'-9.50',-(9*3600+30*60),nil]],
- [['19990523235521.123[+9.50]',false],[1999,5,23,23,55,21,'+9.50',+(9*3600+30*60),nil]],
- [['19990523235521.123[-5:EST]',false],[1999,5,23,23,55,21,'EST',-5*3600,nil]],
- [['19990523235521.123[+9:JST]',false],[1999,5,23,23,55,21,'JST',9*3600,nil]],
- [['19990523235521.123[+12:XXX YYY ZZZ]',false],[1999,5,23,23,55,21,'XXX YYY ZZZ',12*3600,nil]],
-# [['235521',false],[nil,nil,nil,23,55,21,nil,nil,nil]], # cp
- [['235521.123',false],[nil,nil,nil,23,55,21,nil,nil,nil]],
- [['235521.123[-9]',false],[nil,nil,nil,23,55,21,'-9',-9*3600,nil]],
- [['235521.123[+9]',false],[nil,nil,nil,23,55,21,'+9',+9*3600,nil]],
- [['235521.123[-5:EST]',false],[nil,nil,nil,23,55,21,'EST',-5*3600,nil]],
- [['235521.123[+9:JST]',false],[nil,nil,nil,23,55,21,'JST',+9*3600,nil]],
+ [['19990523235521',false],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['19990523235521.123',false],[1999,5,23,23,55,21,nil,nil,nil], __LINE__],
+ [['19990523235521.123[-9]',false],[1999,5,23,23,55,21,'-9',-(9*3600),nil], __LINE__],
+ [['19990523235521.123[+9]',false],[1999,5,23,23,55,21,'+9',+(9*3600),nil], __LINE__],
+ [['19990523235521.123[9]',false],[1999,5,23,23,55,21,'9',+(9*3600),nil], __LINE__],
+ [['19990523235521.123[-9.50]',false],[1999,5,23,23,55,21,'-9.50',-(9*3600+30*60),nil], __LINE__],
+ [['19990523235521.123[+9.50]',false],[1999,5,23,23,55,21,'+9.50',+(9*3600+30*60),nil], __LINE__],
+ [['19990523235521.123[-5:EST]',false],[1999,5,23,23,55,21,'EST',-5*3600,nil], __LINE__],
+ [['19990523235521.123[+9:JST]',false],[1999,5,23,23,55,21,'JST',9*3600,nil], __LINE__],
+ [['19990523235521.123[+12:XXX YYY ZZZ]',false],[1999,5,23,23,55,21,'XXX YYY ZZZ',12*3600,nil], __LINE__],
+# [['235521',false],[nil,nil,nil,23,55,21,nil,nil,nil], __LINE__], # cp
+ [['235521.123',false],[nil,nil,nil,23,55,21,nil,nil,nil], __LINE__],
+ [['235521.123[-9]',false],[nil,nil,nil,23,55,21,'-9',-9*3600,nil], __LINE__],
+ [['235521.123[+9]',false],[nil,nil,nil,23,55,21,'+9',+9*3600,nil], __LINE__],
+ [['235521.123[-5:EST]',false],[nil,nil,nil,23,55,21,'EST',-5*3600,nil], __LINE__],
+ [['235521.123[+9:JST]',false],[nil,nil,nil,23,55,21,'JST',+9*3600,nil], __LINE__],
# rfc 2822
- [['Sun, 22 Aug 1999 00:45:29 -0400',false],[1999,8,22,0,45,29,'-0400',-4*3600,0]],
- [['Sun, 22 Aug 1999 00:45:29 -9959',false],[1999,8,22,0,45,29,'-9959',-(99*3600+59*60),0]],
- [['Sun, 22 Aug 1999 00:45:29 +9959',false],[1999,8,22,0,45,29,'+9959',+(99*3600+59*60),0]],
- [['Sun, 22 Aug 05 00:45:29 -0400',true],[2005,8,22,0,45,29,'-0400',-4*3600,0]],
- [['Sun, 22 Aug 49 00:45:29 -0400',true],[2049,8,22,0,45,29,'-0400',-4*3600,0]],
-# [['Sun, 22 Aug 50 00:45:29 -0400',true],[1950,8,22,0,45,29,'-0400',-4*3600,0]],
-# [['Sun, 22 Aug 111 00:45:29 -0400',true],[2011,8,22,0,45,29,'-0400',-4*3600,0]],
- [['Sun, 22 Aug 1999 00:45:29 GMT',false],[1999,8,22,0,45,29,'GMT',0,0]],
- [["Sun,\00022\r\nAug\r\n1999\r\n00:45:29\r\nGMT",false],[1999,8,22,0,45,29,'GMT',0,0]],
- [['Sun, 22 Aug 1999 00:45 GMT',false],[1999,8,22,0,45,nil,'GMT',0,0]],
- [['Sun, 22 Aug -1999 00:45 GMT',false],[-1999,8,22,0,45,nil,'GMT',0,0]],
- [['Sun, 22 Aug 99 00:45:29 UT',true],[1999,8,22,0,45,29,'UT',0,0]],
- [['Sun, 22 Aug 0099 00:45:29 UT',true],[99,8,22,0,45,29,'UT',0,0]],
+ [['Sun, 22 Aug 1999 00:45:29 -0400',false],[1999,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
+ [['Sun, 22 Aug 1999 00:45:29 -9959',false],[1999,8,22,0,45,29,'-9959',-(99*3600+59*60),0], __LINE__],
+ [['Sun, 22 Aug 1999 00:45:29 +9959',false],[1999,8,22,0,45,29,'+9959',+(99*3600+59*60),0], __LINE__],
+ [['Sun, 22 Aug 05 00:45:29 -0400',true],[2005,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
+ [['Sun, 22 Aug 49 00:45:29 -0400',true],[2049,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
+# [['Sun, 22 Aug 50 00:45:29 -0400',true],[1950,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
+# [['Sun, 22 Aug 111 00:45:29 -0400',true],[2011,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
+ [['Sun, 22 Aug 1999 00:45:29 GMT',false],[1999,8,22,0,45,29,'GMT',0,0], __LINE__],
+ [["Sun,\00022\r\nAug\r\n1999\r\n00:45:29\r\nGMT",false],[1999,8,22,0,45,29,'GMT',0,0], __LINE__],
+ [['Sun, 22 Aug 1999 00:45 GMT',false],[1999,8,22,0,45,nil,'GMT',0,0], __LINE__],
+ [['Sun, 22 Aug -1999 00:45 GMT',false],[-1999,8,22,0,45,nil,'GMT',0,0], __LINE__],
+ [['Sun, 22 Aug 99 00:45:29 UT',true],[1999,8,22,0,45,29,'UT',0,0], __LINE__],
+ [['Sun, 22 Aug 0099 00:45:29 UT',true],[99,8,22,0,45,29,'UT',0,0], __LINE__],
# rfc 850, obsoleted by rfc 1036
- [['Tuesday, 02-Mar-99 11:20:32 GMT',true],[1999,3,2,11,20,32,'GMT',0,2]],
+ [['Tuesday, 02-Mar-99 11:20:32 GMT',true],[1999,3,2,11,20,32,'GMT',0,2], __LINE__],
# W3C Working Draft - XForms - 4.8 Time
- [['2000-01-31 13:20:00-5',false],[2000,1,31,13,20,0,'-5',-5*3600,nil]],
+ [['2000-01-31 13:20:00-5',false],[2000,1,31,13,20,0,'-5',-5*3600,nil], __LINE__],
# [-+]\d+.\d+
- [['2000-01-31 13:20:00-5.5',false],[2000,1,31,13,20,0,'-5.5',-5*3600-30*60,nil]],
- [['2000-01-31 13:20:00-5,5',false],[2000,1,31,13,20,0,'-5,5',-5*3600-30*60,nil]],
- [['2000-01-31 13:20:00+3.5',false],[2000,1,31,13,20,0,'+3.5',3*3600+30*60,nil]],
- [['2000-01-31 13:20:00+3,5',false],[2000,1,31,13,20,0,'+3,5',3*3600+30*60,nil]],
+ [['2000-01-31 13:20:00-5.5',false],[2000,1,31,13,20,0,'-5.5',-5*3600-30*60,nil], __LINE__],
+ [['2000-01-31 13:20:00-5,5',false],[2000,1,31,13,20,0,'-5,5',-5*3600-30*60,nil], __LINE__],
+ [['2000-01-31 13:20:00+3.5',false],[2000,1,31,13,20,0,'+3.5',3*3600+30*60,nil], __LINE__],
+ [['2000-01-31 13:20:00+3,5',false],[2000,1,31,13,20,0,'+3,5',3*3600+30*60,nil], __LINE__],
# mil
- [['2000-01-31 13:20:00 Z',false],[2000,1,31,13,20,0,'Z',0*3600,nil]],
- [['2000-01-31 13:20:00 H',false],[2000,1,31,13,20,0,'H',8*3600,nil]],
- [['2000-01-31 13:20:00 M',false],[2000,1,31,13,20,0,'M',12*3600,nil]],
- [['2000-01-31 13:20 M',false],[2000,1,31,13,20,nil,'M',12*3600,nil]],
- [['2000-01-31 13:20:00 S',false],[2000,1,31,13,20,0,'S',-6*3600,nil]],
- [['2000-01-31 13:20:00 A',false],[2000,1,31,13,20,0,'A',1*3600,nil]],
- [['2000-01-31 13:20:00 P',false],[2000,1,31,13,20,0,'P',-3*3600,nil]],
+ [['2000-01-31 13:20:00 Z',false],[2000,1,31,13,20,0,'Z',0*3600,nil], __LINE__],
+ [['2000-01-31 13:20:00 H',false],[2000,1,31,13,20,0,'H',8*3600,nil], __LINE__],
+ [['2000-01-31 13:20:00 M',false],[2000,1,31,13,20,0,'M',12*3600,nil], __LINE__],
+ [['2000-01-31 13:20 M',false],[2000,1,31,13,20,nil,'M',12*3600,nil], __LINE__],
+ [['2000-01-31 13:20:00 S',false],[2000,1,31,13,20,0,'S',-6*3600,nil], __LINE__],
+ [['2000-01-31 13:20:00 A',false],[2000,1,31,13,20,0,'A',1*3600,nil], __LINE__],
+ [['2000-01-31 13:20:00 P',false],[2000,1,31,13,20,0,'P',-3*3600,nil], __LINE__],
# dot
- [['1999.5.2',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['1999.05.02',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['-1999.05.02',false],[-1999,5,2,nil,nil,nil,nil,nil,nil]],
-# [['05.02',false],[nil,5,2,nil,nil,nil,nil,nil,nil]], # not support
-# [[' 5. 2',false],[nil,5,2,nil,nil,nil,nil,nil,nil]], # not support
+ [['1999.5.2',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['1999.05.02',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['-1999.05.02',false],[-1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+# [['05.02',false],[nil,5,2,nil,nil,nil,nil,nil,nil], __LINE__], # not support
+# [[' 5. 2',false],[nil,5,2,nil,nil,nil,nil,nil,nil], __LINE__], # not support
- [['0099.5.2',false],[99,5,2,nil,nil,nil,nil,nil,nil]],
- [['0099.5.2',true],[99,5,2,nil,nil,nil,nil,nil,nil]],
+ [['0099.5.2',false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['0099.5.2',true],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
- [["'99.5.2",false],[99,5,2,nil,nil,nil,nil,nil,nil]],
- [["'99.5.2",true],[1999,5,2,nil,nil,nil,nil,nil,nil]],
+ [["'99.5.2",false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["'99.5.2",true],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
# reversed dot
- [['2.5.1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['02.05.1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['02.05.-1999',false],[-1999,5,2,nil,nil,nil,nil,nil,nil]],
+ [['2.5.1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['02.05.1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['02.05.-1999',false],[-1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
- [['2.5.0099',false],[99,5,2,nil,nil,nil,nil,nil,nil]],
- [['2.5.0099',true],[99,5,2,nil,nil,nil,nil,nil,nil]],
+ [['2.5.0099',false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2.5.0099',true],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
- [["2.5.'99",false],[99,5,2,nil,nil,nil,nil,nil,nil]],
- [["2.5.'99",true],[1999,5,2,nil,nil,nil,nil,nil,nil]],
+ [["2.5.'99",false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["2.5.'99",true],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
# vms
- [['08-DEC-1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil]],
- [['31-JAN-1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['31-JAN--1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil]],
+ [['08-DEC-1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['31-JAN-1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['31-JAN--1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
- [['08-DEC-88',false],[88,12,8,nil,nil,nil,nil,nil,nil]],
- [['08-DEC-88',true],[1988,12,8,nil,nil,nil,nil,nil,nil]],
- [['08-DEC-0088',false],[88,12,8,nil,nil,nil,nil,nil,nil]],
- [['08-DEC-0088',true],[88,12,8,nil,nil,nil,nil,nil,nil]],
+ [['08-DEC-88',false],[88,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['08-DEC-88',true],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['08-DEC-0088',false],[88,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['08-DEC-0088',true],[88,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
# swaped vms
- [['DEC-08-1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil]],
- [['JAN-31-1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['JAN-31--1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['JAN-1999',false],[1999,1,nil,nil,nil,nil,nil,nil,nil]],
- [['JAN--1999',false],[-1999,1,nil,nil,nil,nil,nil,nil,nil]],
+ [['DEC-08-1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['JAN-31-1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['JAN-31--1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['JAN-1999',false],[1999,1,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['JAN--1999',false],[-1999,1,nil,nil,nil,nil,nil,nil,nil], __LINE__],
# reversed vms
- [['1988-DEC-08',false],[1988,12,8,nil,nil,nil,nil,nil,nil]],
- [['1999-JAN-31',false],[1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['-1999-JAN-31',false],[-1999,1,31,nil,nil,nil,nil,nil,nil]],
+ [['1988-DEC-08',false],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['1999-JAN-31',false],[1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['-1999-JAN-31',false],[-1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
- [['0088-DEC-08',false],[88,12,8,nil,nil,nil,nil,nil,nil]],
- [['0088-DEC-08',true],[88,12,8,nil,nil,nil,nil,nil,nil]],
+ [['0088-DEC-08',false],[88,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['0088-DEC-08',true],[88,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
- [["'88/12/8",false],[88,12,8,nil,nil,nil,nil,nil,nil]],
- [["'88/12/8",true],[1988,12,8,nil,nil,nil,nil,nil,nil]],
+ [["'88/12/8",false],[88,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["'88/12/8",true],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
# non-spaced eu
- [['08/dec/1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil]],
- [['31/jan/1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['31/jan/-1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['08.dec.1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil]],
- [['31.jan.1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['31.jan.-1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil]],
+ [['08/dec/1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['31/jan/1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['31/jan/-1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['08.dec.1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['31.jan.1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['31.jan.-1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
# non-spaced us
- [['dec/08/1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil]],
- [['jan/31/1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['jan/31/-1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['jan/31',false],[nil,1,31,nil,nil,nil,nil,nil,nil]],
- [['jan/1988',false],[1988,1,nil,nil,nil,nil,nil,nil,nil]],
- [['dec.08.1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil]],
- [['jan.31.1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['jan.31.-1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil]],
- [['jan.31',false],[nil,1,31,nil,nil,nil,nil,nil,nil]],
- [['jan.1988',false],[1988,1,nil,nil,nil,nil,nil,nil,nil]],
+ [['dec/08/1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['jan/31/1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['jan/31/-1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['jan/31',false],[nil,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['jan/1988',false],[1988,1,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['dec.08.1988',false],[1988,12,8,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['jan.31.1999',false],[1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['jan.31.-1999',false],[-1999,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['jan.31',false],[nil,1,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['jan.1988',false],[1988,1,nil,nil,nil,nil,nil,nil,nil], __LINE__],
# month and day of month
- [['Jan 1',false],[nil,1,1,nil,nil,nil,nil,nil,nil]],
- [['Jul 11',false],[nil,7,11,nil,nil,nil,nil,nil,nil]],
- [['July 11',false],[nil,7,11,nil,nil,nil,nil,nil,nil]],
- [['Sept 23',false],[nil,9,23,nil,nil,nil,nil,nil,nil]],
- [['Sep. 23',false],[nil,9,23,nil,nil,nil,nil,nil,nil]],
- [['Sept. 23',false],[nil,9,23,nil,nil,nil,nil,nil,nil]],
- [['September 23',false],[nil,9,23,nil,nil,nil,nil,nil,nil]],
- [['October 1st',false],[nil,10,1,nil,nil,nil,nil,nil,nil]],
- [['October 23rd',false],[nil,10,23,nil,nil,nil,nil,nil,nil]],
- [['October 25th 1999',false],[1999,10,25,nil,nil,nil,nil,nil,nil]],
- [['October 25th -1999',false],[-1999,10,25,nil,nil,nil,nil,nil,nil]],
- [['october 25th 1999',false],[1999,10,25,nil,nil,nil,nil,nil,nil]],
- [['OCTOBER 25th 1999',false],[1999,10,25,nil,nil,nil,nil,nil,nil]],
- [['oCtoBer 25th 1999',false],[1999,10,25,nil,nil,nil,nil,nil,nil]],
- [['aSep 23',false],[nil,nil,23,nil,nil,nil,nil,nil,nil]],
+ [['Jan 1',false],[nil,1,1,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['Jul 11',false],[nil,7,11,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['July 11',false],[nil,7,11,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['Sept 23',false],[nil,9,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['Sep. 23',false],[nil,9,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['Sept. 23',false],[nil,9,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['September 23',false],[nil,9,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['October 1st',false],[nil,10,1,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['October 23rd',false],[nil,10,23,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['October 25th 1999',false],[1999,10,25,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['October 25th -1999',false],[-1999,10,25,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['october 25th 1999',false],[1999,10,25,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['OCTOBER 25th 1999',false],[1999,10,25,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['oCtoBer 25th 1999',false],[1999,10,25,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['aSep 23',false],[nil,nil,23,nil,nil,nil,nil,nil,nil], __LINE__],
# month and year
- [['Sept 1990',false],[1990,9,nil,nil,nil,nil,nil,nil,nil]],
- [["Sept '90",false],[90,9,nil,nil,nil,nil,nil,nil,nil]],
- [["Sept '90",true],[1990,9,nil,nil,nil,nil,nil,nil,nil]],
- [['1990/09',false],[1990,9,nil,nil,nil,nil,nil,nil,nil]],
- [['09/1990',false],[1990,9,nil,nil,nil,nil,nil,nil,nil]],
- [["aSep '90",false],[90,nil,nil,nil,nil,nil,nil,nil,nil]],
+ [['Sept 1990',false],[1990,9,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["Sept '90",false],[90,9,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["Sept '90",true],[1990,9,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['1990/09',false],[1990,9,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['09/1990',false],[1990,9,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["aSep '90",false],[90,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
# year
- [["'90",false],[90,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["'90",true],[1990,nil,nil,nil,nil,nil,nil,nil,nil]],
+ [["'90",false],[90,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["'90",true],[1990,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
# month
- [['Jun',false],[nil,6,nil,nil,nil,nil,nil,nil,nil]],
- [['June',false],[nil,6,nil,nil,nil,nil,nil,nil,nil]],
- [['Sep',false],[nil,9,nil,nil,nil,nil,nil,nil,nil]],
- [['Sept',false],[nil,9,nil,nil,nil,nil,nil,nil,nil]],
- [['September',false],[nil,9,nil,nil,nil,nil,nil,nil,nil]],
- [['aSep',false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
+ [['Jun',false],[nil,6,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['June',false],[nil,6,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['Sep',false],[nil,9,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['Sept',false],[nil,9,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['September',false],[nil,9,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['aSep',false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
# day of month
- [['1st',false],[nil,nil,1,nil,nil,nil,nil,nil,nil]],
- [['2nd',false],[nil,nil,2,nil,nil,nil,nil,nil,nil]],
- [['3rd',false],[nil,nil,3,nil,nil,nil,nil,nil,nil]],
- [['4th',false],[nil,nil,4,nil,nil,nil,nil,nil,nil]],
- [['29th',false],[nil,nil,29,nil,nil,nil,nil,nil,nil]],
- [['31st',false],[nil,nil,31,nil,nil,nil,nil,nil,nil]],
- [['1sta',false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
+ [['1st',false],[nil,nil,1,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2nd',false],[nil,nil,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['3rd',false],[nil,nil,3,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['4th',false],[nil,nil,4,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['29th',false],[nil,nil,29,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['31st',false],[nil,nil,31,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['1sta',false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
# era
- [['Sat Aug 28 02:29:34 GMT CE 2000',false],[2000,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT C.E. 2000',false],[2000,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT BCE 2000',false],[-1999,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT B.C.E. 2000',false],[-1999,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT AD 2000',false],[2000,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT A.D. 2000',false],[2000,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT BC 2000',false],[-1999,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT B.C. 2000',false],[-1999,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT 2000 BC',false],[-1999,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT 2000 BCE',false],[-1999,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT 2000 B.C.',false],[-1999,8,28,2,29,34,'GMT',0,6]],
- [['Sat Aug 28 02:29:34 GMT 2000 B.C.E.',false],[-1999,8,28,2,29,34,'GMT',0,6]],
+ [['Sat Aug 28 02:29:34 GMT CE 2000',false],[2000,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT C.E. 2000',false],[2000,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT BCE 2000',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT B.C.E. 2000',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT AD 2000',false],[2000,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT A.D. 2000',false],[2000,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT BC 2000',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT B.C. 2000',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT 2000 BC',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT 2000 BCE',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT 2000 B.C.',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
+ [['Sat Aug 28 02:29:34 GMT 2000 B.C.E.',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
# collection
-# [['le ler juillet 1982',false],[1982,7,1,nil,nil,nil,nil,nil,nil]], # bih 1982
-# [['30 June 1982 , 23h 59m 59s',false],[1982,6,30,23,59,59,nil,nil,nil]], # bih 1982
- [['Tuesday, May 18, 1999 Published at 13:36 GMT 14:36 UK',false],[1999,5,18,13,36,nil,'GMT',0,2]], # bbc.co.uk
- [['July 20, 2000 Web posted at: 3:37 p.m. EDT (1937 GMT)',false],[2000,7,20,15,37,nil,'EDT',-4*3600,nil]], # cnn.com
- [['12:54 p.m. EDT, September 11, 2006',false],[2006,9,11,12,54,nil,'EDT',-4*3600,nil]], # cnn.com
- [['February 04, 2001 at 10:59 AM PST',false],[2001,2,4,10,59,nil,'PST',-8*3600,nil]], # old amazon.com
- [['Monday May 08, @01:55PM',false],[nil,5,8,13,55,nil,nil,nil,1]], # slashdot.org
- [['06.June 2005',false],[2005,6,6,nil,nil,nil,nil,nil,nil]], # dhl.com
+# [['le ler juillet 1982',false],[1982,7,1,nil,nil,nil,nil,nil,nil], __LINE__], # bih 1982
+# [['30 June 1982 , 23h 59m 59s',false],[1982,6,30,23,59,59,nil,nil,nil], __LINE__], # bih 1982
+ [['Tuesday, May 18, 1999 Published at 13:36 GMT 14:36 UK',false],[1999,5,18,13,36,nil,'GMT',0,2], __LINE__], # bbc.co.uk
+ [['July 20, 2000 Web posted at: 3:37 p.m. EDT (1937 GMT)',false],[2000,7,20,15,37,nil,'EDT',-4*3600,nil], __LINE__], # cnn.com
+ [['12:54 p.m. EDT, September 11, 2006',false],[2006,9,11,12,54,nil,'EDT',-4*3600,nil], __LINE__], # cnn.com
+ [['February 04, 2001 at 10:59 AM PST',false],[2001,2,4,10,59,nil,'PST',-8*3600,nil], __LINE__], # old amazon.com
+ [['Monday May 08, @01:55PM',false],[nil,5,8,13,55,nil,nil,nil,1], __LINE__], # slashdot.org
+ [['06.June 2005',false],[2005,6,6,nil,nil,nil,nil,nil,nil], __LINE__], # dhl.com
# etc.
- [['8:00 pm lt',false],[nil,nil,nil,20,0,nil,'lt',nil,nil]],
- [['4:00 AM, Jan. 12, 1990',false],[1990,1,12,4,0,nil,nil,nil,nil]],
- [['Jan. 12 4:00 AM 1990',false],[1990,1,12,4,0,nil,nil,nil,nil]],
-# [['Jan. 12 4:00 -1990',false],[-1990,1,12,4,0,nil,nil,nil,nil]], # cp
- [['1990-01-12 04:00:00+00',false],[1990,1,12,4,0,0,'+00',0,nil]],
- [['1990-01-11 20:00:00-08',false],[1990,1,11,20,0,0,'-08',-8*3600,nil]],
- [['1990/01/12 04:00:00',false],[1990,1,12,4,0,0,nil,nil,nil]],
-# [['Thu Jan 11 20:00:00 1990 LT',false], [1990,1,11,20,0,0,'LT',nil,4]], # cp
- [['Thu Jan 11 20:00:00 PST 1990',false],[1990,1,11,20,0,0,'PST',-8*3600,4]],
- [['Fri Jan 12 04:00:00 GMT 1990',false],[1990,1,12,4,0,0,'GMT',0,5]],
- [['Thu, 11 Jan 1990 20:00:00 -0800',false],[1990,1,11,20,0,0,'-0800',-8*3600,4]],
- [['12-January-1990, 04:00 WET',false],[1990,1,12,4,0,nil,'WET',0*3600,nil]],
- [['jan 2 3 am +4 5',false],[5,1,2,3,nil,nil,'+4',4*3600,nil]],
- [['jan 2 3 am +4 5',true],[2005,1,2,3,nil,nil,'+4',4*3600,nil]],
- [['fri1feb3bc4pm+5',false],[-2,2,1,16,nil,nil,'+5',5*3600,5]],
- [['fri1feb3bc4pm+5',true],[-2,2,1,16,nil,nil,'+5',5*3600,5]],
- [['03 feb 1st',false],[03,2,1,nil,nil,nil,nil,nil,nil]],
+ [['8:00 pm lt',false],[nil,nil,nil,20,0,nil,'lt',nil,nil], __LINE__],
+ [['4:00 AM, Jan. 12, 1990',false],[1990,1,12,4,0,nil,nil,nil,nil], __LINE__],
+ [['Jan. 12 4:00 AM 1990',false],[1990,1,12,4,0,nil,nil,nil,nil], __LINE__],
+# [['Jan. 12 4:00 -1990',false],[-1990,1,12,4,0,nil,nil,nil,nil], __LINE__], # cp
+ [['1990-01-12 04:00:00+00',false],[1990,1,12,4,0,0,'+00',0,nil], __LINE__],
+ [['1990-01-11 20:00:00-08',false],[1990,1,11,20,0,0,'-08',-8*3600,nil], __LINE__],
+ [['1990/01/12 04:00:00',false],[1990,1,12,4,0,0,nil,nil,nil], __LINE__],
+# [['Thu Jan 11 20:00:00 1990 LT',false], [1990,1,11,20,0,0,'LT',nil,4], __LINE__], # cp
+ [['Thu Jan 11 20:00:00 PST 1990',false],[1990,1,11,20,0,0,'PST',-8*3600,4], __LINE__],
+ [['Fri Jan 12 04:00:00 GMT 1990',false],[1990,1,12,4,0,0,'GMT',0,5], __LINE__],
+ [['Thu, 11 Jan 1990 20:00:00 -0800',false],[1990,1,11,20,0,0,'-0800',-8*3600,4], __LINE__],
+ [['12-January-1990, 04:00 WET',false],[1990,1,12,4,0,nil,'WET',0*3600,nil], __LINE__],
+ [['jan 2 3 am +4 5',false],[5,1,2,3,nil,nil,'+4',4*3600,nil], __LINE__],
+ [['jan 2 3 am +4 5',true],[2005,1,2,3,nil,nil,'+4',4*3600,nil], __LINE__],
+ [['fri1feb3bc4pm+5',false],[-2,2,1,16,nil,nil,'+5',5*3600,5], __LINE__],
+ [['fri1feb3bc4pm+5',true],[-2,2,1,16,nil,nil,'+5',5*3600,5], __LINE__],
+ [['03 feb 1st',false],[03,2,1,nil,nil,nil,nil,nil,nil], __LINE__],
# apostrophe
- [["July 4, '79",true],[1979,7,4,nil,nil,nil,nil,nil,nil]],
- [["4th July '79",true],[1979,7,4,nil,nil,nil,nil,nil,nil]],
+ [["July 4, '79",true],[1979,7,4,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["4th July '79",true],[1979,7,4,nil,nil,nil,nil,nil,nil], __LINE__],
# day of week
- [['Sunday',false],[nil,nil,nil,nil,nil,nil,nil,nil,0]],
- [['Mon',false],[nil,nil,nil,nil,nil,nil,nil,nil,1]],
- [['Tue',false],[nil,nil,nil,nil,nil,nil,nil,nil,2]],
- [['Wed',false],[nil,nil,nil,nil,nil,nil,nil,nil,3]],
- [['Thurs',false],[nil,nil,nil,nil,nil,nil,nil,nil,4]],
- [['Friday',false],[nil,nil,nil,nil,nil,nil,nil,nil,5]],
- [['Sat.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6]],
- [['sat.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6]],
- [['SAT.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6]],
- [['sAt.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6]],
-# [['su',false],[nil,nil,nil,nil,nil,nil,nil,nil,0]],
-# [['mo',false],[nil,nil,nil,nil,nil,nil,nil,nil,1]],
+ [['Sunday',false],[nil,nil,nil,nil,nil,nil,nil,nil,0], __LINE__],
+ [['Mon',false],[nil,nil,nil,nil,nil,nil,nil,nil,1], __LINE__],
+ [['Tue',false],[nil,nil,nil,nil,nil,nil,nil,nil,2], __LINE__],
+ [['Wed',false],[nil,nil,nil,nil,nil,nil,nil,nil,3], __LINE__],
+ [['Thurs',false],[nil,nil,nil,nil,nil,nil,nil,nil,4], __LINE__],
+ [['Friday',false],[nil,nil,nil,nil,nil,nil,nil,nil,5], __LINE__],
+ [['Sat.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6], __LINE__],
+ [['sat.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6], __LINE__],
+ [['SAT.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6], __LINE__],
+ [['sAt.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6], __LINE__],
+# [['su',false],[nil,nil,nil,nil,nil,nil,nil,nil,0], __LINE__],
+# [['mo',false],[nil,nil,nil,nil,nil,nil,nil,nil,1], __LINE__],
# time
- [['09:55',false],[nil,nil,nil,9,55,nil,nil,nil,nil]],
- [['09:55:30',false],[nil,nil,nil,9,55,30,nil,nil,nil]],
- [['09:55:30am',false],[nil,nil,nil,9,55,30,nil,nil,nil]],
- [['09:55:30pm',false],[nil,nil,nil,21,55,30,nil,nil,nil]],
- [['09:55:30a.m.',false],[nil,nil,nil,9,55,30,nil,nil,nil]],
- [['09:55:30p.m.',false],[nil,nil,nil,21,55,30,nil,nil,nil]],
- [['09:55:30pm GMT',false],[nil,nil,nil,21,55,30,'GMT',0,nil]],
- [['09:55:30p.m. GMT',false],[nil,nil,nil,21,55,30,'GMT',0,nil]],
- [['09:55+0900',false],[nil,nil,nil,9,55,nil,'+0900',9*3600,nil]],
- [['09 AM',false],[nil,nil,nil,9,nil,nil,nil,nil,nil]],
- [['09am',false],[nil,nil,nil,9,nil,nil,nil,nil,nil]],
- [['09 A.M.',false],[nil,nil,nil,9,nil,nil,nil,nil,nil]],
- [['09 PM',false],[nil,nil,nil,21,nil,nil,nil,nil,nil]],
- [['09pm',false],[nil,nil,nil,21,nil,nil,nil,nil,nil]],
- [['09 P.M.',false],[nil,nil,nil,21,nil,nil,nil,nil,nil]],
-
- [['9h22m23s',false],[nil,nil,nil,9,22,23,nil,nil,nil]],
- [['9h 22m 23s',false],[nil,nil,nil,9,22,23,nil,nil,nil]],
- [['9h22m',false],[nil,nil,nil,9,22,nil,nil,nil,nil]],
- [['9h 22m',false],[nil,nil,nil,9,22,nil,nil,nil,nil]],
- [['9h',false],[nil,nil,nil,9,nil,nil,nil,nil,nil]],
- [['9h 22m 23s am',false],[nil,nil,nil,9,22,23,nil,nil,nil]],
- [['9h 22m 23s pm',false],[nil,nil,nil,21,22,23,nil,nil,nil]],
- [['9h 22m am',false],[nil,nil,nil,9,22,nil,nil,nil,nil]],
- [['9h 22m pm',false],[nil,nil,nil,21,22,nil,nil,nil,nil]],
- [['9h am',false],[nil,nil,nil,9,nil,nil,nil,nil,nil]],
- [['9h pm',false],[nil,nil,nil,21,nil,nil,nil,nil,nil]],
-
- [['00:00',false],[nil,nil,nil,0,0,nil,nil,nil,nil]],
- [['01:00',false],[nil,nil,nil,1,0,nil,nil,nil,nil]],
- [['11:00',false],[nil,nil,nil,11,0,nil,nil,nil,nil]],
- [['12:00',false],[nil,nil,nil,12,0,nil,nil,nil,nil]],
- [['13:00',false],[nil,nil,nil,13,0,nil,nil,nil,nil]],
- [['23:00',false],[nil,nil,nil,23,0,nil,nil,nil,nil]],
- [['24:00',false],[nil,nil,nil,24,0,nil,nil,nil,nil]],
-
- [['00:00 AM',false],[nil,nil,nil,0,0,nil,nil,nil,nil]],
- [['12:00 AM',false],[nil,nil,nil,0,0,nil,nil,nil,nil]],
- [['01:00 AM',false],[nil,nil,nil,1,0,nil,nil,nil,nil]],
- [['11:00 AM',false],[nil,nil,nil,11,0,nil,nil,nil,nil]],
- [['00:00 PM',false],[nil,nil,nil,12,0,nil,nil,nil,nil]],
- [['12:00 PM',false],[nil,nil,nil,12,0,nil,nil,nil,nil]],
- [['01:00 PM',false],[nil,nil,nil,13,0,nil,nil,nil,nil]],
- [['11:00 PM',false],[nil,nil,nil,23,0,nil,nil,nil,nil]],
+ [['09:55',false],[nil,nil,nil,9,55,nil,nil,nil,nil], __LINE__],
+ [['09:55:30',false],[nil,nil,nil,9,55,30,nil,nil,nil], __LINE__],
+ [['09:55:30am',false],[nil,nil,nil,9,55,30,nil,nil,nil], __LINE__],
+ [['09:55:30pm',false],[nil,nil,nil,21,55,30,nil,nil,nil], __LINE__],
+ [['09:55:30a.m.',false],[nil,nil,nil,9,55,30,nil,nil,nil], __LINE__],
+ [['09:55:30p.m.',false],[nil,nil,nil,21,55,30,nil,nil,nil], __LINE__],
+ [['09:55:30pm GMT',false],[nil,nil,nil,21,55,30,'GMT',0,nil], __LINE__],
+ [['09:55:30p.m. GMT',false],[nil,nil,nil,21,55,30,'GMT',0,nil], __LINE__],
+ [['09:55+0900',false],[nil,nil,nil,9,55,nil,'+0900',9*3600,nil], __LINE__],
+ [['09 AM',false],[nil,nil,nil,9,nil,nil,nil,nil,nil], __LINE__],
+ [['09am',false],[nil,nil,nil,9,nil,nil,nil,nil,nil], __LINE__],
+ [['09 A.M.',false],[nil,nil,nil,9,nil,nil,nil,nil,nil], __LINE__],
+ [['09 PM',false],[nil,nil,nil,21,nil,nil,nil,nil,nil], __LINE__],
+ [['09pm',false],[nil,nil,nil,21,nil,nil,nil,nil,nil], __LINE__],
+ [['09 P.M.',false],[nil,nil,nil,21,nil,nil,nil,nil,nil], __LINE__],
+
+ [['9h22m23s',false],[nil,nil,nil,9,22,23,nil,nil,nil], __LINE__],
+ [['9h 22m 23s',false],[nil,nil,nil,9,22,23,nil,nil,nil], __LINE__],
+ [['9h22m',false],[nil,nil,nil,9,22,nil,nil,nil,nil], __LINE__],
+ [['9h 22m',false],[nil,nil,nil,9,22,nil,nil,nil,nil], __LINE__],
+ [['9h',false],[nil,nil,nil,9,nil,nil,nil,nil,nil], __LINE__],
+ [['9h 22m 23s am',false],[nil,nil,nil,9,22,23,nil,nil,nil], __LINE__],
+ [['9h 22m 23s pm',false],[nil,nil,nil,21,22,23,nil,nil,nil], __LINE__],
+ [['9h 22m am',false],[nil,nil,nil,9,22,nil,nil,nil,nil], __LINE__],
+ [['9h 22m pm',false],[nil,nil,nil,21,22,nil,nil,nil,nil], __LINE__],
+ [['9h am',false],[nil,nil,nil,9,nil,nil,nil,nil,nil], __LINE__],
+ [['9h pm',false],[nil,nil,nil,21,nil,nil,nil,nil,nil], __LINE__],
+
+ [['00:00',false],[nil,nil,nil,0,0,nil,nil,nil,nil], __LINE__],
+ [['01:00',false],[nil,nil,nil,1,0,nil,nil,nil,nil], __LINE__],
+ [['11:00',false],[nil,nil,nil,11,0,nil,nil,nil,nil], __LINE__],
+ [['12:00',false],[nil,nil,nil,12,0,nil,nil,nil,nil], __LINE__],
+ [['13:00',false],[nil,nil,nil,13,0,nil,nil,nil,nil], __LINE__],
+ [['23:00',false],[nil,nil,nil,23,0,nil,nil,nil,nil], __LINE__],
+ [['24:00',false],[nil,nil,nil,24,0,nil,nil,nil,nil], __LINE__],
+
+ [['00:00 AM',false],[nil,nil,nil,0,0,nil,nil,nil,nil], __LINE__],
+ [['12:00 AM',false],[nil,nil,nil,0,0,nil,nil,nil,nil], __LINE__],
+ [['01:00 AM',false],[nil,nil,nil,1,0,nil,nil,nil,nil], __LINE__],
+ [['11:00 AM',false],[nil,nil,nil,11,0,nil,nil,nil,nil], __LINE__],
+ [['00:00 PM',false],[nil,nil,nil,12,0,nil,nil,nil,nil], __LINE__],
+ [['12:00 PM',false],[nil,nil,nil,12,0,nil,nil,nil,nil], __LINE__],
+ [['01:00 PM',false],[nil,nil,nil,13,0,nil,nil,nil,nil], __LINE__],
+ [['11:00 PM',false],[nil,nil,nil,23,0,nil,nil,nil,nil], __LINE__],
# pick up the rest
- [['2000-01-02 1',false],[2000,1,2,1,nil,nil,nil,nil,nil]],
- [['2000-01-02 23',false],[2000,1,2,23,nil,nil,nil,nil,nil]],
- [['2000-01-02 24',false],[2000,1,2,24,nil,nil,nil,nil,nil]],
- [['1 03:04:05',false],[nil,nil,1,3,4,5,nil,nil,nil]],
- [['02 03:04:05',false],[nil,nil,2,3,4,5,nil,nil,nil]],
- [['31 03:04:05',false],[nil,nil,31,3,4,5,nil,nil,nil]],
+ [['2000-01-02 1',false],[2000,1,2,1,nil,nil,nil,nil,nil], __LINE__],
+ [['2000-01-02 23',false],[2000,1,2,23,nil,nil,nil,nil,nil], __LINE__],
+ [['2000-01-02 24',false],[2000,1,2,24,nil,nil,nil,nil,nil], __LINE__],
+ [['1 03:04:05',false],[nil,nil,1,3,4,5,nil,nil,nil], __LINE__],
+ [['02 03:04:05',false],[nil,nil,2,3,4,5,nil,nil,nil], __LINE__],
+ [['31 03:04:05',false],[nil,nil,31,3,4,5,nil,nil,nil], __LINE__],
# null, space
- [['',false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["\s",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["\s" * 10, true],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["\t",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["\n",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["\v",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["\f",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["\r",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["\t\n\v\f\r\s",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil]],
- [["1999-05-23\t\n\v\f\r\s21:34:56",false],[1999,5,23,21,34,56,nil,nil,nil]],
- [["1999-05-23\n\n\n\n\n\n21:34:56",false],[1999,5,23,21,34,56,nil,nil,nil]],
- ].each do |x,y|
+ [['',false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["\s",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["\s" * 10, true],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["\t",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["\n",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["\v",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["\f",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["\r",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["\t\n\v\f\r\s",false],[nil,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["1999-05-23\t\n\v\f\r\s21:34:56",false],[1999,5,23,21,34,56,nil,nil,nil], __LINE__],
+ ].each do |x,y,l|
h = Date._parse(*x)
a = h.values_at(:year,:mon,:mday,:hour,:min,:sec,:zone,:offset,:wday)
if y[1] == -1
a[1] = -1
a[2] = h[:yday]
end
- assert_equal(y, a, [x, y, a].inspect)
+ assert_equal(y, a, format('<failed at line %d>', l))
end
end
def test__parse_slash_exp
[
# little
- [['2/5/1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['02/05/1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['02/05/-1999',false],[-1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['05/02',false],[nil,5,2,nil,nil,nil,nil,nil,nil]],
- [[' 5/ 2',false],[nil,5,2,nil,nil,nil,nil,nil,nil]],
+ [['2/5/1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['02/05/1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['02/05/-1999',false],[-1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['05/02',false],[nil,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [[' 5/ 2',false],[nil,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
- [["2/5/'99",true],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['2/5/0099',false],[99,5,2,nil,nil,nil,nil,nil,nil]],
- [['2/5/0099',true],[99,5,2,nil,nil,nil,nil,nil,nil]],
+ [["2/5/'99",true],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2/5/0099',false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2/5/0099',true],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
- [['2/5 1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['2/5-1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['2/5--1999',false],[-1999,5,2,nil,nil,nil,nil,nil,nil]],
+ [['2/5 1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2/5-1999',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2/5--1999',false],[-1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
# big
- [['99/5/2',false],[99,5,2,nil,nil,nil,nil,nil,nil]],
- [['99/5/2',true],[1999,5,2,nil,nil,nil,nil,nil,nil]],
+ [['99/5/2',false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['99/5/2',true],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
- [['1999/5/2',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['1999/05/02',false],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- [['-1999/05/02',false],[-1999,5,2,nil,nil,nil,nil,nil,nil]],
+ [['1999/5/2',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['1999/05/02',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['-1999/05/02',false],[-1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
- [['0099/5/2',false],[99,5,2,nil,nil,nil,nil,nil,nil]],
- [['0099/5/2',true],[99,5,2,nil,nil,nil,nil,nil,nil]],
+ [['0099/5/2',false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['0099/5/2',true],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
- [["'99/5/2",false],[99,5,2,nil,nil,nil,nil,nil,nil]],
- [["'99/5/2",true],[1999,5,2,nil,nil,nil,nil,nil,nil]],
- ].each do |x,y|
+ [["'99/5/2",false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["'99/5/2",true],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
+ ].each do |x,y,l|
h = Date._parse(*x)
a = h.values_at(:year,:mon,:mday,:hour,:min,:sec,:zone,:offset,:wday)
if y[1] == -1
a[1] = -1
a[2] = h[:yday]
end
- assert_equal(y, a, [x, y, a].inspect)
+ assert_equal(y, a, format('<failed at line %d>', l))
end
end
View
166 test/date/test_date_strptime.rb
@@ -119,63 +119,63 @@ def test__strptime__2
def test__strptime__3
[
# iso8601
- [['2001-02-03', '%Y-%m-%d'], [2001,2,3,nil,nil,nil,nil,nil,nil]],
- [['2001-02-03T23:59:60', '%Y-%m-%dT%H:%M:%S'], [2001,2,3,23,59,60,nil,nil,nil]],
- [['2001-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [2001,2,3,23,59,60,'+09:00',9*3600,nil]],
- [['-2001-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [-2001,2,3,23,59,60,'+09:00',9*3600,nil]],
- [['+012345-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [12345,2,3,23,59,60,'+09:00',9*3600,nil]],
- [['-012345-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [-12345,2,3,23,59,60,'+09:00',9*3600,nil]],
+ [['2001-02-03', '%Y-%m-%d'], [2001,2,3,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2001-02-03T23:59:60', '%Y-%m-%dT%H:%M:%S'], [2001,2,3,23,59,60,nil,nil,nil], __LINE__],
+ [['2001-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [2001,2,3,23,59,60,'+09:00',9*3600,nil], __LINE__],
+ [['-2001-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [-2001,2,3,23,59,60,'+09:00',9*3600,nil], __LINE__],
+ [['+012345-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [12345,2,3,23,59,60,'+09:00',9*3600,nil], __LINE__],
+ [['-012345-02-03T23:59:60+09:00', '%Y-%m-%dT%H:%M:%S%Z'], [-12345,2,3,23,59,60,'+09:00',9*3600,nil], __LINE__],
# ctime(3), asctime(3)
- [['Thu Jul 29 14:47:19 1999', '%c'], [1999,7,29,14,47,19,nil,nil,4]],
- [['Thu Jul 29 14:47:19 -1999', '%c'], [-1999,7,29,14,47,19,nil,nil,4]],
+ [['Thu Jul 29 14:47:19 1999', '%c'], [1999,7,29,14,47,19,nil,nil,4], __LINE__],
+ [['Thu Jul 29 14:47:19 -1999', '%c'], [-1999,7,29,14,47,19,nil,nil,4], __LINE__],
# date(1)
- [['Thu Jul 29 16:39:41 EST 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'EST',-5*3600,4]],
- [['Thu Jul 29 16:39:41 MET DST 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'MET DST',2*3600,4]],
- [['Thu Jul 29 16:39:41 AMT 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'AMT',nil,4]],
- [['Thu Jul 29 16:39:41 AMT -1999', '%a %b %d %H:%M:%S %Z %Y'], [-1999,7,29,16,39,41,'AMT',nil,4]],
- [['Thu Jul 29 16:39:41 GMT+09 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+09',9*3600,4]],
- [['Thu Jul 29 16:39:41 GMT+0908 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+0908',9*3600+8*60,4]],
- [['Thu Jul 29 16:39:41 GMT+090807 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+090807',9*3600+8*60+7,4]],
- [['Thu Jul 29 16:39:41 GMT-09 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09',-9*3600,4]],
- [['Thu Jul 29 16:39:41 GMT-09:08 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09:08',-9*3600-8*60,4]],
- [['Thu Jul 29 16:39:41 GMT-09:08:07 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09:08:07',-9*3600-8*60-7,4]],
- [['Thu Jul 29 16:39:41 GMT-3.5 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-3.5',-3*3600-30*60,4]],
- [['Thu Jul 29 16:39:41 GMT-3,5 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-3,5',-3*3600-30*60,4]],
- [['Thu Jul 29 16:39:41 Mountain Daylight Time 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'Mountain Daylight Time',-6*3600,4]],
- [['Thu Jul 29 16:39:41 E. Australia Standard Time 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'E. Australia Standard Time',10*3600,4]],
+ [['Thu Jul 29 16:39:41 EST 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'EST',-5*3600,4], __LINE__],
+ [['Thu Jul 29 16:39:41 MET DST 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'MET DST',2*3600,4], __LINE__],
+ [['Thu Jul 29 16:39:41 AMT 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'AMT',nil,4], __LINE__],
+ [['Thu Jul 29 16:39:41 AMT -1999', '%a %b %d %H:%M:%S %Z %Y'], [-1999,7,29,16,39,41,'AMT',nil,4], __LINE__],
+ [['Thu Jul 29 16:39:41 GMT+09 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+09',9*3600,4], __LINE__],
+ [['Thu Jul 29 16:39:41 GMT+0908 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+0908',9*3600+8*60,4], __LINE__],
+ [['Thu Jul 29 16:39:41 GMT+090807 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT+090807',9*3600+8*60+7,4], __LINE__],
+ [['Thu Jul 29 16:39:41 GMT-09 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09',-9*3600,4], __LINE__],
+ [['Thu Jul 29 16:39:41 GMT-09:08 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09:08',-9*3600-8*60,4], __LINE__],
+ [['Thu Jul 29 16:39:41 GMT-09:08:07 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-09:08:07',-9*3600-8*60-7,4], __LINE__],
+ [['Thu Jul 29 16:39:41 GMT-3.5 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-3.5',-3*3600-30*60,4], __LINE__],
+ [['Thu Jul 29 16:39:41 GMT-3,5 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'GMT-3,5',-3*3600-30*60,4], __LINE__],
+ [['Thu Jul 29 16:39:41 Mountain Daylight Time 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'Mountain Daylight Time',-6*3600,4], __LINE__],
+ [['Thu Jul 29 16:39:41 E. Australia Standard Time 1999', '%a %b %d %H:%M:%S %Z %Y'], [1999,7,29,16,39,41,'E. Australia Standard Time',10*3600,4], __LINE__],
# rfc822
- [['Thu, 29 Jul 1999 09:54:21 UT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'UT',0,4]],
- [['Thu, 29 Jul 1999 09:54:21 GMT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'GMT',0,4]],
- [['Thu, 29 Jul 1999 09:54:21 PDT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'PDT',-7*3600,4]],
- [['Thu, 29 Jul 1999 09:54:21 z', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'z',0,4]],
- [['Thu, 29 Jul 1999 09:54:21 +0900', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'+0900',9*3600,4]],
- [['Thu, 29 Jul 1999 09:54:21 +0430', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'+0430',4*3600+30*60,4]],
- [['Thu, 29 Jul 1999 09:54:21 -0430', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'-0430',-4*3600-30*60,4]],
- [['Thu, 29 Jul -1999 09:54:21 -0430', '%a, %d %b %Y %H:%M:%S %Z'], [-1999,7,29,9,54,21,'-0430',-4*3600-30*60,4]],
+ [['Thu, 29 Jul 1999 09:54:21 UT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'UT',0,4], __LINE__],
+ [['Thu, 29 Jul 1999 09:54:21 GMT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'GMT',0,4], __LINE__],
+ [['Thu, 29 Jul 1999 09:54:21 PDT', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'PDT',-7*3600,4], __LINE__],
+ [['Thu, 29 Jul 1999 09:54:21 z', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'z',0,4], __LINE__],
+ [['Thu, 29 Jul 1999 09:54:21 +0900', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'+0900',9*3600,4], __LINE__],
+ [['Thu, 29 Jul 1999 09:54:21 +0430', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'+0430',4*3600+30*60,4], __LINE__],
+ [['Thu, 29 Jul 1999 09:54:21 -0430', '%a, %d %b %Y %H:%M:%S %Z'], [1999,7,29,9,54,21,'-0430',-4*3600-30*60,4], __LINE__],
+ [['Thu, 29 Jul -1999 09:54:21 -0430', '%a, %d %b %Y %H:%M:%S %Z'], [-1999,7,29,9,54,21,'-0430',-4*3600-30*60,4], __LINE__],
# etc
- [['06-DEC-99', '%d-%b-%y'], [1999,12,6,nil,nil,nil,nil,nil,nil]],
- [['sUnDay oCtoBer 31 01', '%A %B %d %y'], [2001,10,31,nil,nil,nil,nil,nil,0]],
- [["October\t\n\v\f\r 15,\t\n\v\f\r99", '%B %d, %y'], [1999,10,15,nil,nil,nil,nil,nil,nil]],
- [["October\t\n\v\f\r 15,\t\n\v\f\r99", '%B%t%d,%n%y'], [1999,10,15,nil,nil,nil,nil,nil,nil]],
-
- [['09:02:11 AM', '%I:%M:%S %p'], [nil,nil,nil,9,2,11,nil,nil,nil]],
- [['09:02:11 A.M.', '%I:%M:%S %p'], [nil,nil,nil,9,2,11,nil,nil,nil]],
- [['09:02:11 PM', '%I:%M:%S %p'], [nil,nil,nil,21,2,11,nil,nil,nil]],
- [['09:02:11 P.M.', '%I:%M:%S %p'], [nil,nil,nil,21,2,11,nil,nil,nil]],
-
- [['12:33:44 AM', '%r'], [nil,nil,nil,0,33,44,nil,nil,nil]],
- [['01:33:44 AM', '%r'], [nil,nil,nil,1,33,44,nil,nil,nil]],
- [['11:33:44 AM', '%r'], [nil,nil,nil,11,33,44,nil,nil,nil]],
- [['12:33:44 PM', '%r'], [nil,nil,nil,12,33,44,nil,nil,nil]],
- [['01:33:44 PM', '%r'], [nil,nil,nil,13,33,44,nil,nil,nil]],
- [['11:33:44 PM', '%r'], [nil,nil,nil,23,33,44,nil,nil,nil]],
-
- [['11:33:44 PM AMT', '%I:%M:%S %p %Z'], [nil,nil,nil,23,33,44,'AMT',nil,nil]],
- [['11:33:44 P.M. AMT', '%I:%M:%S %p %Z'], [nil,nil,nil,23,33,44,'AMT',nil,nil]],
+ [['06-DEC-99', '%d-%b-%y'], [1999,12,6,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['sUnDay oCtoBer 31 01', '%A %B %d %y'], [2001,10,31,nil,nil,nil,nil,nil,0], __LINE__],
+ [["October\t\n\v\f\r 15,\t\n\v\f\r99", '%B %d, %y'], [1999,10,15,nil,nil,nil,nil,nil,nil], __LINE__],
+ [["October\t\n\v\f\r 15,\t\n\v\f\r99", '%B%t%d,%n%y'], [1999,10,15,nil,nil,nil,nil,nil,nil], __LINE__],
+
+ [['09:02:11 AM', '%I:%M:%S %p'], [nil,nil,nil,9,2,11,nil,nil,nil], __LINE__],
+ [['09:02:11 A.M.', '%I:%M:%S %p'], [nil,nil,nil,9,2,11,nil,nil,nil], __LINE__],
+ [['09:02:11 PM', '%I:%M:%S %p'], [nil,nil,nil,21,2,11,nil,nil,nil], __LINE__],
+ [['09:02:11 P.M.', '%I:%M:%S %p'], [nil,nil,nil,21,2,11,nil,nil,nil], __LINE__],
+
+ [['12:33:44 AM', '%r'], [nil,nil,nil,0,33,44,nil,nil,nil], __LINE__],
+ [['01:33:44 AM', '%r'], [nil,nil,nil,1,33,44,nil,nil,nil], __LINE__],
+ [['11:33:44 AM', '%r'], [nil,nil,nil,11,33,44,nil,nil,nil], __LINE__],
+ [['12:33:44 PM', '%r'], [nil,nil,nil,12,33,44,nil,nil,nil], __LINE__],
+ [['01:33:44 PM', '%r'], [nil,nil,nil,13,33,44,nil,nil,nil], __LINE__],
+ [['11:33:44 PM', '%r'], [nil,nil,nil,23,33,44,nil,nil,nil], __LINE__],
+
+ [['11:33:44 PM AMT', '%I:%M:%S %p %Z'], [nil,nil,nil,23,33,44,'AMT',nil,nil], __LINE__],
+ [['11:33:44 P.M. AMT', '%I:%M:%S %p %Z'], [nil,nil,nil,23,33,44,'AMT',nil,nil], __LINE__],
[['fri1feb034pm+5', '%a%d%b%y%H%p%Z'], [2003,2,1,16,nil,nil,'+5',5*3600,5]]
].each do |x, y|
@@ -191,45 +191,45 @@ def test__strptime__3
def test__strptime__width
[
- [['99', '%y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil]],
- [['01', '%y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil]],
- [['19 99', '%C %y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil]],
- [['20 01', '%C %y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil]],
- [['1999', '%C%y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil]],
- [['2001', '%C%y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil]],
-
- [['20060806', '%Y'], [20060806,nil,nil,nil,nil,nil,nil,nil,nil]],
- [['20060806', "%Y\s"], [20060806,nil,nil,nil,nil,nil,nil,nil,nil]],
- [['20060806', '%Y%m%d'], [2006,8,6,nil,nil,nil,nil,nil,nil]],
- [['2006908906', '%Y9%m9%d'], [2006,8,6,nil,nil,nil,nil,nil,nil]],
- [['12006 08 06', '%Y %m %d'], [12006,8,6,nil,nil,nil,nil,nil,nil]],
- [['12006-08-06', '%Y-%m-%d'], [12006,8,6,nil,nil,nil,nil,nil,nil]],
- [['200608 6', '%Y%m%e'], [2006,8,6,nil,nil,nil,nil,nil,nil]],
-
- [['2006333', '%Y%j'], [2006,-1,333,nil,nil,nil,nil,nil,nil]],
- [['20069333', '%Y9%j'], [2006,-1,333,nil,nil,nil,nil,nil,nil]],
- [['12006 333', '%Y %j'], [12006,-1,333,nil,nil,nil,nil,nil,nil]],
- [['12006-333', '%Y-%j'], [12006,-1,333,nil,nil,nil,nil,nil,nil]],
-
- [['232425', '%H%M%S'], [nil,nil,nil,23,24,25,nil,nil,nil]],
- [['23924925', '%H9%M9%S'], [nil,nil,nil,23,24,25,nil,nil,nil]],
- [['23 24 25', '%H %M %S'], [nil,nil,nil,23,24,25,nil,nil,nil]],
- [['23:24:25', '%H:%M:%S'], [nil,nil,nil,23,24,25,nil,nil,nil]],
- [[' 32425', '%k%M%S'], [nil,nil,nil,3,24,25,nil,nil,nil]],
- [[' 32425', '%l%M%S'], [nil,nil,nil,3,24,25,nil,nil,nil]],
-
- [['FriAug', '%a%b'], [nil,8,nil,nil,nil,nil,nil,nil,5]],
- [['FriAug', '%A%B'], [nil,8,nil,nil,nil,nil,nil,nil,5]],
- [['FridayAugust', '%A%B'], [nil,8,nil,nil,nil,nil,nil,nil,5]],
- [['FridayAugust', '%a%b'], [nil,8,nil,nil,nil,nil,nil,nil,5]]
- ].each do |x, y|
+ [['99', '%y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['01', '%y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['19 99', '%C %y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['20 01', '%C %y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['1999', '%C%y'], [1999,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2001', '%C%y'], [2001,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+
+ [['20060806', '%Y'], [20060806,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['20060806', "%Y\s"], [20060806,nil,nil,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['20060806', '%Y%m%d'], [2006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['2006908906', '%Y9%m9%d'], [2006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['12006 08 06', '%Y %m %d'], [12006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['12006-08-06', '%Y-%m-%d'], [12006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['200608 6', '%Y%m%e'], [2006,8,6,nil,nil,nil,nil,nil,nil], __LINE__],
+
+ [['2006333', '%Y%j'], [2006,-1,333,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['20069333', '%Y9%j'], [2006,-1,333,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['12006 333', '%Y %j'], [12006,-1,333,nil,nil,nil,nil,nil,nil], __LINE__],
+ [['12006-333', '%Y-%j'], [12006,-1,333,nil,nil,nil,nil,nil,nil], __LINE__],
+
+ [['232425', '%H%M%S'], [nil,nil,nil,23,24,25,nil,nil,nil], __LINE__],
+ [['23924925', '%H9%M9%S'], [nil,nil,nil,23,24,25,nil,nil,nil], __LINE__],
+ [['23 24 25', '%H %M %S'], [nil,nil,nil,23,24,25,nil,nil,nil], __LINE__],
+ [['23:24:25', '%H:%M:%S'], [nil,nil,nil,23,24,25,nil,nil,nil], __LINE__],
+ [[' 32425', '%k%M%S'], [nil,nil,nil,3,24,25,nil,nil,nil], __LINE__],
+ [[' 32425', '%l%M%S'], [nil,nil,nil,3,24,25,nil,nil,nil], __LINE__],
+
+ [['FriAug', '%a%b'], [nil,8,nil,nil,nil,nil,nil,nil,5], __LINE__],
+ [['FriAug', '%A%B'], [nil,8,nil,nil,nil,nil,nil,nil,5], __LINE__],
+ [['FridayAugust', '%A%B'], [nil,8,nil,nil,nil,nil,nil,nil,5], __LINE__],
+ [['FridayAugust', '%a%b'], [nil,8,nil,nil,nil,nil,nil,nil,5], __LINE__],
+ ].each do |x,y,l|
h = Date._strptime(*x)
- a = h.values_at(:year,:mon,:mday,:hour,:min,:sec,:zone,:offset,:wday)
+ a = (h || {}).values_at(:year,:mon,:mday,:hour,:min,:sec,:zone,:offset,:wday)
if y[1] == -1
a[1] = -1
a[2] = h[:yday]
end
- assert_equal(y, a, [x, y, a].inspect)
+ assert_equal(y, a, format('<failed at line %d>', l))
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.