[Nitro] [NP.ORG] Nitro/Og Fora daily digest
George Moschovitis
george.moschovitis at gmail.com
Tue May 22 02:13:36 EDT 2007
it doesnt check month/year...
On 5/22/07, Reid Thompson <reid.thompson at ateb.com> wrote:
>
> george.moschovitis at gmail.com wrote:
> > >From gmosx.myopenid.com
> > Date: Mon May 21 12:08:48 UTC 2007
> > Subject: Special compare of Ruby Time objects
> > Message-ID:
> http://www.nitroproject.org/fora/posts/view/airz-Eb5qr3jvheJeZaaqU
> >
> > Dear devs,
> >
> > is there an elegant way to find out if two Time objects represent the
> same day, ie ignore the hh:mm:ss part of the Time object in this
> comparisson?
> >
> > thanks in advance,
> > -g.
> >
> >
> >
> >
> > --
> > This mail is automatically generated from the
> http://nitroproject.org/fora
> > digest robot. It presents the discussions in the fora during the last 24
> hours.
> > Do not reply to this email.
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general
> >
> is
>
> t1 = Time.now
> t2 = Time.now
>
> if (t1.day == t2.day)
> then
> puts "the days are the same"
> else
> puts "the days are different"
> end
>
> t2 = t2 + 100323
>
> if (t1.day == t2.day)
> then
> puts "the days are the same"
> else
> puts "the days are different"
> end
>
> elegant????
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
--
http://georgeandstella.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070522/d651d926/attachment.html
More information about the Nitro-general
mailing list