_ First, my apologies. I know I should be able to "just find
this", but my google-fu seems lacking this morning. There is a
library that allows you to use strings like
"last week"
"two hours ago"
to specify dates, I am looking for a ruby interface to that
library. If you remember the name of that library it would be
a great help as well.
_ First, my apologies. I know I should be able to "just find
this", but my google-fu seems lacking this morning. There is a
library that allows you to use strings like
"last week" "two hours ago"
to specify dates, I am looking for a ruby interface to that library. If you remember the name of that library it would be
a great help as well.
_ Booker C. Bense
I googled for this the other day too, and failed. My application will run in POSIX environments with the date command, so I just did this:
_ First, my apologies. I know I should be able to "just find
this", but my google-fu seems lacking this morning. There is a
library that allows you to use strings like
"last week"
"two hours ago"
to specify dates, I am looking for a ruby interface to that
library. If you remember the name of that library it would be
a great help as well.
_ Booker C. Bense
I googled for this the other day too, and failed. My application will
run in POSIX environments with the date command, so I just did this:
Time.parse(`date -d "#{date_string}"`)
_ Thanks, that will work just fine. I couldn't even remember what
command used this kind of date string. I guess I picked the wrong
week to cut back on my coffee consumption %-).
"Booker C. Bense" <bbense+comp.lang.ruby.Dec.14.04
@telemark.slac.stanford.edu> wrote in news:cpna6b$ohq$1@news.Stanford.EDU:
_ Thanks, that will work just fine. I couldn't even remember what
command used this kind of date string. I guess I picked the wrong
week to cut back on my coffee consumption %-).
Good luck with cutting back on coffee; I actually do the reverse. No wonder
that my googling did have the desired effects...
Download the first and last release of ruby-getdate here:
And read all about it here:
This is really just the tiniest wrapper... And it might not even be up to
date. I feel lazy tonight. You can own the project if you feel inclined to
do so.