るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.027秒)
トップページ > クエリ:Hash[x] > クエリ:_strptime[x] > 種類:特異メソッド[x]

別のキーワード

  1. _builtin hash
  2. hash []
  3. dbm to_hash
  4. matrix hash
  5. _builtin to_hash

ライブラリ

クラス

検索結果

Date._strptime(str, format = '%F') -> Hash (18203.0)

このメソッドは Date.strptime と似ていますが、日付オブジェクトを生成せずに、 見いだした要素をハッシュで返します。

このメソッドは Date.strptime と似ていますが、日付オブジェクトを生成せずに、
見いだした要素をハッシュで返します。

@param str 日付をあらわす文字列
@param format 書式文字列

書式文字列に使用できるものは以下の通りです。

* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世紀 (2009年であれば 20)
* %c: 日付...

DateTime._strptime(str, format = '%FT%T%z') -> Hash (18203.0)

与えられた雛型で日時表現を解析し、その情報に基づいてハッシュを生成します。

...す文字列
@param format 書式

例:

require 'date'
DateTime._strptime('2001-02-03T12:13:14Z')
# => {:year=>2001, :mon=>2, :mday=>3, :hour=>12, :min=>13, :sec=>14, :zone=>"Z", :offset=>0}

DateTime.strptime の内部で使用されています。

@see Date._strptime, DateTime.strptime...