mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-27 20:36:07 +03:00
38 lines
511 B
Plaintext
38 lines
511 B
Plaintext
# invalid dates should be rejected
|
|
# 1. valid month and day, but flipped
|
|
hledgerdev -f- print
|
|
<<<
|
|
2010/31/12 x
|
|
a 1
|
|
b
|
|
>>>2 /bad date/
|
|
>>>= 1
|
|
# 2. too-large day
|
|
hledgerdev -f- print
|
|
<<<
|
|
2010/12/32 x
|
|
a 1
|
|
b
|
|
>>>2 /bad date/
|
|
>>>= 1
|
|
# 3. 29th feb on leap year should be ok
|
|
hledgerdev -f- print
|
|
<<<
|
|
2000/2/29 x
|
|
a 1
|
|
b
|
|
>>>
|
|
2000/02/29 x
|
|
a 1
|
|
b -1
|
|
|
|
>>>= 0
|
|
# 4. 29th feb on non-leap year should fail
|
|
hledgerdev -f- print
|
|
<<<
|
|
2001/2/29 x
|
|
a 1
|
|
b
|
|
>>>2 /bad date/
|
|
>>>= 1
|