diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-07 10:27:21 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:39 -0400 |
commit | d8498372037a4d0c272547ae48046b2182bcd4b1 (patch) | |
tree | ea3f228c5b6b20d71456e47a418e383669925d5f /src/report.cc | |
parent | a71d48881e538630aa1d147d58365da84e6db91f (diff) | |
download | fork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.tar.gz fork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.tar.bz2 fork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.zip |
Major restructuring of the value_t class.
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/report.cc b/src/report.cc index 95db80b4..4e90f680 100644 --- a/src/report.cc +++ b/src/report.cc @@ -51,16 +51,16 @@ void report_t::abbrev(value_t& result, xml::xpath_t::scope_t * locals) if (locals->args.size() < 2) throw_(std::logic_error, "usage: abbrev(STRING, WIDTH [, STYLE, ABBREV_LEN])"); - string str = locals->args[0].to_string(); + string str = locals->args[0].as_string(); long wid = locals->args[1]; elision_style_t style = session->elision_style; if (locals->args.size() == 3) - style = (elision_style_t)locals->args[2].to_long(); + style = (elision_style_t)locals->args[2].as_long(); long abbrev_len = session->abbrev_length; if (locals->args.size() == 4) - abbrev_len = locals->args[3].to_long(); + abbrev_len = locals->args[3].as_long(); result.set_string(abbreviate(str, wid, style, true, (int)abbrev_len)); } @@ -70,17 +70,17 @@ void report_t::ftime(value_t&, xml::xpath_t::scope_t * locals) if (locals->args.size() < 1) throw_(std::logic_error, "usage: ftime(DATE [, DATE_FORMAT])"); - moment_t date = locals->args[0].to_datetime(); + moment_t date = locals->args[0].as_datetime(); string date_format; if (locals->args.size() == 2) - date_format = locals->args[1].to_string(); + date_format = locals->args[1].as_string(); #if 0 // jww (2007-04-18): Need to setup an output facet here else date_format = moment_t::output_format; - result.set_string(date.to_string(date_format)); + result.set_string(date.as_string(date_format)); #endif } |