Is there a natural language parser for date/times in ColdFusion?
Asked
Active
Viewed 1,267 times
7
-
1For whoever said to close this as an exact duplicate- please edit the question and put in a link to the question this is an exact duplicate of. – Kip Jun 17 '09 at 13:20
-
I don't recall seeing even a similar question to this, never mind a duplicate. – Peter Boughton Jun 17 '09 at 23:38
3 Answers
9
There's a (reportedly -- I've not used it) good one for Java called JChronic -- a port of the Ruby Chronic date parser. You could try using it.
It hasn't been updated since 2006, but should still be useful.

Shawn Holmes
- 3,752
- 22
- 25

Ben Doom
- 7,865
- 1
- 27
- 30
3
I believe parseDateTime() and lsParseDateTime() are the closest to what you're looking for, from the library of built-in ColdFusion functions.
Check out Adobe's LiveDocs for other date/time functions.
Remember that you can also leverage any Java date/time class as well. Pete Freitag has an interesting post with some example code.

Patrick McElhaney
- 57,901
- 40
- 134
- 167

Jamie Krug
- 469
- 3
- 5
-
1natural language, as in tomorrow, yesterday, one week from today, etc. – antony.trupe Jun 16 '09 at 19:25
-
@antony- please specify that in the original question if that's what you want. when you said "natural language", i thought that meant that it can parse a string in any format naturally used. i.e. the user could enter "1/11/94" or "january 11, 1994" or "1994.01.11" or whatever, and the parser would be smart enough to figure out the format. – Kip Jun 17 '09 at 13:25
-