Tomas Babej
5aa3073703
libshared: Bump libshared to extend Duration value support
2021-01-18 02:59:11 -05:00
Tomas Babej
ef1e889262
ColTypeDate: Do not explicitly add now to relative dates
...
Relative dates are now implicitly anchored around now datetime point
during casting, hence there is no reason to do this anymore.
2021-01-18 02:59:11 -05:00
Tomas Babej
5e0fc1caab
Variant: Ensure implmentation of addition/subtraction of dates/durations does not involve casting
...
Implicit casting of a duration anchors it around the 'now' point in
time, which would throw off the conversion.
2021-01-18 02:59:11 -05:00
Tomas Babej
7242accb58
Variant: Convert durations into dates as implicitly anchored around now
...
The _period attribute holds the number of seconds that the Duration
holds, while _date attribute holds the number of seconds since the
beginning of unix epoch (also known as epoch time). As such, it does not
make sense to convert _period directly into _date.
Interpret _period as offset relative to current unix epoch time.
Closes #2390 .
2021-01-18 02:59:11 -05:00
Tomas Babej
1855d2c729
libshared: Bump version
2021-01-16 18:47:40 -05:00
indev
098be0747d
fix: remove lock file on interruption of 'task edit' ( #2292 )
2021-01-14 18:16:34 -05:00
Jochen Sprickerhof
663c6575ce
Use str_replace from libshared
2021-01-07 22:37:04 -05:00
Jochen Sprickerhof
a95205357c
Support editing multi-line annotations ( Closes : #2283 )
...
Since e4b9c1f
annotations where JSON encoded in task edit to escape
new lines (\n). But other strings where mangled as well, like https://
becoming https:\/\/, making it hard to edit.
This patch removes the JSON encoding and indents new lines instead.
2021-01-07 22:37:04 -05:00
Tomas Babej
9017cd6e53
doc: Update copyright to 2021
2021-01-02 02:48:22 -05:00
Tomas Babej
2ebf4b864d
ColTypeNumeric: Support date and duration variants
...
If the lexer identifies an expression as an date or a duration, it
should be re-cast into integer value.
Closes #2101 .
2021-01-02 00:21:02 -05:00
Tomas Babej
a641e4315f
Variant: Support 64-bit numeric values
...
Closes #2101 .
2021-01-01 23:57:34 -05:00
Tomas Babej
1a001caedd
Task: Prevent double json-decoding of attribute values
...
In bd4a7081
, json-decoding of attribute values was introduced as a
workaround to properly handle blackslashes in description and
annotations (see TW-880).
However, this behaviour is no longer present with the new parser and
introduces its own suite of issues (i.e. see #2140 ).
Closes #2140 .
2020-12-31 14:23:55 -05:00
Tomas Babej
6ff63286b5
CmdInfo: Properly format date and duration UDAs
...
The 'type' variable was never assigned value, hence the checking for
'date' and/or 'duration' always failed. Use col->type() instead.
Closes #2060 .
2020-12-28 20:36:32 -05:00
Tomas Babej
6bbfcba738
libshared: Support Datetime values until year 9999
...
Closes #2373 .
2020-12-28 01:34:41 -05:00
Tomas Babej
9ed047d46d
Task: Support setting 64-bit integer values
...
Thanks to Stephan Rieche.
2020-12-27 21:29:15 -05:00
Tomas Babej
e6edac7edd
build: Update libshared to version supporting Unicode 11
...
Closes #2333 .
2020-12-20 15:27:28 -05:00
Tomas Babej
982308412d
libshared: Updated to 418a1873aea42f0ed719218628b0ee166b2c281c
2020-12-14 22:37:13 -05:00
Tomas Babej
e37ab8a9ed
rules: Reduce code duplication
2020-12-14 22:35:38 -05:00
Tomas Babej
2336c4039d
rules: Mark coloring implementations that are not consistent with their corresponding virtual tags
2020-12-14 22:35:37 -05:00
Tomas Babej
2adc5994d5
rules: Make colorizeOverdue properly process dateEarlierToday date state
...
This makes the coloring implementation consistent with the
Task::is_overdue() method.
Closes #1998 .
2020-12-14 22:35:37 -05:00
Tomas Babej
fbf8fe688e
CmdCalendar: Properly colorize overdue task from today
...
Even if task is due today, but the due time is in the past, it is
considered overdue according to the implementation of Task::is_overdue
method.
Make coloring in the calendar output consistent.
2020-12-14 22:35:36 -05:00
Tomas Babej
bfae79eac7
CmdCalendar: Remove accidental repeated blending
2020-12-14 22:35:35 -05:00
Tomas Babej
eb32c9d8d7
Context: Correctly handle XDG_CONFIG_HOME paths ending with '/'
2020-12-10 23:49:00 -05:00
Tomas Babej
f0e34a7ef7
Context: Do not append .config if XDG_CONFIG_HOME is defined
...
- Thanks to Julien Rabinow.
2020-12-10 23:34:59 -05:00
Tomas Babej
5dc42df7d0
Context: Correctly respect empty XDG_CONFIG_HOME
2020-12-09 21:21:17 -05:00
Tomas Babej
1f98b9d128
Context: Adjust styling
2020-12-09 20:35:13 -05:00
Julien Rabinow
5256797ea9
add support for XDG_CONFIG_HOME
2020-12-09 20:15:22 -05:00
Julien Rabinow
46b553dd8c
reorder code to be in same order as comments (intuitive order)
2020-12-09 20:15:22 -05:00
Julien Rabinow
1aa77c9ede
fix home_dir variable definition
2020-12-09 20:15:22 -05:00
Tomas Babej
fcfe01f301
recur: Prevent infinite loops with 0 periods
...
Specifying a recurrence interval that amounts to a zero, like 'P0M', 0q
or 0m causes task to fall into an infinite loop when trying to determine
next recurrence dates.
Detect scenarios with zero-length recurrence interval and throw an
exception.
Closes #2262 .
2020-12-06 20:58:26 -05:00
Paul Beckingham
3e0a428185
Revert "[clang-tidy] Use .empty instead of comparing size"
...
This reverts commit a331cceded
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
b2d46a1eba
Revert "[clang-tidy] Use auto where the type is known"
...
This reverts commit 6ce2a129dd
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
0a3a4d364d
Revert "[clang-tidy] Use new range based loops"
...
This reverts commit a468537c1b
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
e3e158bf6a
Revert "[clang-tidy] Replace push_back with emplace_back"
...
This reverts commit 897759e4dc
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
ead50d4d6e
Revert "[clang-tidy] Use default to initialize constructors"
...
This reverts commit bf40ea8816
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
aa841f98c9
Revert "[clang-tidy] Add const where it makes sense"
...
This reverts commit defd49b13d
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
2652a9d3f1
Revert "[clang-tidy] Add const references where useful"
...
This reverts commit 37b641259c
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
8cf4e3de08
Revert "[clang-tidy] Access static member through qualified-id"
...
This reverts commit 6cd15235be
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
504aacd244
Revert "[clang-tidy] Pass by value with std::move"
...
This reverts commit e46039efb1
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
5502729131
Revert "[clang-tidy] Switch C headers to C++ ones"
...
This reverts commit 0344856d65
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
444e5955ac
Revert "[clang-tidy] Convert 0/1 to false/true"
...
This reverts commit 54e40008c9
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
0b828be4aa
Revert "[clang-tidy] Remove redundant init"
...
This reverts commit cc6826fc3a
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
9016c26828
Revert "[cl;ang-tidy] Don't initialize strings"
...
This reverts commit 426e067f43
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
3eb209f248
Revert "[clang-tidy] Use '' for single characters"
...
This reverts commit e3ceda9ce1
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
c3ecfac4f5
Revert "[clang-tidy] Use const reference instead of initializing string"
...
This reverts commit ab170e34df
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
7d8fff418e
Revert "[clang-tidy] Reserve memory for vector loop"
...
This reverts commit 7f86b29aa9
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
702af00435
Revert "[clang-tidy] Remove redundant const"
...
This reverts commit 55d103c491
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
c43a513158
Revert "[clang-tidy] Replace C style casts with C++ ones"
...
This reverts commit 13e1bf7204
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
364b4ea8bd
Revert "[clang-tidy] Simplify boolean expressions"
...
This reverts commit 51870dff34
.
2020-12-05 16:18:37 -05:00
Paul Beckingham
623d5ceb59
Revert "[clang-tidy] using dynamic_cast for derived classes"
...
This reverts commit a02754159c
.
2020-12-05 16:18:37 -05:00