Beam me up, Scotty.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
A relevant thread which references RFCs, with links, and includes some good ideas about possible future time and date options for LC from Mark Waddingham:
And the 'dirty' word is 'consistent' . . .But if those are all sturdy and consistent enough then they can be parsed.
Because they could be seconds, starting from the origin of time assigned by the OS (1904 Mac, 1970 'nix, etc.)
Well, they could, but I wonder if one can not be a bit more 'refined' and look forBecause they could be seconds
That is awkward.that is considered a single format
Yep, that is a great way into and out of the parsing jungle. Of course, some formats use "-".were one to set '/' as the itemDelimiter
Today is 31.8.2022 as far as I'm concerned.some formats use "-"
Using MacOS' data detectors is probably the best way to go about this if this is for Mac-only app, given the complexity.
Code: Select all
\s((?:0?[1-9]|[12]\d|30|31)[^\w\d\r\n:](?:0?[1-9]|1[0-2])[^\w\d\r\n:](?:\d{4}|\d{2})|(?:0?[1-9]|1[0-2])[^\w\d\r\n:](?:0?[1-9]|[12]\d|30|31)[^\w\d\r\n:](?:\d{4}|\d{2})|(?:\d{4})[^\w\d\r\n:](?:0?[1-9]|1[0-2])[^\w\d\r\n:](?:[0-2][0-9]|3[0-1]))
Code: Select all
put "\s((?:0?[1-9]|[12]\d|30|31)[^\w\d\r\n:](?:0?[1-9]|1[0-2])[^\w\d\r\n:](?:\d{4}|\d{2})|(?:0?[1-9]|1[0-2])[^\w\d\r\n:](?:0?[1-9]|[12]\d|30|31)[^\w\d\r\n:](?:\d{4}|\d{2})|(?:\d{4})[^\w\d\r\n:](?:0?[1-9]|1[0-2])[^\w\d\r\n:](?:[0-2][0-9]|3[0-1]))" into tRegex
get matchText(textToSearch, tRegex, R)