Commit graph

82 commits

Author SHA1 Message Date
Paul Beckingham
3a8a513d17 Date Support
- Added Date::week helper method.
2013-08-26 09:15:48 -07:00
Paul Beckingham
d03c4cda8a Build Error
- Many files were missing an explicit cmake.h include.  Some were not including
  it at all.  Now it's used almost everywhere.

(cherry picked from commit 82ae86979c497e6d1d0c6b2b5a55aa379ec82c98)
2013-06-02 13:57:36 -04:00
Paul Beckingham
a1132f0028 Code Cleanup
- Cmake was not updating HAVE_ST_BIRTHTIME.
- NIBBLER_FEATURE_DATE was not properly applied everywhere.
- FEATURE_COLOR was not properly set.
- Some source files failed to include cmake.h, and therefore were not properly
- Removed inefficient use of std::string::substr for guaranteed single character
  strings.
- Integrated Directory::cd.
- Integrated File::ctime, ::btime.
- Integrated Path::operator+.
- Integrated Nibbler::getDigit{2,4,6}.
- Integrated HighResTimer.
  enabling/disabling code.
- All Path objects now expanded internally to absolute form.
- Modified unit tests to accomodate absolute paths.
- Merged new nibbler.t.cpp tests.
- Made various methods const.
- Includes removed from some files, added to others.
2013-05-05 08:33:52 -04:00
Paul Beckingham
773b55d374 Code Cleanup
- Removed L10N define.  It served its purpose.
2013-04-07 23:50:51 -04:00
Paul Beckingham
656e350291 Date Formatting
- Some bad inefficiencies in date formatting were noticed, and when addressed,
  caused a bug to surface.  The length of a formatted date can be calculated
  from the dateformat, but was done incorrectly.  Very, very incorrectly.
- Added unit tests.
- Promoted date column-specific "countdown" size measurements up to the ColDate
  base class.  This neatly falls out from work on #1218.
- Noted a potential I18N problem in Date.cpp.
2013-04-01 20:01:54 -04:00
Paul Beckingham
1dccd29643 Copyright 2013
- Updated copyright notices.
2013-03-04 17:47:12 -05:00
Paul Beckingham
cfac0c42e8 Dates
+ Fixed bug with 'socm' date calculation that failed on some days, by
  simplifying the implementation.
2012-12-31 08:48:57 -05:00
Paul Beckingham
4e03832b68 Feature #1039
- Added Feature #1039, which adds new date shortcuts, 'socm' and 'eocm',
  meaning start and end of current month (thanks to Thomas Sullivan,
  Louis-Claude Canon).
2012-12-01 14:22:09 -05:00
Louis-Claude Canon
ec330921de Code Cleanup
- Factorize code for parsing date elements.
- Better order of blocks for parsing date elements.
- Add corresponding minimal-digit date parsing method for reading seconds,
  minutes and week.
- Update documentation and test.
2012-08-02 00:11:12 -04:00
Louis-Claude Canon
384be4b249 Code Cleanup
- Remove the code related to the format "day of year" (number of day starting
  from the January 1) as mktime does not allow to specify it with the field
  tm_yday.
- Cleaner check of the date (everything is done by Date::valid).
- Correct hour, minute and second is also checked.
2012-08-02 00:04:07 -04:00
Louis-Claude Canon
b5cd5ea188 Enhancement
- Allows relative dates such as "1st" to be entered with capital ("1ST").
2012-08-01 23:59:55 -04:00
Paul Beckingham
873376c287 Performance improvements:
- Added parse-free convenience functions
2012-05-05 13:28:02 -04:00
Paul Beckingham
2c07837852 Bug
- Fixed bug where ISO dates were parsed and the TZ was modified, which should
  have no bearing on a Zulu time.
2012-04-09 00:16:09 -04:00
Paul Beckingham
412396d35b Code Cleanup
- Removed restriction on waiting recurring tasks.
- Removed unused L10N string.
- Removed unnecessary include.
2012-02-05 10:08:10 -05:00
Paul Beckingham
6145f2d4a8 Typo
- Fixed typo in L10N name month names.
2012-01-22 14:41:00 -05:00
Paul Beckingham
6580095002 Copyright
- Year change.
2012-01-02 23:32:10 -05:00
Federico Hernandez
8116c6a103 License
- moving task from GPL to MIT license
  top level src directory
