hledger/tests/parse-dates.test

35 lines
480 B
Plaintext
Raw Normal View History

# dates with bad month or day numbers should be rejected
2010-05-22 04:52:45 +04:00
bin/hledger -f- print
<<<
2010/31/12 x
a 1
b
>>>2 /bad month number: 31/
>>>= 1
2010-05-22 04:52:45 +04:00
bin/hledger -f- print
<<<
2010/12/32 x
a 1
b
>>>2 /bad day number: 32/
>>>= 1
# 29th feb on leap year
bin/hledger -f- print
<<<
2010/2/29 x
a 1
b
>>>
2010/02/29 x
a 1
b -1
>>>= 0
# 29th feb on non-leap yeap
bin/hledger -f- print
<<<
2011/2/29 x
a 1
b
>>>2 /bad day number: 29/
>>>= 1