diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-13 02:04:09 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-13 02:04:09 -0400 |
commit | f6b93a3f5a29c5262fb812fb03676124b355f013 (patch) | |
tree | 160adeb8acbd2597c3988d23964a1c9ef09e3505 /src/report.h | |
parent | c0fd8d5e152c910b64c8d3536864d033d4ac9ffc (diff) | |
download | ledger-f6b93a3f5a29c5262fb812fb03676124b355f013.tar.gz ledger-f6b93a3f5a29c5262fb812fb03676124b355f013.tar.bz2 ledger-f6b93a3f5a29c5262fb812fb03676124b355f013.zip |
Added a new valexpr function: format_date
This can be used to format dates with a specific pattern, such as:
format_date(entry.date, "%Y/%m/%d")
This is used by the print command to ensure that Ledger is able to parse
back what it prints.
Diffstat (limited to 'src/report.h')
-rw-r--r-- | src/report.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/report.h b/src/report.h index df1186ba..fd268c91 100644 --- a/src/report.h +++ b/src/report.h @@ -137,6 +137,7 @@ public: value_t fn_truncate(call_scope_t& scope); value_t fn_quoted(call_scope_t& scope); value_t fn_join(call_scope_t& scope); + value_t fn_format_date(call_scope_t& scope); value_t fn_options(call_scope_t& scope) { return value_t(static_cast<scope_t *>(this)); |