> Mark, your solutions look good on dates and with good basic match to 
> exclude a lot of things that would not be proper dates.
> Its probably all that is needed practically.
>
> FYI, it is actually possible to use regex to correctly match dates. I know 
> because I've done it to accurately  match dates, including leap years, 
> under both Gregorian & Julian calendars. Its just enormously complex :-). 
> Yeah, coding is better suited for that.
>

Well, that got me thinkig. Here's a probably inefficient date VALIDATOR for 
dates starting 0000-01-01 following format yyyy-mm-dd  (which I find to be 
the most generally useful). Ok, I didn't check the rules. I think there's 
something about a surprise
leap year every 400 years, so there's probably more tweaking to be done to 
match the Gregorian calendar precisely.

<option value=
"^(?=\d{4})(((?!\d\d(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))\d{4}-(((0[13578]|10|12)-(0[1-9]|[12]\d|30|31))|((04|06|09|11)-(0[1-9]|[12]\d|30))|((02)-(0[1-9]|1\d|2[1-8]))))|((?=\d\d(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))\d{4}-(((0[13578]|10|12)-(0[1-9]|[12]\d|30|31))|((04|06|09|11)-(0[1-9]|[12]\d|30))|((02)-(0[1-9]|1\d|2[1-9])))))"
>Experimental VALIDATE yyyy-mm-dd</option>




On Friday, August 23, 2019 at 12:34:37 PM UTC-7, @TiddlyTweeter wrote:
>
> Mohammad:
>
> are a date in format like Jan 06 2019  
>
> are a date in format like 2019.08.25 
>
>
> Mark:
>
>> Actual validation of dates would take
>
> real code massaging. 
>
>
>
>
> TT
>

-- 
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/51d7b231-f868-4aa5-b41a-27ef2b0f75ee%40googlegroups.com.

Reply via email to