るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.039秒)

別のキーワード

  1. socket pf_local
  2. socket af_local
  3. socket local_creds
  4. socket local_connwait
  5. socket local_peercred

ライブラリ

クラス

キーワード

検索結果

Time#month -> Integer (15113.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 (96.0)

時刻を format 文字列に従って文字列に変換した結果を返します。

...3 Calendar date (extended)
p t.strftime("%Y-%m") # => 2001-02 Calendar date, reduced accuracy, specific month
p t.strftime("%Y") # => 2001 Calendar date, reduced accuracy, specific year
p t.strftime("%C") #...
...xtended)
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") # => 0405 Local time, reduced accuracy, specific minute (basic)
p t....
...# => 04 Local time, reduced accuracy, specific hour
p t.strftime("%H%M%S,%L") # => 040506,000 Local time with decimal fraction, comma as decimal sign (basic)
p t.strftime("%T,%L") # => 04:05:06,000 Local time with decima...

Time#mon -> Integer (13.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#to_a -> Array (12.0)

時刻を10要素の配列で返します。

...算日 (整数 1-366)
* isdst: 夏時間であるかどうか (true/false)
* zone: タイムゾーン (文字列)

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5)
p t # => 2000-01-02 03:04:05 +0900
p t.to_a # => [5, 4, 3, 2, 1, 2000, 0, 2, false, "JST"]
//}

要素の順序は C 言語...
...の tm 構造体に合わせています。ただし、
tm 構造体に zone はありません。

注意: C 言語の tm 構造体とは異なり、month は 1 月に対
して 1 を返し、year は 1998 年に対して 1998 を返します。また、
yday は 1 から数えます。...