imp: journal: accept apply year as another synonym for Y (ledger compat)
This commit is contained in:
parent
2357a7a750
commit
c58b9e6ac9
@ -598,7 +598,7 @@ payeedirectivep = do
|
|||||||
|
|
||||||
defaultyeardirectivep :: JournalParser m ()
|
defaultyeardirectivep :: JournalParser m ()
|
||||||
defaultyeardirectivep = do
|
defaultyeardirectivep = do
|
||||||
(string "Y" <|> string "year") <?> "default year"
|
(string "Y" <|> string "year" <|> string "apply year") <?> "default year"
|
||||||
lift skipNonNewlineSpaces
|
lift skipNonNewlineSpaces
|
||||||
setYear =<< lift yearp
|
setYear =<< lift yearp
|
||||||
|
|
||||||
|
|||||||
@ -2641,7 +2641,7 @@ and less trustworthy in an audit.
|
|||||||
### Default year
|
### Default year
|
||||||
|
|
||||||
You can set a default year to be used for subsequent dates which don't
|
You can set a default year to be used for subsequent dates which don't
|
||||||
specify a year. This is a line beginning with `Y` or `year` followed by the year. Eg:
|
specify a year. This is a line beginning with `Y` (or `year` or `apply year`) followed by the year. Eg:
|
||||||
|
|
||||||
```journal
|
```journal
|
||||||
Y2009 ; set default year to 2009
|
Y2009 ; set default year to 2009
|
||||||
|
|||||||
@ -24,11 +24,15 @@ Y 1111
|
|||||||
1/1
|
1/1
|
||||||
year 2222
|
year 2222
|
||||||
2/2
|
2/2
|
||||||
|
apply year 3333
|
||||||
|
3/3
|
||||||
$ hledger -f- print
|
$ hledger -f- print
|
||||||
1111-01-01
|
1111-01-01
|
||||||
|
|
||||||
2222-02-02
|
2222-02-02
|
||||||
|
|
||||||
|
3333-03-03
|
||||||
|
|
||||||
>=
|
>=
|
||||||
|
|
||||||
# Legacy ! and @ prefixes are accepted.
|
# Legacy ! and @ prefixes are accepted.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user