decaf-dev / obsidian-vault-explorer

Explore your Obsidian vault in visual format
https://vaultexplorer.com
MIT License
92 stars 3 forks source link

[FR] Support more timedate formats #65

Closed Moyf closed 3 months ago

Moyf commented 3 months ago

image

"YYYY-MM-DDTHH:mm" Hope to support this kind of date format : )

Moyf commented 3 months ago

image

Oh.. And it seems that we would need a way to ignore specific folders (like Templater's folder) to avoid this kind of problem

decaf-dev commented 3 months ago

Hey @Moyf. Thanks for finding this. I will add the other format.

decaf-dev commented 3 months ago

That's interesting. I will ignore the templater strings as well. Thanks for catching that

decaf-dev commented 3 months ago

image

Oh.. And it seems that we would need a way to ignore specific folders (like Templater's folder) to avoid this kind of problem

Do you have a frontmatter property set to date or datetime with that templater string?

Moyf commented 3 months ago
image

Oh.. And it seems that we would need a way to ignore specific folders (like Templater's folder) to avoid this kind of problem

Do you have a frontmatter property set to date or datetime with that templater string?

Yay, actually it's my basic template for all of my notes, so it would use the global frontmatters: image

Since this is a global frontmatter, I do set the properties as "Datetime" format image


BTW, When I set the new custom datetime property in Settings, I discovered that some early notes with non-standard dates could prevent the plugin from running, resulting in all content being displayed as blank.

I used Batch Search & Replace in VSCode to correct this issue. However, would it be more convenient to display a warning, ignore the file, and continue the process instead of throwing an error and blocking subsequent scans, which leads to no content being displayed?

This may provide more room for error tolerance for those less standardized note vault.

Moyf commented 3 months ago

When it comes to time, I also want to know what format should be used when filling in the date for the date/datetime filter with "is after" condition? image (Is it possible to add a date selection button later? )

Also, can it support adaptive dates like 1d (1 day) or 2w (2 weeks) instead of entering a fixed date?

decaf-dev commented 3 months ago

I thought Obsidian would have validated the date value since it is stored in their frontmatter cache, but it apparently is not. I just pushed a fix for all of these bugs. Please try 1.7.1.

decaf-dev commented 3 months ago

When it comes to time, I also want to know what format should be used when filling in the date for the date/datetime filter with "is after" condition? image (Is it possible to add a date selection button later? )

Also, can it support adaptive dates like 1d (1 day) or 2w (2 weeks) instead of entering a fixed date?

The formats that are supported should be YYYY-MM-DDTHH:mm:ss or YYYY-MM-DDTHH:mm or YYYY-MM-DD.

Yes, I can add a date field. I will open another issue for that.

Moyf commented 3 months ago

I thought Obsidian would have validated the date value since it is stored in their frontmatter cache, but it apparently is not. I just pushed a fix for all of these bugs. Please try 1.7.1.

Yeaaaah, Updated to 1.7.1 and it works perfectly now!