Commit graph

61 commits

Author SHA1 Message Date
Alexis Hildebrandt
d5e1308d07 [ledger] Remove --cache option
and all boost serialisation related code.
2015-02-18 21:50:34 +01:00
Alexis Hildebrandt
1dd9dcaab4 Bump copyright notice to 2015
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}/"
2014-12-27 11:24:55 +01:00
Joe Gallo
d5592ea1e3 #if guards for boost 1.56 compatibility 2014-08-28 11:04:55 -04:00
John Wiegley
948f5fea28 Revert "fix "no viable conversion from ... to 'bool'""
This reverts commit df9ae3ab9b.
2014-08-27 11:56:14 -05:00
Joe Gallo
df9ae3ab9b fix "no viable conversion from ... to 'bool'" 2014-08-26 09:07:57 -04:00
Alexis Hildebrandt
2b9208e850 Bump copyright information to 2014 2014-02-02 12:36:22 +01:00
Johann Klähn
a875940a93 fix ledger xml output, remove ledger json command
As the format used by property trees to represent valid JSON
and that for valid XML is too different and given that there are
more requests for valid XML output I decided to pursue a quick fix
and remove the json command in favor of a working xml command.

See bug #782, #909, recent discussion on mailing list.

JSON support is postponed until I or someone else finds time to work on
this or the python bindings are more stable.
2013-03-08 22:56:01 +01:00
John Wiegley
0951bcebef Bump copyright information to 2013 2013-02-18 06:51:21 -06:00
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
a38ed141c1 Switched to Boost.PropertyTree for XML generation 2012-05-18 01:31:01 -06:00
John Wiegley
22505d9527 Always call TRACE_CTOR at the end of constructors 2012-03-20 02:10:40 -05:00
John Wiegley
e7de77d8df Added #if's for building optimized with Clang 2012-03-07 14:30:34 -06:00
John Wiegley
71d0033b6f Corrected several compile and link problems 2012-03-06 23:04:27 -06:00
John Wiegley
e2afc783db Increased file copyrights to 2012 2012-02-29 22:32:23 -06:00
John Wiegley
6adfcc8469 Rewrite the way interval reports are generated 2012-02-28 02:34:37 -06:00
John Wiegley
fc62402c60 Fixed nasty problem related to interval reporting 2012-02-28 00:08:39 -06:00
John Wiegley
a19b541dd9 Removed unneeded default cases 2012-02-17 15:15:32 -06:00
John Wiegley
f0791bbd72 Cleanup whitespace 2011-08-18 14:48:38 -04:00
John Wiegley
26a94fb1ed The notions of "now" and "today" now use local time 2010-06-22 17:19:35 -04:00
John Wiegley
dcffd218a1 Revised how Ledger handles the "current year"
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.
2010-06-14 03:23:09 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
7548c7fe2c Corrected a typename visibility issue 2010-06-06 03:26:31 -04:00
John Wiegley
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
97122cf1f7 Wasn't serializing date_range_t::end_inclusive member 2009-11-18 16:44:07 -05:00
John Wiegley
e4b3f0bb3a The new period parser is passing all tests 2009-11-18 05:45:48 -05:00
John Wiegley
7fe369eb49 The new period parser is implemented, but untested 2009-11-18 04:11:14 -05:00
John Wiegley
fe9af7ace7 Added a "range" member to date_interval_t
This is used to define the beginning/ending ranges of the time period,
before it becomes fixed (by calling stabilize()) and then sets the
values of start and end.
2009-11-18 01:28:01 -05:00
John Wiegley
3e91c3bf2c Added several new types for working with dates and ranges
date_specifier_t ::
    This is like a plain date_t, except it knows what wasn't specified.
    For example, if 2008/06 is parsed, it becomes date_specifier_t which
    knows that no day was given.  If you ask for the begin() date of the
    specifier, it will be 2008/06/01; the end() date (which is
    exclusive) will be 2008/07/01.

  date_range_t ::
    A date range is a range of two specifiers, either of which (but not
    both) may be omitted.  This makes it possible to represent
    expressions like "from june to july", where no day or year is given.
    The exact dates will be inferred by using the current year, and
    fixing the range from YEAR/06/01 to YEAR/07/01.  That is, the range
    goes from the begin() of one date specifier to the begin() of the
    other.

  date_specifier_or_range_t ::
    A variadic type that can be either a date_specifier_t or a
    date_range_t.  It's just a wrapper to represent the fact that ranges
    can be implicit via specifiers (such as, "in june"), or explicit via
    ranges ("since 2008").
2009-11-17 22:23:46 -05:00
John Wiegley
d6cb382b20 Moved date_interval_t::duration_t to date_duration_t 2009-11-17 22:12:17 -05:00
John Wiegley
a866f39210 Added a date_traits_t type 2009-11-17 22:03:32 -05:00
John Wiegley
c28d828d8e Renamed date_interval_t::end to finish 2009-11-17 21:51:51 -05:00
John Wiegley
2986bc779e Stylistic change: assert(0) -> assert(false) 2009-11-13 01:48:32 -05:00
John Wiegley
6cdb79e2a6 XML reporting now works via the "xml" command 2009-11-09 03:42:35 -05:00
John Wiegley
2c80227339 Added basic foundation for XML reporting 2009-11-09 02:17:26 -05:00
John Wiegley
b14c814fec Whitespace fix 2009-11-04 20:40:42 -05:00
John Wiegley
a757b19f51 Added serialization methods for most type
This allows journal_t objects to be completed serialized to disk and
deserialized.
2009-10-30 18:06:37 -04:00
John Wiegley
3a9b7df4e5 date_interval_t now uses a duration_t object
This is instead of using boost::variant.
2009-10-30 18:03:26 -04:00
John Wiegley
cc532c31aa Added TRUE_CURRENT_TIME() macro
Because CURRENT_TIME() can now be a past date if --now is used.
2009-10-28 01:17:54 -04:00
John Wiegley
ab433d28e0 Support a --now option, for testing purposes
This sets Ledger's notion of the "current time" to the given date.  This
makes it possible to have stable output from budgeting and forecasting
reports, for the sake of baseline tests.
2009-10-27 21:32:55 -04:00
John Wiegley
fc84eeb358 Rewrote the way date and time I/O is managed 2009-10-25 05:01:47 -04:00
John Wiegley
f161aea8ce Removed reliance on strptime/strftime
The code now uses Boost's input and output facets for times and dates.
This ensures completely consistency regarding timezones and times, and
fixes the regression test that was broken while I was away coding in
London (where it was GMT-0 and I didn't notice the difference between
local and GMT).
2009-10-11 05:19:01 -04:00
John Wiegley
475014a14b Added some missing casts, upgraded to Boost 1.40 2009-10-09 19:50:23 -04:00
John Wiegley
dda7c3a58a Rewrote the date interval parser/stepper
The new implementation uses boost::gregorian::date_duration objects,
rather than manually stepping.
2009-03-23 01:22:26 -04:00
John Wiegley
f1523b5464 The new code is working now. 2009-03-16 03:44:27 -04:00
John Wiegley
585b3a246d Added feature to "align" the interval's start date 2009-03-15 23:51:46 -04:00
John Wiegley
a05353e269 First iteration of the new date_interval_t rewrite 2009-03-15 22:39:44 -04:00
John Wiegley
0de43f483b Started breaking up interval_t into range_t 2009-03-15 22:39:44 -04:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
a93111470d Greatly improved the way "weeks" are iterated 2009-02-21 02:10:02 -04:00
John Wiegley
388044dec9 Fixed the way interval_t objects are initialized 2009-02-14 04:27:15 -04:00