Mecharek Massinissa wrote:> bonjour
>
> jai deux dates
>
> @date_1 = date.new()
>
> @date_2 = date.new()
>
> quand jeffectue une comparaison entre ces deux dates ca me renvoie
> toujours un false
>
> alors ya il une autre maniere de comparer ces deux dates ,
>
> il ya une autre maniere c de creer une focntion qui compare les 3
> composantes de la date en loccurrrence mois année jour mais c chiant
> comme solution
>
> merci
>> d1 = Date.parse("2006-03-01")
=> #<Date: 4907591/2,0,2299161>>> d2 = Date.parse("2006-03-01")
=> #<Date: 4907591/2,0,2299161>>> d1 == d2
=> true
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---