| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
fix https://github.com/ledger/ledger/issues/2338
fix https://github.com/ledger/ledger/issues/2340
|
| |
|
|
|
|
| |
[skip ci]
|
| |
|
|
|
|
|
|
|
|
| |
This makes it safe to compare results to -1 to indicate EOF,
regardless of whether char is considered signed or unsigned;
and so eliminates compiler warnings on platforms such as ARM.
Fixes bug #2058.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I expect an output of `ledger print` to be consumable by ledger.
But on the next journal
```
2019/11/25 * test
Foo 1 AAPL {1.00 EUR} [2019/11/24]
Bar
```
it prints [19-Nov-24], which it does not understand with default
options.
With this patch it prints [2019/11/24].
|
|
|
|
|
|
|
|
|
| |
'%F' is equivalent to '%Y-%m-%d'. Using the '%F' format without this
change this would not give any hard errors but instead give dates with
wrong years because the 'has_year' trait would not be correctly
detected and thus parsed dates would get set to the current year.
Fixes #1775
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible to create a stack overflow by giving a date that is
longer than the buffer that is used during date parsing because the
length of the input string is not checked. The `VERIFY` macro is only
enabled when debug-mode is enabled and the `--verify-memory` argument is
used.
Prevent the issue by always checking the input string length and
discarding dates that does not fit in the buffer as invalid.
This issue has been assigned CVE-2017-12482.
Fixes #1224
|
|
|
|
|
| |
The code can be accessed by Git history and reused in a branch if
necessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes #1626.
The tokenizer eagerly classifies 4-digit integers as TOK_A_YEAR
tokens. In some contexts such as "every 1000 years", this causes
errors.
I think the tokenizer does not have enough information available to
distinguish between integers and years.
After this patch, the tokenizer will always classify integers as
TOK_INT tokens. The "has 4 digits" heuristic to determine if an
integer is a year is moved to the place where it's actually
needed (and it can be slightly more generic there, too).
|
|
|
|
| |
[ci skip]
|
|
|
|
| |
[ci skip]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Appveyor is a continuous integration platform for Windows that is free for open source projects. See latest test build here: https://ci.appveyor.com/project/Evan/ledger/build/artifacts
* Changed WIN32 to _WIN32 because this article http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system claims that it is defined by the greatest number of compilers.
* Modified HAVE_ISATTY and other system defines so that system.hh compiles when cmake fails to find the relevant function.
* Add missing include in test/unit/t_value.cc
Almost all tests fail when you run them on msys32. I will address that in a future PR.
|
|
|
|
|
|
|
|
| |
weeks - calculate start date for finding period using remainer 400/periodlength to reduce number of iterations (perhaps this ought to follow the same conventio as years months and quarters)
add sample period command tests
add add day period tests for forecasts and budgets
add week period tests for forecasts and budgets - these do not change
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
| |
The following script makes it a no-brainer:
% NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \
| xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
|
|
|
|
|
|
|
|
| |
Dates specified via --begin and --end are converted to a value expression
using an ISO 8601 (yyyy-mm-dd) date, but this date was not recognized by
ledger.
Bug fix for #1072
|
|
|
|
| |
Bug fix for #1074, a regression introduced by the fix for bug #375
|
|
|
|
| |
Bug fix for #375
|
| |
|
|
|
|
| |
Includes an implementation of strptime, compiled only for Win32 platform.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #650
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This is to support reading of Timelog files.
|
|
|
|
|
| |
Things like "since last month" and "4 weeks ago", and "since 4 weeks
ago" are now all working.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Now when the Y directive sets the current year for a region, it affects
everything, as if the clock really were set back to that year.
|
|
|
|
| |
This broke the meaning of -p "this month".
|