[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

[ANN] Duration 0.0.4

Matthew Harris

9/28/2006 4:30:00 PM

Hi,

I'd like to happily introduce Duration, the package for managing
timespan durations. Have you ever been in a situation where you wanted
to print a human-readable representation of a duration, maybe
something like "4 days, 20 minutes and 8 seconds"?

Well, Duration gives you this functionality. I have written a detailed
wiki article at http://wiki.rubyonrails.org/rails/page... where
you can read about how to install and use Duration.

The current version is 0.0.4 and is quite stable. If you find any
bugs, please email me the bug with a relevant email subject.

Any feature requests should be sent to my email as well, as I am very
interested in to hear and possibly implement what you as the user
would feel would enhance Duration.

Thanks.

--
Matt

11 Answers

Matthew Harris

9/29/2006 1:00:00 PM

0

On 9/29/06, Tanner Burson <tanner.burson@gmail.com> wrote:
> On 9/28/06, Matthew Harris <shugotenshi@gmail.com> wrote:
> >
> > Hi,
> >
> > I'd like to happily introduce Duration, the package for managing
> > timespan durations. Have you ever been in a situation where you wanted
> > to print a human-readable representation of a duration, maybe
> > something like "4 days, 20 minutes and 8 seconds"?
> >
> > Well, Duration gives you this functionality. I have written a detailed
> > wiki article at http://wiki.rubyonrails.org/rails/page... where
> > you can read about how to install and use Duration.
> >
> > The current version is 0.0.4 and is quite stable. If you find any
> > bugs, please email me the bug with a relevant email subject.
> >
> > Any feature requests should be sent to my email as well, as I am very
> > interested in to hear and possibly implement what you as the user
> > would feel would enhance Duration.
> >
> > Thanks.
> >
> > --
> > Matt
>
>
> You mention that it can convert number of days/weeks into months. How do
> you deal with the fact that a "month" doesn't have a standard number of
> days? Do you do as the Rails extension does by assuming a fixed number, or
> some other form of trickery?
>
>
> --
> ===Tanner Burson===
> tanner.burson@gmail.com
> http://tanner... <---Might even work one day...
>
>

Since durations are only based on timespans of fixed lengths, they do
not work relatively. So there is no time-detection magic to determine
the days in a given month, because also durations don't distinguish
between what month it is (whether it be January or Feburary).
BigDuration, the class that supports years and months will assume 30
days as 1 month, and 12 months as 1 year.

--
Matt

Jeremy Tregunna

9/29/2006 1:19:00 PM

0


On 06-09-29, at 08:59, Matthew Harris wrote:

> On 9/29/06, Tanner Burson <tanner.burson@gmail.com> wrote:
>> You mention that it can convert number of days/weeks into months.
>> How do
>> you deal with the fact that a "month" doesn't have a standard
>> number of
>> days? Do you do as the Rails extension does by assuming a fixed
>> number, or
>> some other form of trickery?
>
> Since durations are only based on timespans of fixed lengths, they do
> not work relatively. So there is no time-detection magic to determine
> the days in a given month, because also durations don't distinguish
> between what month it is (whether it be January or Feburary).
> BigDuration, the class that supports years and months will assume 30
> days as 1 month, and 12 months as 1 year.

Just to add a little bit here, in Io, our Duration module doesn't
know anything about months at the moment, instead adding up days. It
could keep a list holding the number of days in a month (in the case
of february, if a leap year is detected, replace the second item in
the list (28) with 29). Now that extension is pretty easy, but right
now we only keep track of years, days, hours, and so on. You might
consider doing something similar. It's fairly straight forward.

Also, out of curiosity, why have two Duration classes? I can't see
how BigDuration would be required, perhaps could you elaborate a little?

> Matt

--
Jeremy Tregunna
jtregunna@blurgle.ca



Matthew Harris

9/29/2006 1:42:00 PM

0

On 9/29/06, Jeremy Tregunna <jtregunna@blurgle.ca> wrote:
>
> On 06-09-29, at 08:59, Matthew Harris wrote:
>
> > On 9/29/06, Tanner Burson <tanner.burson@gmail.com> wrote:
> >> You mention that it can convert number of days/weeks into months.
> >> How do
> >> you deal with the fact that a "month" doesn't have a standard
> >> number of
> >> days? Do you do as the Rails extension does by assuming a fixed
> >> number, or
> >> some other form of trickery?
> >
> > Since durations are only based on timespans of fixed lengths, they do
> > not work relatively. So there is no time-detection magic to determine
> > the days in a given month, because also durations don't distinguish
> > between what month it is (whether it be January or Feburary).
> > BigDuration, the class that supports years and months will assume 30
> > days as 1 month, and 12 months as 1 year.
>
> Just to add a little bit here, in Io, our Duration module doesn't
> know anything about months at the moment, instead adding up days. It
> could keep a list holding the number of days in a month (in the case
> of february, if a leap year is detected, replace the second item in
> the list (28) with 29). Now that extension is pretty easy, but right
> now we only keep track of years, days, hours, and so on. You might
> consider doing something similar. It's fairly straight forward.
>
> Also, out of curiosity, why have two Duration classes? I can't see
> how BigDuration would be required, perhaps could you elaborate a little?
>
> > Matt
>
> --
> Jeremy Tregunna
> jtregunna@blurgle.ca
>
>
>
>

Duration and BigDuration are separate because BigDuration
independantly deals with years and months. Duration, when given a year
or a month will automatically change those to the number of weeks. I
wanted to strictly limit Duration to consistent numbers (weeks, days,
hours, minutes, seconds) and BigDuration to the inconsistent numbers
(months).

--
Matt

Alex Beauroy

7/28/2013 11:53:00 AM

0

On 27/07/2013 23:40, Tony Done wrote:
> On 28/07/2013 6:06 AM, David J. Littleboy wrote:
>> "Alex Beauroy" wrote in message news:kt0urv$4rr$1@dont-email.me...
>>>
>>> Anyone here have heard about an Ibanez LGB 30, made in China, cheaper
>>> than the Ibanez LGB 300????
>>> Thanks for your feedback, on this and on the Ibanez Artstar AF155!!!
>>> Best regards
>>> @lex
>>
>> The made in China Ibanez instruments that I've seen (and owned) have
>> been really nicely made, and can be improved by replacing the pickups.
>> YMMV, of course.
>>
>
> Me too. My mate sells them, and I've played a few. As you say, the
> pickups tend to be ordinary, but this is generally true of inexpensive
> Asian guitars. - I was looking in the hock shop yesterday, Samick,
> Magnums and the like for $60-200. They all seemed like decent bits of
> wood, and I bet I could turn most of them into good sounding and
> playing guitars with a set up and hardware change.
>
I just saw this on Facebook :
http://www.youtube.com/watch?v=LIDjfQGUkw4&featur...
Enjoy
Best Regards
@lex

Bill Williams

7/28/2013 3:47:00 PM

0

Tony Done

7/28/2013 7:07:00 PM

0

On 28/07/2013 9:53 PM, Alex Beauroy wrote:
> On 27/07/2013 23:40, Tony Done wrote:
>> On 28/07/2013 6:06 AM, David J. Littleboy wrote:
>>> "Alex Beauroy" wrote in message news:kt0urv$4rr$1@dont-email.me...
>>>>
>>>> Anyone here have heard about an Ibanez LGB 30, made in China, cheaper
>>>> than the Ibanez LGB 300????
>>>> Thanks for your feedback, on this and on the Ibanez Artstar AF155!!!
>>>> Best regards
>>>> @lex
>>>
>>> The made in China Ibanez instruments that I've seen (and owned) have
>>> been really nicely made, and can be improved by replacing the pickups.
>>> YMMV, of course.
>>>
>>
>> Me too. My mate sells them, and I've played a few. As you say, the
>> pickups tend to be ordinary, but this is generally true of inexpensive
>> Asian guitars. - I was looking in the hock shop yesterday, Samick,
>> Magnums and the like for $60-200. They all seemed like decent bits of
>> wood, and I bet I could turn most of them into good sounding and
>> playing guitars with a set up and hardware change.
>>
> I just saw this on Facebook :
> http://www.youtube.com/watch?v=LIDjfQGUkw4&featur...
> Enjoy
> Best Regards
> @lex

My mate has had a couple of the expensive version, very nice. Based on
my experience with in-store Ibanez, I would be happy with the Chinese
one if I wanted that style of guitar, keeping in mind I might want
different pickups fitted. - But that, for me, is true of any guitar
regardless of price.

--
Tony Done

http://www.soundclick.com/bands/default.cfm?ban...

http://www.flickr.com/photos/do...

Tom from Texas

7/29/2013 3:24:00 PM

0

On Sunday, July 28, 2013 2:06:32 PM UTC-5, Tony Done wrote:
> On 28/07/2013 9:53 PM, Alex Beauroy wrote:
>
> > On 27/07/2013 23:40, Tony Done wrote:
>
> >> On 28/07/2013 6:06 AM, David J. Littleboy wrote:
>
> >>> "Alex Beauroy" wrote in message news:kt0urv$4rr$1@dont-email.me...
>
> >>>>
>
> >>>> Anyone here have heard about an Ibanez LGB 30, made in China, cheaper
>
> >>>> than the Ibanez LGB 300????
>
> >>>> Thanks for your feedback, on this and on the Ibanez Artstar AF155!!!
>
> >>>> Best regards
>
> >>>> @lex
>
> >>>
>
> >>> The made in China Ibanez instruments that I've seen (and owned) have
>
> >>> been really nicely made, and can be improved by replacing the pickups.
>
> >>> YMMV, of course.
>
> >>>
>
> >>
>
> >> Me too. My mate sells them, and I've played a few. As you say, the
>
> >> pickups tend to be ordinary, but this is generally true of inexpensive
>
> >> Asian guitars. - I was looking in the hock shop yesterday, Samick,
>
> >> Magnums and the like for $60-200. They all seemed like decent bits of
>
> >> wood, and I bet I could turn most of them into good sounding and
>
> >> playing guitars with a set up and hardware change.
>
> >>
>
> > I just saw this on Facebook :
>
> > http://www.youtube.com/watch?v=LIDjfQGUkw4&featur...
>
> > Enjoy
>
> > Best Regards
>
> > @lex
>
>
>
> My mate has had a couple of the expensive version, very nice. Based on
>
> my experience with in-store Ibanez, I would be happy with the Chinese
>
> one if I wanted that style of guitar, keeping in mind I might want
>
> different pickups fitted. - But that, for me, is true of any guitar
>
> regardless of price.
>
>
>
> --
>
> Tony Done
>
>
>
> http://www.soundclick.com/bands/default.cfm?ban...
>
>
>
> http://www.flickr.com/photos/do...

Yep, I got an Ibanez AK86 from a pawnshop for $200 a few years back and put some Vintage Vibe pickups in it. Now, it's a very good guitar.

Tom from Texas

Alex Beauroy

7/29/2013 5:19:00 PM

0

On 28/07/2013 17:46, Bill Williams wrote:
> Tempting!
> http://www.thomann.de/gb/ibanez_lgb...
/As you just said!!!!//
//Tempting!!!!//
//Best Regards//
//@lex/

Alex Beauroy

7/29/2013 5:32:00 PM

0

On 28/07/2013 21:06, Tony Done wrote:
> On 28/07/2013 9:53 PM, Alex Beauroy wrote:
>> On 27/07/2013 23:40, Tony Done wrote:
>>> On 28/07/2013 6:06 AM, David J. Littleboy wrote:
>>>> "Alex Beauroy" wrote in message news:kt0urv$4rr$1@dont-email.me...
>>>>>
>>>>> Anyone here have heard about an Ibanez LGB 30, made in China, cheaper
>>>>> than the Ibanez LGB 300????
>>>>> Thanks for your feedback, on this and on the Ibanez Artstar AF155!!!
>>>>> Best regards
>>>>> @lex
>>>>
>>>> The made in China Ibanez instruments that I've seen (and owned) have
>>>> been really nicely made, and can be improved by replacing the pickups.
>>>> YMMV, of course.
>>>>
>>>
>>> Me too. My mate sells them, and I've played a few. As you say, the
>>> pickups tend to be ordinary, but this is generally true of inexpensive
>>> Asian guitars. - I was looking in the hock shop yesterday, Samick,
>>> Magnums and the like for $60-200. They all seemed like decent bits of
>>> wood, and I bet I could turn most of them into good sounding and
>>> playing guitars with a set up and hardware change.
>>>
>> I just saw this on Facebook :
>> http://www.youtube.com/watch?v=LIDjfQGUkw4&featur...
>> Enjoy
>> Best Regards
>> @lex
>
> My mate has had a couple of the expensive version, very nice. Based on
> my experience with in-store Ibanez, I would be happy with the Chinese
> one if I wanted that style of guitar, keeping in mind I might want
> different pickups fitted. - But that, for me, is true of any guitar
> regardless of price.
>
/Mr. Tony Done is the "T Bone Walker" of Usenet!!!! //
//Do you remember he had a three pick-ups arch-top guitar at a time, and
he was playing it quite //
//in parallel alongside the floor and the top facing the selling, like
pedal-steel guitar players do on their knees!!!//
//Best Regards//
//@lex/

Tony Done

7/29/2013 7:24:00 PM

0

On 30/07/2013 3:31 AM, Alex Beauroy wrote:
>>
> /Mr. Tony Done is the "T Bone Walker" of Usenet!!!! //
> //Do you remember he had a three pick-ups arch-top guitar at a time, and
> he was playing it quite //
> //in parallel alongside the floor and the top facing the selling, like
> pedal-steel guitar players do on their knees!!!//
> //Best Regards//
> //@lex/

Yeah, T Bone had some good sounds. I have a Lollar Chicago pickup
sitting in my parts box. According to him it was inspired by old
National pickups and TBW, hot and nasty. Huge honky output.

--
Tony Done

http://www.soundclick.com/bands/default.cfm?ban...

http://www.flickr.com/photos/do...