AppleScript used to do a remarkable job of correctly "guessing" when dates were provided in text form.
When this was "fixed," I had dozens of script's break, but this was years ago and I've done workarounds that mostly fixed it, but there are still cases where I have to have a user select a date from list or enter it in a dialog, because the guess that
used to work was fixed.
These are in cases where we're gathering information from numerous sources, including files and emails, where all the various date formats people use just seemed to work, like magic with applescript.
These scripts were installed on dozens of macs handling hundreds of dates (and times) every day (TV listings and movie release dates) and we never had a single reported error of "guessing" an incorrect date from the text.
Whatever guesswork scripting or programming AppleScript used to do, the guessing was flawless. Although, I suppose you could intentionally craft some odd date format that would provide an incorrect result, but my scripts never encountered that in the wild.
What ever algorithm was used to do the guessing was pretty good, I wish they'd release it as an OSAX or something.