You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great plugin, I thought of a possible improvement regarding date parsing.
Is your feature request related to a problem? Please describe.
I think it could be interesting to have the ability to use ISO 8601 durations (https://en.wikipedia.org/wiki/ISO_8601#Durations) in the offset, this would allow to have fairly dynamic and granular date navigation, specifically for months which don't always have the same number of days.
The end goal being to be able to create dates like [[<% tp.date.now("YYYY-MM-DD", "P-1M") %>|This day last month]] for example
Describe the solution you'd like
Probably have the signature of days be days?: number|string (no issue with keeping number defaulting to days for backward-compatibility and ease of use) and pass a moment.duration (https://momentjs.com/docs/#/durations/creating/ which thankfully already support this ISO format) to the .add call.
Additional context
I haven't deep dived into the source code, but if you would like me to look into creating a pull request for this issue, I could probably contribute this when I have some free time.
The text was updated successfully, but these errors were encountered:
Thanks for the great plugin, I thought of a possible improvement regarding date parsing.
Is your feature request related to a problem? Please describe.
I think it could be interesting to have the ability to use ISO 8601 durations (https://en.wikipedia.org/wiki/ISO_8601#Durations) in the offset, this would allow to have fairly dynamic and granular date navigation, specifically for months which don't always have the same number of days.
The end goal being to be able to create dates like
[[<% tp.date.now("YYYY-MM-DD", "P-1M") %>|This day last month]]
for exampleDescribe the solution you'd like
Probably have the signature of days be
days?: number|string
(no issue with keepingnumber
defaulting to days for backward-compatibility and ease of use) and pass amoment.duration
(https://momentjs.com/docs/#/durations/creating/ which thankfully already support this ISO format) to the.add
call.Templater/src/InternalTemplates/InternalUtils.ts
Lines 1 to 3 in d708ea4
Additional context
I haven't deep dived into the source code, but if you would like me to look into creating a pull request for this issue, I could probably contribute this when I have some free time.
The text was updated successfully, but these errors were encountered: