Am I missing something or .... irb(main):013:0> tim1 = Time.now => Sat Jan 19 23:40:23 +0100 2008irb(main):014:0> puts tim1.year 2008 => nil irb(main):015:0> puts tim1.month 1 => nil irb(main):016:0> puts tim1.day 19 => nil irb(main):017:0> puts tim1.hour 23 => nil irb(main):018:0> puts tim1.minute NoMethodError: undefined method `minute'' for Sat Jan 19 23:40:23 +0100 2008:Time from (irb):18 irb(main):019:0> puts tim1.minutes NoMethodError: undefined method `minutes'' for Sat Jan 19 23:40:23 +0100 2008:Tim e from (irb):19 irb(main):020:0> puts tim1.second NoMethodError: undefined method `second'' for Sat Jan 19 23:40:23 +0100 2008:Time from (irb):20 irb(main):021:0> puts tim1.seconds NoMethodError: undefined method `seconds'' for Sat Jan 19 23:40:23 +0100 2008:Tim e from (irb):21 irb(main):022:0> ??? TIA Adrie -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
http://ruby-doc.org/core/classes/Time.html There are no methods "minute" and "second". Use "min" and "sec" instead. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
t.min t.sec Peace, Phillip On Jan 19, 2008, at 4:45 PM, Adrie Donker wrote:> > Am I missing something or ....> irb(main):018:0> puts tim1.minute > NoMethodError: undefined method `minute'' for Sat Jan 19 23:40:23 +0100 > 2008:Time > > from (irb):18 > irb(main):019:0> puts tim1.minutes > NoMethodError: undefined method `minutes'' for Sat Jan 19 23:40:23 > +0100 > 2008:Tim > e > from (irb):19 > irb(main):020:0> puts tim1.second > NoMethodError: undefined method `second'' for Sat Jan 19 23:40:23 +0100 > 2008:Time > > from (irb):20 > irb(main):021:0> puts tim1.seconds > NoMethodError: undefined method `seconds'' for Sat Jan 19 23:40:23 > +0100 > 2008:Tim > e > from (irb):21 > irb(main):022:0> >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Koebbe wrote:> t.min > t.sec > > Peace, > Phillip > > On Jan 19, 2008, at 4:45 PM, Adrie Donker wrote: > >> >> Am I missing something or ....Thanks, but it is strange that the docs on http://www.railsdocumentation.org/api/ don''t mention min en sec but minutes en seconds instead. Why isn''t this documentation up-to-date? And... do you know whereto find an up-to-date reference? Adrie -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Adrie Donker wrote:> http://www.railsdocumentation.org/api/ don''t mention min en sec but > minutes en seconds instead. Why isn''t this documentation up-to-date? > And... do you know whereto find an up-to-date reference? > > Adriehttp://ruby-doc.org/core/classes/Time.html -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---