Soren,

If you are only using it for short period such as 7-30 days, it would be 
possible to simple handle "Decembers" differently to fix the year problem. 
Or make use of the days operator.

Other date tools exist, perhaps review Eric's 
powerful http://tiddlytools.com/timer.html or Evans formulae plugin.

Tones

On Thursday, 31 December 2020 at 10:37:59 UTC+11 Soren Bjornstad wrote:

> Tones,
>
> Thanks! I haven't gotten around to upgrading to 5.1.23 yet, so I'll give 
> it a shot when I do. If it is unable to update the year, though, I don't 
> think it will work in this case as I'm definitely going to need to cross 
> year boundaries.
>
> On Tuesday, December 29, 2020 at 9:01:38 PM UTC-6 TW Tones wrote:
>
>> 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2b6db370-2391-4a16-9731-c733b68d8c89n%40googlegroups.com.

Reply via email to