[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Parsing a time span

Eric Marthinsen

9/28/2008 3:50:00 AM

Hello-

I'm trying to find the best way to turn a string like "3 days" or "72
hours" into some sort of time span representation. My first question is
what is the best way to store a duration like this? In seconds? Second,
are there any good tools for parsing a string like this? I'm aware of
the Duration library, but the author doesn't consider it stable, so I'd
prefer something stable and supported. Thanks in advance.

Regards-
Eric
--
Posted via http://www.ruby-....

15 Answers

?Do?g??

5/25/2008 7:24:00 AM

0

"Seon F" <seon@iinet.net.au> wrote in message
news:4838e8e8$0$21150$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
>
> "Addinall" <addinall@addinall.org> wrote in message
> news:44128b65-8571-4572-a1d0-1b0075648df1@f24g2000prh.googlegroups.com...
> On May 25, 12:02 am, Sir John Howard <sirjohnhow...@gmail.com> wrote:
>> Council planners say no to arselifter school
>>
>> http://www.smh.com.au/news/national/council-planners-say-no......
>>
>> A MUSLIM society's plans to build a school in Camden have been dealt a
>> severe blow after the council's experts yesterday recommended against
>> the development on planning grounds.
>
>>Goodo. I'm in favour of banning private schools. Which one next?
>>One in Geelong springs to mind....
>
> I disagree they shouldn't be banned but I would support the government no
> longer funding them. Let the rich snobs pay the fee's themselves its not
> like they cant afford it. So they wont get to have a second helping of
> caviar big deal.
>

Were you born naive or did you have to practice?


Seon

5/25/2008 8:01:00 AM

0


"???Doug???" <no?nen@now.com> wrote in message
news:Dv8_j.1288$uE5.1229@flpi144.ffdc.sbc.com...
> "Seon F" <seon@iinet.net.au> wrote in message
> news:4838e8e8$0$21150$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
>>
>> "Addinall" <addinall@addinall.org> wrote in message
>> news:44128b65-8571-4572-a1d0-1b0075648df1@f24g2000prh.googlegroups.com...
>> On May 25, 12:02 am, Sir John Howard <sirjohnhow...@gmail.com> wrote:
>>> Council planners say no to arselifter school
>>>
>>> http://www.smh.com.au/news/national/council-planners-say-no......
>>>
>>> A MUSLIM society's plans to build a school in Camden have been dealt a
>>> severe blow after the council's experts yesterday recommended against
>>> the development on planning grounds.
>>
>>>Goodo. I'm in favour of banning private schools. Which one next?
>>>One in Geelong springs to mind....
>>
>> I disagree they shouldn't be banned but I would support the government no
>> longer funding them. Let the rich snobs pay the fee's themselves its not
>> like they cant afford it. So they wont get to have a second helping of
>> caviar big deal.
>>
>
> Were you born naive or did you have to practice?
>
I wasnt born into a upper class family thats for sure. Come on we all know
the public schools are the one's that need funding. The people who send
there kids to private schools are people who could afford to go to America
just on a whim and still have enough money left over to buy a PS3.

Seon

5/25/2008 10:26:00 AM

0


"Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
news:dbf0e22f-348c-4813-af07-cdca151bb217@x1g2000prh.googlegroups.com...
???Doug??? wrote:
> "Seon F" <seon@iinet.net.au> wrote in message
> news:4838e8e8$0$21150$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
> >
> > "Addinall" <addinall@addinall.org> wrote in message
> > news:44128b65-8571-4572-a1d0-1b0075648df1@f24g2000prh.googlegroups.com...
> > On May 25, 12:02 am, Sir John Howard <sirjohnhow...@gmail.com> wrote:
> >> Council planners say no to arselifter school
> >>
> >> http://www.smh.com.au/news/national/council-planners-say-no......
> >>
> >> A MUSLIM society's plans to build a school in Camden have been dealt a
> >> severe blow after the council's experts yesterday recommended against
> >> the development on planning grounds.
> >
> >>Goodo. I'm in favour of banning private schools. Which one next?
> >>One in Geelong springs to mind....
> >
> > I disagree they shouldn't be banned but I would support the government
> > no
> > longer funding them. Let the rich snobs pay the fee's themselves its not
> > like they cant afford it. So they wont get to have a second helping of
> > caviar big deal.
>
> Were you born naive or did you have to practice?

>He votes labour, Doug. That's about as dumb as they get.

Yes lets fund private schools for rich spoiled brats while the public school
system is in chaos. That makes sense...

?Do?g??

5/25/2008 7:13:00 PM

0

Will you please move to the nearest Islamonazi
pig theocracy ASAP?

"Addinall" <addinall@addinall.org> wrote in message
news:8fa064a5-2091-4c88-b3fa-94e97d539a90@l28g2000prd.googlegroups.com...

Will you PLEASE stop mis-using apostrophes?

Mark Addinall.



Seon

5/26/2008 12:06:00 AM

0


"Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
news:0f474986-5aa6-4821-b29b-0831a23f59cb@w34g2000prm.googlegroups.com...
Seon F wrote:
> "Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
> news:dbf0e22f-348c-4813-af07-cdca151bb217@x1g2000prh.googlegroups.com...
> ?????????Doug????????? wrote:
> > "Seon F" <seon@iinet.net.au> wrote in message
> > news:4838e8e8$0$21150$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
> > >
> > > "Addinall" <addinall@addinall.org> wrote in message
> > > news:44128b65-8571-4572-a1d0-1b0075648df1@f24g2000prh.googlegroups.com...
> > > On May 25, 12:02 am, Sir John Howard <sirjohnhow...@gmail.com> wrote:
> > >> Council planners say no to arselifter school
> > >>
> > >> http://www.smh.com.au/news/national/council-planners-say-no......
> > >>
> > >> A MUSLIM society's plans to build a school in Camden have been dealt
> > >> a
> > >> severe blow after the council's experts yesterday recommended against
> > >> the development on planning grounds.
> > >
> > >>Goodo. I'm in favour of banning private schools. Which one next?
> > >>One in Geelong springs to mind....
> > >
> > > I disagree they shouldn't be banned but I would support the government
> > > no
> > > longer funding them. Let the rich snobs pay the fee's themselves its
> > > not
> > > like they cant afford it. So they wont get to have a second helping of
> > > caviar big deal.
> >
> > Were you born naive or did you have to practice?
>
> >He votes labour, Doug. That's about as dumb as they get.
>
> Yes lets fund private schools for rich spoiled brats while the public
> school
> system is in chaos. That makes sense...

>Didn't we tell you to fuck off, Shawn?

Its a free country.

?Do?g??

5/26/2008 12:32:00 AM

0

"Seon F" <seon@iinet.net.au> wrote in message
news:4839ff2d$0$21134$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
>
> "Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
> news:0f474986-5aa6-4821-b29b-0831a23f59cb@w34g2000prm.googlegroups.com...
> Seon F wrote:
>> "Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
>> news:dbf0e22f-348c-4813-af07-cdca151bb217@x1g2000prh.googlegroups.com...
>> ???Doug??? wrote:
>> > "Seon F" <seon@iinet.net.au> wrote in message
>> > news:4838e8e8$0$21150$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
>> > >
>> > > "Addinall" <addinall@addinall.org> wrote in message
>> > > news:44128b65-8571-4572-a1d0-1b0075648df1@f24g2000prh.googlegroups.com...
>> > > On May 25, 12:02 am, Sir John Howard <sirjohnhow...@gmail.com> wrote:
>> > >> Council planners say no to arselifter school
>> > >>
>> > >> http://www.smh.com.au/news/national/council-planners-say-no......
>> > >>
>> > >> A MUSLIM society's plans to build a school in Camden have been dealt
>> > >> a
>> > >> severe blow after the council's experts yesterday recommended
>> > >> against
>> > >> the development on planning grounds.
>> > >
>> > >>Goodo. I'm in favour of banning private schools. Which one next?
>> > >>One in Geelong springs to mind....
>> > >
>> > > I disagree they shouldn't be banned but I would support the
>> > > government
>> > > no
>> > > longer funding them. Let the rich snobs pay the fee's themselves its
>> > > not
>> > > like they cant afford it. So they wont get to have a second helping
>> > > of
>> > > caviar big deal.
>> >
>> > Were you born naive or did you have to practice?
>>
>> >He votes labour, Doug. That's about as dumb as they get.
>>
>> Yes lets fund private schools for rich spoiled brats while the public
>> school
>> system is in chaos. That makes sense...
>
>>Didn't we tell you to fuck off, Shawn?
>
> Its a free country.

It won't be much longer if the Islamonazi pigs have anything to say about
it.


?Do?g??

5/26/2008 12:34:00 AM

0

I used to be a Demorat, oops make that Democrat, but now I see
that both parties in the USA are equally corrupt.

I'll have to do some research just to figure out what voting Labour
implies.

He may be naive, but he's not the enemy.

"Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
news:dbf0e22f-348c-4813-af07-cdca151bb217@x1g2000prh.googlegroups.com...
???Doug??? wrote:
> "Seon F" <seon@iinet.net.au> wrote in message
> news:4838e8e8$0$21150$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
> >
> > "Addinall" <addinall@addinall.org> wrote in message
> > news:44128b65-8571-4572-a1d0-1b0075648df1@f24g2000prh.googlegroups.com...
> > On May 25, 12:02 am, Sir John Howard <sirjohnhow...@gmail.com> wrote:
> >> Council planners say no to arselifter school
> >>
> >> http://www.smh.com.au/news/national/council-planners-say-no......
> >>
> >> A MUSLIM society's plans to build a school in Camden have been dealt a
> >> severe blow after the council's experts yesterday recommended against
> >> the development on planning grounds.
> >
> >>Goodo. I'm in favour of banning private schools. Which one next?
> >>One in Geelong springs to mind....
> >
> > I disagree they shouldn't be banned but I would support the government
> > no
> > longer funding them. Let the rich snobs pay the fee's themselves its not
> > like they cant afford it. So they wont get to have a second helping of
> > caviar big deal.
>
> Were you born naive or did you have to practice?

He votes labour, Doug. That's about as dumb as they get.


Seon

5/26/2008 6:02:00 AM

0


"???Doug???" <no?nen@now.com> wrote in message
news:7zn_j.410$89.293@nlpi069.nbdc.sbc.com...
> "Seon F" <seon@iinet.net.au> wrote in message
> news:4839ff2d$0$21134$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
>>
>> "Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
>> news:0f474986-5aa6-4821-b29b-0831a23f59cb@w34g2000prm.googlegroups.com...
>> Seon F wrote:
>>> "Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
>>> news:dbf0e22f-348c-4813-af07-cdca151bb217@x1g2000prh.googlegroups.com...
>>> ???Doug??? wrote:
>>> > "Seon F" <seon@iinet.net.au> wrote in message
>>> > news:4838e8e8$0$21150$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
>>> > >
>>> > > "Addinall" <addinall@addinall.org> wrote in message
>>> > > news:44128b65-8571-4572-a1d0-1b0075648df1@f24g2000prh.googlegroups.com...
>>> > > On May 25, 12:02 am, Sir John Howard <sirjohnhow...@gmail.com>
>>> > > wrote:
>>> > >> Council planners say no to arselifter school
>>> > >>
>>> > >> http://www.smh.com.au/news/national/council-planners-say-no......
>>> > >>
>>> > >> A MUSLIM society's plans to build a school in Camden have been
>>> > >> dealt a
>>> > >> severe blow after the council's experts yesterday recommended
>>> > >> against
>>> > >> the development on planning grounds.
>>> > >
>>> > >>Goodo. I'm in favour of banning private schools. Which one next?
>>> > >>One in Geelong springs to mind....
>>> > >
>>> > > I disagree they shouldn't be banned but I would support the
>>> > > government
>>> > > no
>>> > > longer funding them. Let the rich snobs pay the fee's themselves its
>>> > > not
>>> > > like they cant afford it. So they wont get to have a second helping
>>> > > of
>>> > > caviar big deal.
>>> >
>>> > Were you born naive or did you have to practice?
>>>
>>> >He votes labour, Doug. That's about as dumb as they get.
>>>
>>> Yes lets fund private schools for rich spoiled brats while the public
>>> school
>>> system is in chaos. That makes sense...
>>
>>>Didn't we tell you to fuck off, Shawn?
>>
>> Its a free country.
>
> It won't be much longer if the Islamonazi pigs have anything to say about
> it.
>
I dont think we will ever let Australia become a islamic dictatorship. I'd
die before I give up my rights.

Seon

5/26/2008 6:03:00 AM

0

Actually I'm coming to that realisation in Australia. I just think ALP is
the lesser of two evil's.

"???Doug???" <no?nen@now.com> wrote in message
news:UAn_j.411$89.294@nlpi069.nbdc.sbc.com...
>I used to be a Demorat, oops make that Democrat, but now I see
> that both parties in the USA are equally corrupt.
>
> I'll have to do some research just to figure out what voting Labour
> implies.
>
> He may be naive, but he's not the enemy.
>
> "Sir John Howard" <sirjohnhoward@gmail.com> wrote in message
> news:dbf0e22f-348c-4813-af07-cdca151bb217@x1g2000prh.googlegroups.com...
> ???Doug??? wrote:
>> "Seon F" <seon@iinet.net.au> wrote in message
>> news:4838e8e8$0$21150$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
>> >
>> > "Addinall" <addinall@addinall.org> wrote in message
>> > news:44128b65-8571-4572-a1d0-1b0075648df1@f24g2000prh.googlegroups.com...
>> > On May 25, 12:02 am, Sir John Howard <sirjohnhow...@gmail.com> wrote:
>> >> Council planners say no to arselifter school
>> >>
>> >> http://www.smh.com.au/news/national/council-planners-say-no......
>> >>
>> >> A MUSLIM society's plans to build a school in Camden have been dealt a
>> >> severe blow after the council's experts yesterday recommended against
>> >> the development on planning grounds.
>> >
>> >>Goodo. I'm in favour of banning private schools. Which one next?
>> >>One in Geelong springs to mind....
>> >
>> > I disagree they shouldn't be banned but I would support the government
>> > no
>> > longer funding them. Let the rich snobs pay the fee's themselves its
>> > not
>> > like they cant afford it. So they wont get to have a second helping of
>> > caviar big deal.
>>
>> Were you born naive or did you have to practice?
>
> He votes labour, Doug. That's about as dumb as they get.
>

B J Foster

5/26/2008 1:37:00 PM

0

???Doug??? wrote:
> "Seon F" <seon@iinet.net.au> wrote in message
> news:4839ff2d$0$21134$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
....
>> Its a free country.
>
> It won't be much longer if the Islamonazi pigs have anything to say about
> it.
>
>

This is the moron that wants to 'nuke' Turkey.