22件ヒット
[1-22件を表示]
(0.070秒)
検索結果
-
Time
# month -> Integer (18325.0) -
月を整数で返します。
...月を整数で返します。
//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5) # => 2000-01-02 03:04:05 +0900
p t.month # => 1
p t.mon # => 1
//}... -
Time
# strftime(format) -> String (538.0) -
時刻を format 文字列に従って文字列に変換した結果を返します。
...-31)
* %e: 日。一桁の場合、半角空白で埋める ( 1..31)
* %F: %Y-%m-%d と同等 (ISO 8601の日付フォーマット)
* %G: ISO 8601の暦週の年
* %g: ISO 8601の暦週の年の下2桁(00-99)
* %H: 24時間制の時(00-23)
* %h: %b と同等
* %I: 12時間制の時(01-......Calendar date (basic)
p t.strftime("%F") # => 2001-02-03 Calendar date (extended)
p t.strftime("%Y-%m") # => 2001-02 Calendar date, reduced accuracy, specific month
p t.strftime("%Y") # => 2001 Calend......ime("%G-W%V") # => 2001-W05 Week date, reduced accuracy, specific week (extended)
p t.strftime("%H%M%S") # => 040506 Local time (basic)
p t.strftime("%T") # => 04:05:06 Local time (extended)
p t.strftime("%H%M")...