るりまサーチ

最速Rubyリファレンスマニュアル検索!
109件ヒット [1-100件を表示] (0.113秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:httpdate[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Time#httpdate -> String (18369.0)

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

...HTTP-date の rfc1123-date 形式の文字列を
返します。

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

使用例
r
equire 'time'

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

Date.httpdate(str = &#39;Mon, 01 Jan -4712 00:00:00 GMT&#39;, start = Date::ITALY) -> Date (18308.0)

2616 で定められた書式の日付を解析し、 その情報に基づいて日付オブジェクトを生成します。

...で定められた書式の日付を解析し、
その情報に基づいて日付オブジェクトを生成します。

Date._httpdate も参照してください。

@param str 日付をあらわす文字列
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス日...

DateTime.httpdate(str = &#39;Mon, 01 Jan -4712 00:00:00 GMT&#39;, start = Date::ITALY) -> DateTime (18308.0)

2616 で定められた書式の日付を解析し、 その情報に基づいて日付オブジェクトを生成します。

...で定められた書式の日付を解析し、
その情報に基づいて日付オブジェクトを生成します。

Date._httpdate も参照してください。

@param str 日付をあらわす文字列
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス日...

Date#httpdate -> String (18301.0)

2616 (1123) で定められた書式の文字列を返します。

2616 (1123) で定められた書式の文字列を返します。

Date._httpdate(str) -> Hash (6323.0)

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

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

Date.httpdate も参照してください。

@param str 日付をあらわす文字列...

絞り込み条件を変える

Time.parse(date, now = Time.now) -> Time (6218.0)

...date を Date._parse によって
パースして Timeオブジェクトに変換します。

ブロック付きで呼ばれた場合、dateの年はブロックによって変換されます。

r
equire 'time'
Time.parse(...) {|y| y < 100 ? (y >= 69 ? y + 1900 : y + 2000) : y}

与えられ...
...

r
equire 'time'
time = Time.local(2019, 5, 1)
Time.parse("12:00", time) #=> 2019-05-01 12:00:00 +0900

下位の要素がなかったり壊れていた場合、最小値(1か0)が使われます。

@param date Time オブジェクトに変換可能な文字列を指定します。
@param n...
...ArgumentError が発生します。

このメソッドは他のパース用メソッドのフェイルセーフとして
以下のように使用できます:

r
equire 'time'

Time.rfc2822(date) rescue Time.parse(date)
Time.httpdate(date) rescue Time.parse(date)
Time.xmlschema(date) rescue...

Time.parse(date, now = Time.now) {|year| year } -> Time (6218.0)

...date を Date._parse によって
パースして Timeオブジェクトに変換します。

ブロック付きで呼ばれた場合、dateの年はブロックによって変換されます。

r
equire 'time'
Time.parse(...) {|y| y < 100 ? (y >= 69 ? y + 1900 : y + 2000) : y}

与えられ...
...

r
equire 'time'
time = Time.local(2019, 5, 1)
Time.parse("12:00", time) #=> 2019-05-01 12:00:00 +0900

下位の要素がなかったり壊れていた場合、最小値(1か0)が使われます。

@param date Time オブジェクトに変換可能な文字列を指定します。
@param n...
...ArgumentError が発生します。

このメソッドは他のパース用メソッドのフェイルセーフとして
以下のように使用できます:

r
equire 'time'

Time.rfc2822(date) rescue Time.parse(date)
Time.httpdate(date) rescue Time.parse(date)
Time.xmlschema(date) rescue...

UnboundMethod#source_location -> [String, Integer] | nil (6206.0)

ソースコードのファイル名と行番号を配列で返します。

... ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。

//emlist[例][ruby]{
r
equire 'time'

Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/rub...
...y/2.4.0/time.rb", 654]
//}

@see Proc#source_location, Method#source_location...

NEWS for Ruby 2.2.0 (3072.0)

NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 2.2.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.1.0 以降の変更

=== 言語仕様の変更

* nil/true/false
* nil/true/false はフリーズされました 8923

* Hash リテラル
* 後ろにコロンのあるシンボルをキー...
...time
* Time.parse, Time.strptime, Time.rfc2822, Time.xmlschema may produce
fixed-offset Time objects.
It is happen when usual localtime doesn't preserve the offset from UTC.
* Time.httpdate は常にUTCのTimeオブジェクトを生成します。
* Time.strptime は引数...

WEBrick::HTTPResponse#[]=(field, val) (3012.0)

レスポンスの該当するヘッダに val を設定します。

...@param field ヘッダ名を文字列で指定します。大文字と小文字を区別しません。

@param val ヘッダの値を指定します。to_s メソッドによって文字列に変換されます。

r
equire 'time'
r
es['last-modified'] = Time.now.httpdate

@see WEBrick::HTTPResp...
...onse#chunked?, WEBrick::HTTPResponse#content_length,
WEBrick::HTTPResponse#content_type...

絞り込み条件を変える

<< 1 2 > >>