2011-10-08 00:04:01 +02:00
Paul Beckingham
83081c87bd I18N
- Localized 'calendar' command.
- Localized Date object, somewhat.
2011-10-02 23:08:23 -04:00
Paul Beckingham
965e15fe91 Bug #831
- Fixed bug #831 that imposed an arbitrary and incorrect assumption that
  caused some date fields from being parsed properly.
2011-09-20 23:58:33 -04:00
Federico Hernandez
4083883ec4 Feature #813
- applied patch for eoq and soq (thanks to Paulo Almeida)
2011-09-03 16:38:26 +02:00
Paul Beckingham
dab06f8672 Code Cleanup
- All objects now use the same convention for naming members.  The
  consistency is a good thing.
2011-08-25 21:54:28 -04:00
Federico Hernandez
6e1ba161b1 Relative dates
- eoq and soq to refer to the end and start of the quarter
  (thanks to David French)
2011-08-04 01:40:31 +02:00
Paul Beckingham
d167842e36 Date
- Implemented Date::get_relatives to retrieve a list of all the supported
  relative date constructs.
2011-07-24 23:34:15 -04:00
Paul Beckingham
197524a5fc Expression
- Added configurable 'abbreviation.minimum' (default:2) setting to
  control how auto-completion works.
2011-07-20 10:51:13 -04:00
Paul Beckingham
27a04b29f5 Feature #800
- Added feature #800, adding a new command 'columns' that lists all the columns
  available for custom reports, and includes their formatting options (thanks
  to T. Charles Yun).
2011-07-16 13:08:23 -04:00
Paul Beckingham
37edd06027 I18N
- Localized more files.
2011-06-26 14:41:59 -04:00
Paul Beckingham
a749f83da3 Parsing
- Nibbler learned how to parse formtted dates.  Date now uses Nibbler.
- Added Nibbler unit tests.
2011-06-12 13:59:25 -04:00
Paul Beckingham
236738c708 Date Processing
- Dates now support 'j' and 'J' julian day format.
2011-06-12 13:23:13 -04:00
Paul Beckingham
8fabffe18c Code Cleanup
- Eliminated '#include "x"' by changing all to '#include <x>'.
2011-05-28 00:19:59 -04:00
Paul Beckingham
28b0960015 View
- Implemented 'description.default', 'description.count', and
  'description.oneline'.
- New 'indent.annotation' for the 'description.default' field format.
2011-05-04 23:15:17 -04:00
Paul Beckingham
27752bd510 Date
- Implemented Date::dayOfYear which yields a number, 1 to 366.
2011-05-02 22:13:15 -04:00
Federico Hernandez
0cac03ad4a Feature #638
- added worded dates "later" and "someday" to enable the hiding of
  a task until doomsday.
2011-01-18 02:21:00 +01:00
Paul Beckingham
7ca51e78f0 Feature - enhanced date parse error
- When a date fails to parse, the expected format is displayed, as a reminder
  (thanks to Eric Fluger).
2011-01-14 22:56:52 -05:00
Paul Beckingham
462caf5bd4 Copyright
- Updated copyright to 2011.
2010-12-31 22:03:05 -05:00
Paul Beckingham
652b7d9c8d Burndown Chart
- Implemented burndown.daily, which is functional, but has outstanding
  problems that need to be addressed:
    - Slow
    - Does not optimize output (i.e. contains /\S\s+$/)
    - Needs generalized helper functions to reduce the size of the handler
2010-11-21 00:28:34 -05:00
Paul Beckingham
125058093f Dates
- Added Date::startof{Day,Week,Month,Year} methods to facilitate the
  history, ghistory and burndown charts.
