Time object without minutes and seconds?

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

t.min
t.sec

Peace,
Phillip

Phillip Koebbe wrote:

t.min
t.sec

Peace,
Phillip

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

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?

Adrie

http://ruby-doc.org/core/classes/Time.html