Forum Moderators: coopster & phranque

Message Too Old, No Replies

detecting date expressions

regular expressions to detect date and time expressions

         

Socrates

8:38 pm on Mar 21, 2005 (gmt 0)



Hi, everyone

I hope to detect date expressions in text, as you know there are several ways to represent dates (e.g 10/30/2004, october/30/ 04, etc.)

The same is for time expressions

Do you know how can I get this kind of information from text.

I really appreiate any commment.

Have a nice day

Socrates

NemoV

2:49 am on Mar 22, 2005 (gmt 0)

10+ Year Member



I wouldn't know. I think a good place to start to figure it out is look at some of the calendar scripts out there that has the function you need and go from there.

Have a wonderful day

NemoV

Moby_Dim

3:40 pm on Mar 22, 2005 (gmt 0)

10+ Year Member



may be make a few alternatives like /(pattern0¦pattern1¦pattern2¦...)/

but each pattern may need sub-alternatives too

wruppert

10:35 pm on Mar 23, 2005 (gmt 0)

10+ Year Member



The modules Date::Parse and Class::Date can figure out what date/time a particular string is. They might be a starting point for plucking date/times out of generalized text.

DavidFilmer

9:55 pm on Mar 24, 2005 (gmt 0)

10+ Year Member



Date::Manip can parse an astonishing range of date expressions. For example:

the first monday in june, 2006
24 days and 7 minutes from now
yesterday (or tomorrow)
last Wednesday
45 hours ago