Re: [Boost-users] [date_time] extract date from string using a list of patterns

Thats why I was looking into it this way, I was hoping not to have to create my own parser. I'm actually kinda of surprised that there isn't a open source natural language date string parser out there already.
GNU date is such a library. In PHP, there is the strtotime() function, which I believe uses GNU date C code to parse stuff like what you list. It accepts a bewildering variety of strings like "now", "last Monday", "10 September 2004", "10 Sep 2004", "+1 week 2 days 3 seconds", etc. I can't find a GNU link for you though. But here is the man page for PHP's strtotime() for a starting point: http://us3.php.net/manual/en/function.strtotime.php Good luck

# bgneal@gmail.com / 2006-06-27 15:38:06 -0500:
Thats why I was looking into it this way, I was hoping not to have to create my own parser. I'm actually kinda of surprised that there isn't a open source natural language date string parser out there already.
GNU date is such a library. In PHP, there is the strtotime() function, which I believe uses GNU date C code to parse stuff like what you list. It accepts a bewildering variety of strings like "now", "last Monday", "10 September 2004", "10 Sep 2004", "+1 week 2 days 3 seconds", etc. I can't find a GNU link for you though.
http://www.gnu.org/software/coreutils/manual/html_mono/coreutils.html#Date-i...
But here is the man page for PHP's strtotime() for a starting point:
-- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991

Roman Neuhauser wrote:
# bgneal@gmail.com / 2006-06-27 15:38:06 -0500:
Thats why I was looking into it this way, I was hoping not to have to create my own parser. I'm actually kinda of surprised that there isn't a open source natural language date string parser out there already. GNU date is such a library. In PHP, there is the strtotime() function, which I believe uses GNU date C code to parse stuff like what you list. It accepts a bewildering variety of strings like "now", "last Monday", "10 September 2004", "10 Sep 2004", "+1 week 2 days 3 seconds", etc. I can't find a GNU link for you though.
http://www.gnu.org/software/coreutils/manual/html_mono/coreutils.html#Date-i...
This seems to be EXACTLY what I need. The thing is this document seems to talk about the GNU date program... which uses the get_date c function. After some searching I've found 0 documentation on that function and whatever library it exists in.

# jason@pcc.com / 2006-06-28 11:08:37 -0400:
Roman Neuhauser wrote:
# bgneal@gmail.com / 2006-06-27 15:38:06 -0500:
Thats why I was looking into it this way, I was hoping not to have to create my own parser. I'm actually kinda of surprised that there isn't a open source natural language date string parser out there already. GNU date is such a library. In PHP, there is the strtotime() function, which I believe uses GNU date C code to parse stuff like what you list. It accepts a bewildering variety of strings like "now", "last Monday", "10 September 2004", "10 Sep 2004", "+1 week 2 days 3 seconds", etc. I can't find a GNU link for you though.
http://www.gnu.org/software/coreutils/manual/html_mono/coreutils.html#Date-i...
This seems to be EXACTLY what I need. The thing is this document seems to talk about the GNU date program... which uses the get_date c function. After some searching I've found 0 documentation on that function and whatever library it exists in.
I managed to dig up this: http://cvs.savannah.gnu.org/viewcvs/coreutils/lib/getdate.h?root=coreutils&view=markup http://cvs.savannah.gnu.org/viewcvs/coreutils/lib/getdate.y?root=coreutils&view=markup -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991
participants (3)
-
Brian Neal
-
Jason Dolan
-
Roman Neuhauser