るりまサーチ (Ruby 3.3)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.130秒)
トップページ > クエリ:I[x] > クエリ:h[x] > バージョン:3.3[x] > クエリ:time[x] > クエリ:month[x]

別のキーワード

  1. _builtin to_h
  2. hash to_h
  3. env to_h
  4. ostruct to_h
  5. struct to_h

ライブラリ

クラス

キーワード

検索結果

Time#month -> Integer (90940.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#httpdate -> String (78691.0)

2616 で定義されている HTTP-date の rfc1123-date 形式の文字列を 返します。

2616 で定義されている HTTP-date の rfc1123-date 形式の文字列を
返します。

@return 以下の形式の文字列を返します。
//emlist{
day-of-week, DD month-name CCYY hh:mm:ss GMT
//}
注意: 結果はいつも UTC (GMT) です。

使用例
require 'time'

iso8601_time = '2008-08-31T12:34:56+09:00'
t = Time.iso8601(iso8601_time)
p t.httpdate #=> "Su...

Time#strftime(format) -> String (73465.0)

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

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

@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。

* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世紀 (2009年であれば 20)
* %c: 日付と時刻 (%a %b %e %T %Y)
* %D: 日付 (%m/%d/%y)
* ...

Time#deconstruct_keys(array_of_names_or_nil) -> Hash (36799.0)

パターンマッチに使用する名前と値の Hash を返します。

パターンマッチに使用する名前と値の Hash を返します。

キーに利用できる名前は以下の通りです。

* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :subsec
* :dst
* :zone

@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。

//emlist[例][ruby]{
t = Time.utc(2022, 10, 5, 21, 25, 30)
...

DateTime#deconstruct_keys(array_of_names_or_nil) -> Hash (18781.0)

パターンマッチに使用する名前と値の Hash を返します。

パターンマッチに使用する名前と値の Hash を返します。

キーに利用できる名前は以下の通りです。

* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :sec_fraction
* :zone

@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。

//emlist[例][ruby]{
dt = DateTime.new(2022, 10, 5, 13, 30)

i...

絞り込み条件を変える