2010-11-15 11:43:21 -05:00
Paul Beckingham
44fe227595 Product Name Change
- Converted all (appropriate) uses of 'task' to 'taskwarrior'.
2010-08-21 12:31:00 -04:00
Paul Beckingham
d0db821298 Bug 452 - Need relative date value 'now' to fully support times
- Added 'now' as a relative date.
- Modified 'overdue' report to use 'now' instead of 'today' as the
  distinction between due and overdue.
2010-07-30 22:50:20 -04:00
Federico Hernandez
903b5b34d4 Feature #446 - start of {week, month, year}
- Bug fix for som and soy.
- Added synonyms soww and eoww for sow and eow.
- Added start/end of calendar week: socw and eocw.
2010-07-28 18:07:09 +02:00
Federico Hernandez
96bd3ff8db Feature #446 - start of {week, month, year}
- Added sow (depending on rc.weekstart), som and soy as possible
  dates (similar to eow, eom and eoy).
2010-07-28 00:15:26 +02:00
Paul Beckingham
cb4fe4fffb Enhancement - Date::operator-
- Implemented Date::operator-, to allow subtractions of Durations.
2010-07-25 22:02:41 -04:00
Paul Beckingham
e34f278e1d Documentation
- Commented the code to suggest that T and Z should never be used in
  Date::Date.
2010-07-20 17:36:24 -07:00
Paul Beckingham
1a34a29b7a Bug #438 - Reports sorting by end_time, start_time, and entry_time are ordered incorrectly
- Fixed bug #438, correcting the sorting of the entry_time, start_time
  and end_time columns (thanks to Michelle Crane).
- Reordered ChangeLog so that bugs, features are in sequence.  Don't know
  why I did this.  Some inner compulsion.
- Deprecated silly start_time, end_time and entry_time columns, which are
  now (and were) superseded by start, end and entry columns with time formats.
- Config.cpp now detects use of these deprecated fields and complains to the
  show command.
- Date.cpp now uses the variable 'input' instead of 'mdy', which was confusing
  and implied that it contained a date without a time.
- Obsoleted and removed Date::toStringWithTime, which ignored requested formats.
- When checking for an epoch, Date::isEpoch just looked for strings of more
  than 8 digits.  The additional restriction of less than or equal to 10 digits
  was added.  This was breaking unit tests using the dateformat YMDHNS, which is
  reasonable.
- Removed the obsolete field format hooks format-entry_time, format-start_time
  and format-end_time
- Removed the obsolete field format hook unit tests hook.format-entry_time.t,
  hook.format-start_time.t and hook.format-end_time.t.
- Removed use of deprecated field in hook.format-countdown_compact.t.
- Added missing shortcut comparisons in Table::sort that was causing an
  unnecessary full parse of dates even if they were identical as strings.
- Coded entry_time as a synonym for entry.  Ditto for start_time and end_time.
- Marked the new synonyms as deprecated.
- Added bug.438.t unit test.
- Added deprecated fields to the NEWS file.
2010-07-20 16:57:41 -07:00
Paul Beckingham
3c2987f53f Bug #416 - Sorting by due date with dateformat MD wrong
- Fixed bug #416, which caused sorting on a date to fail if the year was not
  included in the dateformat (thanks to Michelle Crane).
- Added unit tests.
2010-06-25 09:09:20 -04:00
Paul Beckingham
3ef6aa9f8e Enhancement - Date::toISO
- Added ISO date format support (19980119T070000Z) to Date class, for use
  in export.ical.
- Added unit test.
2010-05-31 13:18:41 -04:00
Paul Beckingham
a31e9a5a3c Bug Fix - #404
- Refixed #404 that got lost in a recent merge.
2010-05-11 23:52:12 -04:00
Federico Hernandez
8553811889 Automatic computation of easter and related holidays for the calendar 2010-05-11 00:01:17 +02:00
Paul Beckingham
89267846ca Bug Fix - #404 Compile error on current archlinux
- Applied patch sent by Johannes Schlatow to fix build on Arch Linux.
2010-05-09 18:30:12 -04:00
Federico Hernandez
d3628c04db Made easter algorithm static in Date 2010-03-23 02:51:31 +01:00
Federico Hernandez
10450963cb Eeaster algorithm 2010-03-23 02:13:35 +01:00