question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comparison between list of dates and date always returns true

See original GitHub issue

What happened?

toy case

  • A [due:: 2023-01-16T09]
  • B [due:: 2023-01-06]

Lorem ipsum dolor sit amet.

  • C
  • D

faulty TASK dataview

The following dataview will show C and D, although they

  • have no due date
  • no due date in the whole note is actually in the past (as checked for in the WHERE)
TASK 
WHERE due < date(now)

faulty TABLE dataview

TABLE T.text, T.due
FLATTEN file.tasks AS T
WHERE T.due < date(now)

This also yields both C and D, with empty due dates as reported by the column…?

DQL

No response

JS

No response

Dataview Version

0.5.47

Obsidian Version

1.0.3

OS

MacOS

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
s-blucommented, Dec 13, 2022

thanks for the support re avoiding. I just accepted now that I can’t idle tasks by removing the [ ] because dataview then interprets the idled-task-properties as file properties.

You could do so by i.e. adding another property or a tag #idle to them and exclude them in your query via FROM -#idle. Just as an idea.

To my mind, blocking “defer” and “due” from ever inheriting file properties would feel right. these feel like exclusive members of tasks, their parents, their children. But I am sure there are other users that desire this file inheritance. There always are. So from my point of view, this can be closed if no change re fallback behavior is desired.

As somebody that uses due dates on file, I can only agree that the desired behaviour here is very depending on the workflow 😃

I’ll wait for blacksmithgus answer and close the issue if no adjustment of the fallback comparison is wished for. Thanks for your feedback!

0reactions
PaulAmosKreinercommented, Dec 12, 2022

Could also say that it’s my bad then because I didn’t realize that the undefined and counterintuitive behavior does not occur in the TABLE-query that I only included for good measure… 😉

thanks for the support re avoiding. I just accepted now that I can’t idle tasks by removing the [ ] because dataview then interprets the idled-task-properties as file properties.

To my mind, blocking “defer” and “due” from ever inheriting file properties would feel right. these feel like exclusive members of tasks, their parents, their children. But I am sure there are other users that desire this file inheritance. There always are. So from my point of view, this can be closed if no change re fallback behavior is desired.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Date Comparison always returns false no matter which ...
I understand that an == comparison will always return false between two date objects. But really can't understand why this code returns ...
Read more >
How to Compare Dates in Excel (Greater/Less Than ...
Check Whether the Dates are the Same or Not​​ The above formula would return TRUE if the compared dates are the same, and...
Read more >
Solved: Date Comparison Issues - Power Platform Community
Solved: I have a sharepoint List and a flow which compares the date today and ... If the Date is 12/07/2019 the condition...
Read more >
JavaScript: Comparison between two dates - w3resource
JavaScript exercises, practice and solution: Write a JavaScript function to compare dates (i.e. greater than, less than or equal to).
Read more >
Formula comparing cell to fixed date always returns false
Take the quotes off of the dates in your formula. It is trying to find the greater of two text values instead of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found