Folks,

In this thread 
<https://groups.google.com/forum/?hl=en#!topic/tiddlywiki/kNJFU8w9Q_I> 
David asks how to generate a range of dates. 

This made me ask myself what if we had an operator that given a date input 
of the standard TiddlyWiki form YYYYMMDD+ 
it was able to filter out invalid dates according to calendar rules

That is if 20200229 or 20200229231215828  is filtered eg "is[validdate]" it 
would be passed through as there is a 29th of february this year.
That is if 20210229 or 20210229231215828 would not be because there is no 
leap year in 2021

This may be a simple javascript date function already available in 
tiddlywiki.

It would then become possible to do the following;

<$list filter="[range[1,31]addprefix[202002]is[validdate]]">

</$list>
to generate a list of February 2020 valid days of the month
*I have not complicated the above with the need to zero fill the range 
value*

>From this proposed filter it would be very easy to generate date ranges or 
test any YYYMMDD for validity

This could as easily extend to time as well if required is[validtime] HHMMSS

What do you think?
Can someone help me make this so?

Regards
Tony

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/77f97b44-7211-4a5f-ab7a-b84753d1d07d%40googlegroups.com.

Reply via email to