GothenburgBitFactory / GothenburgBitFactory/taskwarrior

Define valid date, time and recurrence values

Open
#3,710 7 comments 0 reactions 0 assignees View on GitHub
topic:time
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

It is not clear what constitutes valid date, time and recurrence values in Taskwarrior. Consequently, it is not clear what behavior users should expect when values fall outside of these (underspecified) ranges.

https://taskwarrior.org/docs/dates/#rcdateformat mentions that `Y` in `Y-M-D` is a 4-digit year. A different part of this page defines `later` and `someday` as "Local 9999-12-30, with time 00:00:00". It gives an impression that Taskwarrior should support dates at least up to 9999-12-30.

In practice, there are bugs like https://github.com/GothenburgBitFactory/taskwarrior/issues/81. Because Taskwarrior uses types whose ranges are implementation defined (e.g. `int` in C++), and because it seems like different parts of the codebase have different idea of what is _valid_, and because it is not clear what the expected behavior is, resolving these issues is non-trivial.

As a user, I would like to know what the minimum and maximum supported date is. Can I depend on Taskwarrior to work with dates after the year 2038? After 2106? 9999? Are the supported values the same, no matter what machine and C++ compiler I am using?

If a date goes over (or under, for that matter) the supported range, how will Taskwarrior behave? Will it inform me? Will it silently drop tasks with unrepresentable dates? Will it round the dates to the nearest representable values? Will it corrupt the database? Something else entirely?

Before a decision is made, I encourage you to share your perspectives, ideas, worries, proposals and insights.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.