Ruby interface to gnu date handling library?

B

Booker C. Bense

-----BEGIN PGP SIGNED MESSAGE-----

_ 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

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBQb8Br2TWTAjn5N/lAQH/bgP9F4hyU5Kybdsw6YTUlQFGjeccJLbpeXIG
n/1SYl8mQf7A6BmjGO6uSShMKg7sfR5r055Jw4S5F7302emyxulL713lM9cH+3KV
3sP9bvrct4u6D5v7MZkuQfGHNegOaapfic1fApJEv8GYvbZeCfozOVdNCq1c/8cp
2d/PFFBeqFM=
=85Co
-----END PGP SIGNATURE-----
 
B

Booker C. Bense

-----BEGIN PGP SIGNED MESSAGE-----

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


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBQb8sCmTWTAjn5N/lAQF9RwP9H02Pih2C09saUVyGJPai3dNvUKFWbEPg
UfZy02Zpa06MlhcldNssc17aJaZbdpBZWCYJBjCYRBtEj5qzlqkxKMPKnCMe/CeI
8+11wlyKWobZ+23E95dLUUC4LOrwxCkSAckGI4hm7RnTRlH6WU65EDtJr78T5741
Cs2e1m9oTM8=
=8Iy4
-----END PGP SIGNATURE-----
 
K

Kaspar Schiess

"Booker C. Bense" <bbense+comp.lang.ruby.Dec.14.04
@telemark.slac.stanford.edu> wrote in
_ 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:
http://www.tua.ch/ruby/getdate/ruby-getdate.tgz

And read all about it here:
http://www.tua.ch/ruby/current.html

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.

best regards, and lots of fun,
kaspar

hand manufactured code - www.tua.ch/ruby
 
B

Booker C. Bense

-----BEGIN PGP SIGNED MESSAGE-----

"Booker C. Bense" <bbense+comp.lang.ruby.Dec.14.04
@telemark.slac.stanford.edu> wrote in
Download the first and last release of ruby-getdate here:
http://www.tua.ch/ruby/getdate/ruby-getdate.tgz

_ Thanks, turns out I'll need it after all.

_ Booker C. Bense

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBQcC7LGTWTAjn5N/lAQHXiwQAgcX38/Gz/76MbYHtWFegsij5gp4IPhVy
Yd0yeeWwkcTK/z3TklsjaDq+rp1KiivIqpZfPcRgD4BihJ+T7rAD8p/aymgOrNiI
oBwaFJ6dTgcyvrqS7n1NTpphVbfnQYCAYsJ7J7d/W3WoRP6E6CKLaYXnaMtdbiKo
DcxcYD/rp8c=
=f1rh
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,121
Messages
2,570,712
Members
47,283
Latest member
hopkins1988

Latest Threads

Top