Ruby 2.1.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Timeクラス > mon

instance method Time#mon

mon -> Integer[permalink][rdoc]
month -> Integer

月を整数で返します。


t = Time.local(2000,1,2,3,4,5)  # => 2000-01-02 03:04:05 +0900
p t.month                       # => 1
p t.mon                         # => 1