mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 10:17:35 +03:00
fix:timedot: accept numbers beginning with a decimal point again [#2130]
This commit is contained in:
parent
2cf83cd213
commit
aaf4a38161
@ -209,8 +209,8 @@ type Hours = Quantity
|
|||||||
-- (or empty string for none).
|
-- (or empty string for none).
|
||||||
durationsp :: TextParser m [(Hours,TagValue)]
|
durationsp :: TextParser m [(Hours,TagValue)]
|
||||||
durationsp =
|
durationsp =
|
||||||
(dotquantityp <&> \h -> [(h,"")])
|
(try numericquantityp <&> \h -> [(h,"")]) -- try needed because numbers can begin with .
|
||||||
<|> (numericquantityp <&> \h -> [(h,"")])
|
<|> (dotquantityp <&> \h -> [(h,"")])
|
||||||
<|> letterquantitiesp
|
<|> letterquantitiesp
|
||||||
<|> pure [(0,"")]
|
<|> pure [(0,"")]
|
||||||
|
|
||||||
|
@ -57,17 +57,25 @@ $ hledger -ftimedot:- reg -w80
|
|||||||
$ hledger -ftimedot:- reg -w80 tag:posting-tag --alias fos:haskell=λ
|
$ hledger -ftimedot:- reg -w80 tag:posting-tag --alias fos:haskell=λ
|
||||||
2023-01-01 different transac.. (λ) 1.00 1.00
|
2023-01-01 different transac.. (λ) 1.00 1.00
|
||||||
|
|
||||||
# ** 4. Each of these formats is printed as exactly a quarter hour.
|
# ** 4. Each of these formats is parsed as exactly 0.25.
|
||||||
<
|
<
|
||||||
2023-01-01
|
2023-01-01
|
||||||
a .
|
a .
|
||||||
b 0.25
|
b 0.25
|
||||||
c 15m
|
c .25
|
||||||
|
d 0,25
|
||||||
|
e ,25
|
||||||
|
f 15m
|
||||||
|
g 0.25h
|
||||||
|
|
||||||
$ hledger -ftimedot:- print
|
$ hledger -ftimedot:- print
|
||||||
2023-01-01 *
|
2023-01-01 *
|
||||||
(a) 0.25
|
(a) 0.25
|
||||||
(b) 0.25
|
(b) 0.25
|
||||||
(c) 0.25
|
(c) 0.25
|
||||||
|
(d) 0.25
|
||||||
|
(e) 0.25
|
||||||
|
(f) 0.25
|
||||||
|
(g) 0.25
|
||||||
|
|
||||||
>=
|
>=
|
||||||
|
Loading…
Reference in New Issue
Block a user