saf-dmitry/taskpaper-mode

[Feature Request] Semantic comprehension of ISO weeks eg @due(w26) or @week(w26) by date queries?

wakatara opened this issue · 3 comments

Would it be possible for taskpaper-mode to understand and grok ISO week numbers in terms of dates? My impression is that it must already understand them from the query syntax, but would it be possible to either allow a specific comprehension of them within tags (eg. @chase(w26) or @ due(w25) ) where they would be amenable to being brought up in the query interface for a particular date range? (oe even what I used to use in Taskpaper, @Week(26) )

In other words, can ISO weeks be used as date targets to be queried by predicates?

TaskPaper mode understands ISO week numbers in combination with year and optional weekday, e.g.:

  • 2020-w26
  • 2020-w26-2

So you can write something like @due(2020-w26-5).

Same for queries: @due <=[d] 2020-w26-5.

Ah, I see. OK, a bit kuldgier than I'd like but as long as it "understands" those dates within a range, that would be cool. How would you use those with a search predicate then? @chase <= [d] 2020-w26 and not @done ? as per a usual date search?

How would you use those with a search predicate then? @chase <= [d] 2020-w26 and not @done ? as per a usual date search?

Exactly so.