るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

検索結果

Time#httpdate -> String (18275.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) です。

使用例
require '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"...

Time.httpdate(date) -> Time (18241.0)

2616で定義されているHTTP-dateとしてdateをパースして Timeオブジェクトに変換します。

...いるHTTP-dateとしてdateをパースして
Timeオブジェクトに変換します。

dateが2616に準拠していない、または
Timeクラスが指定された日時を表現できないときにArgumentErrorが
発生します。

@param date 2616で定義されているHTTP-dateとし...
...

require 'time'
rfc2616_time = 'Sun, 31 Aug 2008 12:34:56 GMT'

t = Time.httpdate(rfc2616_time)
p t.kind_of?(Time) #=> true

non_rfc2616_time = 'San, 31 Aug 2008 12:34:56 GMT'
begin
Time.httpdate(non_rfc2616_time)
rescue ArgumentError => err
puts err #=> not RFC 2616 compl...

NEWS for Ruby 2.2.0 (84.0)

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

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

== 2.1.0 以降の変更

=== 言語仕様の変更

* nil/true/false
* nil/true/false はフ...
...りました。
* ArgumentError is no longer raised when lambda Proc is passed as a
block, and the number of yielded arguments does not match the formal
arguments of the lambda, if just an array is yielded and its length
matches.

* Process
* Process.spawn のようなプ...
...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 は引数...