Help with search queries with date time and "contains" operator

I have this taskapeper file:

Project:
	- first @due(2016-04-13)
	- second @due(2016-04-13 15:00:00) 
	- third

Today date = 2016-04-13

First case:

Search query: @due = [d] today result:

Project:
	- first @due(2016-04-13)

Second case:

Search query: @due contains [d] today result:

taskpaper app is broken and we found glitch.


How can I find all the tasks assigned to a specific day?

In TaskPaper each date represents a single point in time. If no hour is specified then the date (such as 2016-04-13) starts as midnight. Your query is matching the first day, but not the second, since the second has a different hour specified.

The solution is to use < and >. So for example:

@due >=[d] today and @due <=[d] tomorrow

Oops thanks for finding that. It should return no results since contains doesn’t make sense for dates as TaskPaper represents them. You’ll see the same problem with beginswith, contains, and endswith. I’ll fix all those cases to just return no results in the next release.

1 Like