argenos / nldates-obsidian

Work with dates in natural language in Obsidian
MIT License
490 stars 44 forks source link

Friday and next Friday in Monday doesn't work #81

Closed dariuszkowalski-com closed 2 years ago

dariuszkowalski-com commented 2 years ago

Example 1:

Example 2:

Is it a bug?

ScottKillen commented 2 years ago

I experienced something similar:

I expect that @Thursday and @this Thursday would be synonymous. This is certainly how it works in natural language.

Gnopps commented 2 years ago

I experienced something similar:

* Sunday is set as the first day of the week.

* Today is Tuesday 2022-01-18.

* `@thursday` renders 2022-01-13. I expect 2022-01-20.

* `@next Thursday` renders 2022-01-27.

* `@last Thursday` renders 2022-01-13.

* `@this Thursday` renders 2022-01-20.

I expect that @Thursday and @this Thursday would be synonymous. This is certainly how it works in natural language.

This is similar to what I asked for here. Basically that "Thursday" renders next Thursday and not last Thursday.

The underlying engine "chrono" supports this with a setting, so ought to be fairly easy to implement.

ScottKillen commented 2 years ago

This is similar to what I asked for here. Basically that "Thursday" renders next Thursday and not last Thursday.

Yes, that setting would certainly fix it.

ScottKillen commented 2 years ago

@Gnopps

He manipulates the flag here, but I think there is a problem with the logic.