- TW-1265 cannot add UDA with underscore (thanks to Jakub Wilk).
- Added unit tests for TW-1265.
- Added ChangeLog and AUTHOR entries for other fixed issues.
- 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.
- 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.
- Undefined variables are put to today in dates (if year and month is not
specified, the current ones are considered). But if a global ones is
specified, lower one are put to their default values (0 or 1).
- Fixed a bug that caused a commond dateformat (YDM-HN) to be misinterpreted
as a UUID. Solution is to increase minimum partial UUID length from 9 to
14.
- Added portable implementation of timegm for non GNU/BSD platforms that
don't have their own implementation
- Removed the use of tm_gmtoff on non GNU/BSD platforms that don't have
it as part of the tm struct in time.h
- Added CMake tests HAVE_TIMEGM and HAVE_TM_GMTOFF
- Fixed bug #995, which mis-parsed UUIDs in filters as other elements (thanks
to Bryce Harrington).
- Nibbler no longer permits 8-character UUID abbreviations, because too often
they resemble other forms, such as '1111111d' which looks like a duration.
- Modified unit tests accordingly.
- Backslashes actually. The escaping mechanism in the low-level parser
was eating leading \ characters when it should not. Very hard bug to
find, trivial to fix.
- Added unit tests to several components while narrowing this down.
From Owen:
I tried mktime on Darwin an Linux; looks like they both default to UTC if the TZ
environment variable is unset but on Solaris it defaults to the local timezone.
I compiled and ran the tests and checked the behaviour by running:
date
TZ="" date
TZ="UTC" date
On Solaris the first two are in local time and the third is in UTC.
On Darwin and Linux the first one is in local time and the other two are in UTC.
Found this as a reference, too, which mentions the suggested implementation in
'man 3 timegm':
http://stackoverflow.com/questions/6467844/is-c-mktime-different-on-windows-and-gnu-linux
Signed-off-by: Paul Beckingham <paul@beckingham.net>
- Duration were parsed as <int><unit> in A3, whereas <number><unit> is
correct.
- Added Nibbler::str method for internal access.
- Nibbler::save, ::restore now return positions. Useful for extracting
substrings.
- Modified countdown.t to use the (now) correct units for durations.
- When compiling the 2.0.0 branch of Taskwarrior with GCC 4.6.1, the compiler
generates a number of warnings. This patch eliminates these warnings.
Signed-off-by: Paul Beckingham <paul@beckingham.net>
- Eliminated the . prefix for DOM references to the current task - it is
unnatural to state ".due < today".
- Prioritized parsing dates ahead of integers, which were masking all
dates.
- Implemented Nibbler::getWord.
- Re-implemented Nibbler::getDOM.
- Modified DOM addressed for context-based attributes from "due" to ".due",
the help disambiguate DOM references in expressions. There is now a
consistency:
<id>.due Task-specific
.due Contextual
<uuid>.due General
- Implemented associated unit tests.
- Implemented RegX class to maintain a separate compile, and match
method, thereby allowing efficient re-use of the regex. This is
critical to Expression::eval, where an identical regex might be
applied to every task.
- Obsoleted rx.{h,cpp}, which combined the compile and match steps
into a single call, and is therefore not efficient when used in
the context of filtering.
- Fixed some unit tests that weren't building. Now they do. They
don't work of course (don't be silly) but that's a problem for
another day.
- Modified all code that relies on rx.h to use RegX.h.
- Reordered operator table so that longer operators match first, thus
disambiguating between ! and !=.
- Eliminated Expression::expand_expression.
- Modified Nibbler to know what a DOM reference looks like.
- Removed alpha equivalent operators (lt, le, gt, ge, not, eq, ne) because
these are common in descriptions (French: le, ne).
- Modified Arguments and Nibbler unit tests.