Source

ISO 8601 parser/unparser / testparser.sh.in

Full commit
boredzo a17edcd 

boredzo 30fb998 
boredzo a17edcd 


































































boredzo 30fb998 
boredzo a17edcd 

boredzo 30fb998 
boredzo a17edcd 
boredzo 30fb998 
boredzo a17edcd 
boredzo 30fb998 
boredzo a17edcd 
boredzo 30fb998 
boredzo a17edcd 
boredzo 30fb998 
boredzo a17edcd 

boredzo 30fb998 
boredzo a17edcd 







boredzo 30fb998 
boredzo a17edcd 




boredzo 30fb998 
boredzo a17edcd 










boredzo 30fb998 
boredzo a17edcd 




















#Tests with a date only
./testparser 2006-02-24 \
2006-12 \
2006 \
2006- \
2006-02- \
2006-0224 \
200602-24 \
20060224 \
2001-W1-1 \
2002-W1-1 \
2003-W1-1 \
2004-W1-1 \
2010-W1-1 \
2000-W1-1 \
2006-W1-1 \
2006-W1-2 \
2006-W02 \
2006-W2 \
2006-W02-01 \
2006-W02-1 \
2006-W2-01 \
2006-W2-1 \
2006-W2-2 \
2006-W2-8 \
2006-W3-1 \
2006-W22 \
2006-W22-11 \
06-02-24 \
06-12 \
06-02- \
06-0224 \
0602-24 \
060224 \
06-W22 \
06-W2 \
06-W22-11 \
06-W2-1 \
-6-02-24 \
-6-12 \
-6 \
-6- \
-6-02- \
-6-0224 \
-602-24 \
-6-W22 \
-6-W2 \
-6-W22-11 \
-6-W2-1 \
--0224 \
--02-24 \
--2-24 \
--02-2 \
--02 \
---24 \
-W2 \
-W2-11 \
-W-3 \
--W-3 \
2006-001 \
2006-002 \
2006-055 \
2006-365 \
2004-001 \
2004-366 \
-055 \
--055 \
2006T
#Current year in x century
./testparser 20 \
1
#x year in current century
./testparser -06
#x year and month in current century
./testparser -06-02
#x year, month, and date in current century
./testparser 06-02-24
#x month and date in current year
./testparser --02-24
#x date in current year and month
./testparser ---24

#Tests with a time only
./testparser T22:63:24-11:21 \
T22:63:24+50:70 \
T22:1:2 \
T22:1Z \
T22: \
T22 \
T2 \
T2:2:2
#Tests with both a date and a time
./testparser 2006-02-24T02:43:24 \
2006-02-24T22:43:24 \
2006-02-24T22:63:24 \
2006-12T12:34 \
2006T22
#Tests with a date, a time, and a time zone
./testparser 2006-02-24T22:63:24-01:00 \
2006-02-24T22:63:24Z      \
2006-02-24T22:63:24-1 \
2006-02-24T22:63:24-01 \
2006-02-24T22:63:24-01:32 \
2006-02-24T22:63:24-01:0  \
2006-02-24T22:63:24-01:00 \
2006-02-24T22:63:24-01:01 \
2006-02-24T22:63:24-01:11 \
2006-02-24T22:63:24-11:21

#Invalid dates
./testparser '' \
T \
2006-W \
2006-366 \
2006-400 \
2004-367 \
-2006-02-24T02:43:24 \
-2006-02-24T22:43:24 \
-2006-02-24T22:63:24 \
-2006-12T12:34 \
-2006T22 \
-60224 \
--2006-02-24T02:43:24 \
--2006-02-24T22:43:24 \
--2006-02-24T22:63:24 \
--2006-12T12:34 \
--2006T22 \
---2006-02-24T02:43:24 \
---2006-02-24T22:43:24 \
---2006-02-24T22:63:24 \
---2006-12T12:34 \
---2006T22