種類
- 特異メソッド (66)
- インスタンスメソッド (44)
- クラス (11)
- 文書 (10)
ライブラリ
- ビルトイン (22)
- date (44)
- time (44)
-
webrick
/ httpresponse (11)
クラス
- Date (33)
- DateTime (11)
- Time (44)
- UnboundMethod (11)
-
WEBrick
:: HTTPResponse (11)
キーワード
-
NEWS for Ruby 2
. 2 . 0 (10) - Time (11)
- []= (11)
-
_ httpdate (11) - parse (22)
-
source
_ location (11)
検索結果
先頭5件
-
Time
. httpdate(date) -> Time (18113.0) -
2616で定義されているHTTP-dateとしてdateをパースして Timeオブジェクトに変換します。
...。
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... -
Date
. httpdate(str = & # 39;Mon , 01 Jan -4712 00:00:00 GMT& # 39; , start = Date :: ITALY) -> Date (18107.0) -
2616 で定められた書式の日付を解析し、 その情報に基づいて日付オブジェクトを生成します。
...2616 で定められた書式の日付を解析し、
その情報に基づいて日付オブジェクトを生成します。
Date._httpdate も参照してください。
@param str 日付をあらわす文字列
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス... -
DateTime
. httpdate(str = & # 39;Mon , 01 Jan -4712 00:00:00 GMT& # 39; , start = Date :: ITALY) -> DateTime (18107.0) -
2616 で定められた書式の日付を解析し、 その情報に基づいて日付オブジェクトを生成します。
...2616 で定められた書式の日付を解析し、
その情報に基づいて日付オブジェクトを生成します。
Date._httpdate も参照してください。
@param str 日付をあらわす文字列
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス... -
Time
# httpdate -> String (18107.0) -
2616 で定義されている HTTP-date の rfc1123-date 形式の文字列を 返します。
...を返します。
//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"... -
Date
# httpdate -> String (18101.0) -
2616 (1123) で定められた書式の文字列を返します。
2616 (1123) で定められた書式の文字列を返します。 -
Date
. _ httpdate(str) -> Hash (6123.0) -
このメソッドは Date.httpdate と似ていますが、日付オブジェクトを生成せずに、 見いだした要素をハッシュで返します。
...このメソッドは Date.httpdate と似ていますが、日付オブジェクトを生成せずに、
見いだした要素をハッシュで返します。
Date.httpdate も参照してください。
@param str 日付をあらわす文字列... -
NEWS for Ruby 2
. 2 . 0 (6.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...e.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 は引数が日付や時刻の情報を含まない場合、Argume... -
Time (6.0)
-
時刻を表すクラスです。
...ist[][ruby]{
p Marshal.load(Marshal.dump(Time.now.gmtime)).zone
# => "UTC"
//}
time ライブラリによって、Time.parse, Time.rfc2822, Time.httpdate, Time.iso8601 等が拡張されます。
Ruby 1.9.2 以降の Time クラスのデザインの詳細は
https://staff.aist.go.jp/tanaka-akira/p... -
Time
. parse(date , now = Time . now) -> Time (6.0) -
...ドのフェイルセーフとして
以下のように使用できます:
require 'time'
Time.rfc2822(date) rescue Time.parse(date)
Time.httpdate(date) rescue Time.parse(date)
Time.xmlschema(date) rescue Time.parse(date)
従って Time.parse の失敗はチェックすべきです。... -
Time
. parse(date , now = Time . now) {|year| year } -> Time (6.0) -
...ドのフェイルセーフとして
以下のように使用できます:
require 'time'
Time.rfc2822(date) rescue Time.parse(date)
Time.httpdate(date) rescue Time.parse(date)
Time.xmlschema(date) rescue Time.parse(date)
従って Time.parse の失敗はチェックすべきです。...