Soren,
There is a new format operator for dates;
Past this in a tiddler on tiddlywiki.com and see the result.
Note how it seems to honor months and leap years but will not increment the
year.
{{{ [all[current]get[created]format:date[YYYY0MM0DD]] }}}
{{{
[all[current]get[created]format:date[YYYY0MM0DD]add[1]format:date[YYYY0MM0DD]]
}}}
{{{
[all[current]get[created]format:date[YYYY0MM0DD]add[2]format:date[YYYY0MM0DD]]
}}}
{{{ [[20000228]format:date[YYYY0MM0DD]add[1]format:date[YYYY0MM0DD]] }}}
{{{ [[20000228]format:date[YYYY0MM0DD]add[2]format:date[YYYY0MM0DD]] }}}
{{{ [[20210228]format:date[YYYY0MM0DD]add[1]format:date[YYYY0MM0DD]] }}}
{{{ [[20210228]format:date[YYYY0MM0DD]add[2]format:date[YYYY0MM0DD]] }}}
Regards
Tones
On Wednesday, 30 December 2020 at 10:31:50 UTC+11 Soren Bjornstad wrote:
> Hi all,
>
> I'm trying to use Mark S.'s solution, and it works great, except it
> appears to have a minor bug in leap years: when the result would be the
> 29th of February, it instead returns the 28th of February. It otherwise is
> doing all of the calculations for leap years correctly (e.g., adding 2 days
> on February 28, 2020 returns March 1, 2020).
>
> I have to admit I have pretty much no clue what's going on with those
> filters, lol, so if someone is able to spot the issue I'd be much obliged.
>
> On Tuesday, October 22, 2019 at 3:00:28 AM UTC-5 Mat wrote:
>
>> Cool stuff Mark!
>>
>> Date manipulation is one of those border areas that you seemingly will
>> never need... until you do. So thanks for sharing Mark.
>>
>> <:-)
>>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/f6d6e948-ae02-4efb-9c2c-f31431890470n%40googlegroups.com.