ライブラリ
- ビルトイン (439)
- benchmark (96)
-
cgi
/ util (12) - csv (24)
- date (506)
- expect (24)
-
fiddle
/ import (12) - fileutils (12)
-
json
/ add / date _ time (24) -
json
/ add / time (12) - logger (93)
-
net
/ ftp (10) -
net
/ http (19) -
net
/ imap (36) - objspace (12)
- openssl (120)
- optparse (24)
- pathname (59)
- rake (24)
-
rinda
/ tuplespace (12) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ security (12) -
rubygems
/ specification (48) - shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) - socket (36)
-
syslog
/ logger (24) - time (120)
-
webrick
/ accesslog (12) -
webrick
/ httpstatus (48) -
webrick
/ log (24) - win32ole (12)
クラス
-
Benchmark
:: Tms (72) - CGI (12)
- CSV (24)
- Data (6)
- Date (84)
- DateTime (398)
- File (44)
-
File
:: Stat (48) -
Gem
:: RemoteFetcher (12) -
Gem
:: Security :: Policy (12) -
Gem
:: Specification (48) - IO (24)
- Integer (12)
- Logger (57)
-
Logger
:: Formatter (36) -
Net
:: FTP :: MLSxEntry (10) -
Net
:: IMAP (36) -
OpenSSL
:: OCSP :: BasicResponse (24) -
OpenSSL
:: X509 :: CRL (48) -
OpenSSL
:: X509 :: Certificate (48) - OptionParser (24)
- Pathname (59)
-
Process
:: Tms (48) -
Rake
:: FileCreationTask (12) -
Rake
:: FileTask (12) - Random (36)
-
Rinda
:: TupleEntry (12) - Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - Socket (12)
-
Socket
:: AncillaryData (12) -
Syslog
:: Logger (12) -
Syslog
:: Logger :: Formatter (12) - Thread (12)
- Time (281)
- UnboundMethod (12)
-
WEBrick
:: Log (24)
モジュール
- Benchmark (24)
-
Fiddle
:: Importer (12) -
File
:: Constants (12) - FileUtils (12)
-
GC
:: Profiler (24) - Kernel (36)
- ObjectSpace (12)
- Process (12)
-
Socket
:: Constants (12) -
WEBrick
:: AccessLog (12) -
WEBrick
:: HTTPStatus (24) -
WIN32OLE
:: VARIANT (12)
キーワード
- - (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - ArgumentError (12)
-
CLF
_ TIME _ FORMAT (12) - Date (12)
- DateTime (12)
- DateTimeMatcher (12)
- FORMAT (24)
- Float (12)
- GatewayTimeout (12)
- HTTPGatewayTimeOut (12)
- HTTPGatewayTimeout (7)
-
IFF
_ DISABLE _ NETPOLL (24) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NOATIME (12)
-
RC
_ GATEWAY _ TIMEOUT (12) -
RC
_ REQUEST _ TIMEOUT (12) - RequestTimeout (12)
- TODAY (12)
-
VT
_ DATE (12) -
_ strptime (24) - accept (24)
-
add
_ runtime _ dependency (12) -
add
_ status (12) - append (12)
- asctime (12)
- atime (66)
- birthtime (23)
- call (24)
-
catch
_ timer (12) - civil (12)
-
clock
_ gettime (12) - commercial (12)
-
count
_ tdata _ objects (12) - create (10)
- cstime (24)
- ctime (36)
- cutime (24)
- date (12)
-
datetime
_ format (24) -
datetime
_ format= (24) -
deconstruct
_ keys (2) - define (6)
- expect (24)
- expires (12)
-
fetch
_ path (12) -
fiddle
/ import (12) - format (24)
-
format
_ date (12) -
format
_ datetime (12) - formatter (12)
- formatter= (24)
-
handle
_ interrupt (12) - hour (12)
- httpdate (36)
- iso8601 (36)
- jd (12)
- jisx0301 (24)
-
json
/ add / date _ time (12) -
json
_ create (24) -
last
_ update (12) -
last
_ update= (12) - lutime (8)
- min (12)
- minute (12)
- mtime (24)
- new (33)
-
new
_ offset (12) -
next
_ update (12) -
next
_ update= (12) -
not
_ after (12) -
not
_ after= (12) -
not
_ before (12) -
not
_ before= (12) - now (12)
- offset (12)
- openssl (12)
- ordinal (12)
- parse (36)
- rand (36)
-
raw
_ data (12) - rdoc (12)
- realtime (12)
-
remove
_ entry _ secure (12) -
rfc1123
_ date (12) - rfc2822 (24)
- rfc3339 (24)
- rfc822 (24)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) -
runtime
_ dependencies (12) - saturday? (12)
- sec (12)
-
sec
_ fraction (12) - second (12)
-
second
_ fraction (12) -
source
_ location (12) - sprintf (12)
- sprintf フォーマット (12)
- status (12)
- stime (24)
- strftime (24)
- strptime (48)
- struct (12)
- subsec (12)
-
time
_ format (12) -
time
_ format= (12) - timeofday (12)
- times (12)
-
to
_ date (12) -
to
_ datetime (24) -
to
_ f (12) -
to
_ json (12) -
to
_ r (12) -
to
_ time (12) - today (12)
-
total
_ time (12) - utime (66)
-
verify
_ gem (12) - xmlschema (36)
- yaml (12)
- zone (12)
- パターンマッチ (3)
検索結果
先頭5件
-
Time
. at(time) -> Time (27525.0) -
time で指定した時刻の Time オブジェクトを返します。
...
time で指定した時刻の Time オブジェクトを返します。
キーワード引数 in でタイムゾーンを指定できます。タイムゾーンの指定がなく
引数が数値の場合、生成された Time オブジェクトのタイムゾーンは地方時となります。......@param time Time オブジェクト、もしくは起算時からの経過秒数を表わす数値で指定します。
@param in "+HH:MM" や "-HH:MM" のような形式の文字列か
"UTC" かミリタリータイムゾーンの文字列または
数値でタイムゾーンを......{
Time.at(0) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0)) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0).getutc) # => 1970-01-01 00:00:00 UTC
Time.at(946702800) # => 2000-01-01 14:00:00 +0900
Time.at(... -
Time
. at(time , in:) -> Time (27525.0) -
time で指定した時刻の Time オブジェクトを返します。
...
time で指定した時刻の Time オブジェクトを返します。
キーワード引数 in でタイムゾーンを指定できます。タイムゾーンの指定がなく
引数が数値の場合、生成された Time オブジェクトのタイムゾーンは地方時となります。......@param time Time オブジェクト、もしくは起算時からの経過秒数を表わす数値で指定します。
@param in "+HH:MM" や "-HH:MM" のような形式の文字列か
"UTC" かミリタリータイムゾーンの文字列または
数値でタイムゾーンを......{
Time.at(0) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0)) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0).getutc) # => 1970-01-01 00:00:00 UTC
Time.at(946702800) # => 2000-01-01 14:00:00 +0900
Time.at(... -
Time
. at(time) -> Time (27501.0) -
time で指定した時刻の Time オブジェクトを返します。
...
time で指定した時刻の Time オブジェクトを返します。
キーワード引数 in でタイムゾーンを指定できます。タイムゾーンの指定がなく
引数が数値の場合、生成された Time オブジェクトのタイムゾーンは地方時となります。......@param time Time オブジェクト、もしくは起算時からの経過秒数を表わす数値で指定します。
@param in "+HH:MM" や "-HH:MM" のような形式の文字列か
数値でタイムゾーンを指定します。
//emlist[][ruby]{
Time.at(0)......0
Time.at(Time.at(0)) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0).getutc) # => 1970-01-01 00:00:00 UTC
Time.at(946702800) # => 2000-01-01 14:00:00 +0900
Time.at(-284061600) # => 1960-12-31 15:00:00 +0900
Time.at(... -
Time
. at(time , in:) -> Time (27501.0) -
time で指定した時刻の Time オブジェクトを返します。
...
time で指定した時刻の Time オブジェクトを返します。
キーワード引数 in でタイムゾーンを指定できます。タイムゾーンの指定がなく
引数が数値の場合、生成された Time オブジェクトのタイムゾーンは地方時となります。......@param time Time オブジェクト、もしくは起算時からの経過秒数を表わす数値で指定します。
@param in "+HH:MM" や "-HH:MM" のような形式の文字列か
数値でタイムゾーンを指定します。
//emlist[][ruby]{
Time.at(0)......0
Time.at(Time.at(0)) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0).getutc) # => 1970-01-01 00:00:00 UTC
Time.at(946702800) # => 2000-01-01 14:00:00 +0900
Time.at(-284061600) # => 1960-12-31 15:00:00 +0900
Time.at(... -
Time
. at(time) -> Time (27469.0) -
time で指定した時刻の Time オブジェクトを返します。
...
time で指定した時刻の Time オブジェクトを返します。
引数が数値の場合、生成された Time オブジェクトのタイムゾーンは地方時となります。
@param time Time オブジェクト、もしくは起算時からの経過秒数を表わす数値で指定......{
Time.at(0) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0)) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0).getutc) # => 1970-01-01 00:00:00 UTC
Time.at(946702800) # => 2000-01-01 14:00:00 +0900
Time.at(......-284061600) # => 1960-12-31 15:00:00 +0900
Time.at(946684800.2).usec # => 200000
//}... -
Time
. at(time , usec) -> Time (27410.0) -
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。 浮動小数点の精度では不十分な場合に使用します。
...
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。
浮動小数点の精度では不十分な場合に使用します。
キーワード引数 in でタイムゾーンを指定できます。タイムゾーンの指定がない場合、
生成された Time オブ......のタイムゾーンは地方時となります。
@param time 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param usec マイクロ秒をInteger、 Float、 Rational、または他のNumericで指定します。
@para......m in "+HH:MM" や "-HH:MM" のような形式の文字列か
"UTC" かミリタリータイムゾーンの文字列または
数値でタイムゾーンを指定します。
//emlist[][ruby]{
Time.at(946684800, 123456.789).nsec # => 123456789
//}... -
Time
. at(time , usec , in:) -> Time (27410.0) -
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。 浮動小数点の精度では不十分な場合に使用します。
...
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。
浮動小数点の精度では不十分な場合に使用します。
キーワード引数 in でタイムゾーンを指定できます。タイムゾーンの指定がない場合、
生成された Time オブ......のタイムゾーンは地方時となります。
@param time 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param usec マイクロ秒をInteger、 Float、 Rational、または他のNumericで指定します。
@para......m in "+HH:MM" や "-HH:MM" のような形式の文字列か
"UTC" かミリタリータイムゾーンの文字列または
数値でタイムゾーンを指定します。
//emlist[][ruby]{
Time.at(946684800, 123456.789).nsec # => 123456789
//}... -
Time
. at(time , usec) -> Time (27406.0) -
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。 浮動小数点の精度では不十分な場合に使用します。
...
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。
浮動小数点の精度では不十分な場合に使用します。
キーワード引数 in でタイムゾーンを指定できます。タイムゾーンの指定がない場合、
生成された Time オブ......のタイムゾーンは地方時となります。
@param time 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param usec マイクロ秒をInteger、 Float、 Rational、または他のNumericで指定します。
@para......m in "+HH:MM" や "-HH:MM" のような形式の文字列か
数値でタイムゾーンを指定します。
//emlist[][ruby]{
Time.at(946684800, 123456.789).nsec # => 123456789
//}... -
Time
. at(time , usec , in:) -> Time (27406.0) -
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。 浮動小数点の精度では不十分な場合に使用します。
...
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。
浮動小数点の精度では不十分な場合に使用します。
キーワード引数 in でタイムゾーンを指定できます。タイムゾーンの指定がない場合、
生成された Time オブ......のタイムゾーンは地方時となります。
@param time 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param usec マイクロ秒をInteger、 Float、 Rational、または他のNumericで指定します。
@para......m in "+HH:MM" や "-HH:MM" のような形式の文字列か
数値でタイムゾーンを指定します。
//emlist[][ruby]{
Time.at(946684800, 123456.789).nsec # => 123456789
//}... -
Time
. at(time , usec) -> Time (27394.0) -
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。 浮動小数点の精度では不十分な場合に使用します。
...
time + (usec/1000000) の時刻を表す Time オブジェクトを返します。
浮動小数点の精度では不十分な場合に使用します。
生成された Time オブジェクトのタイムゾーンは地方時となります。
@param time 起算時からの経過秒数を表わ......す値をInteger、 Float、 Rational、または他のNumericで指定します。
@param usec マイクロ秒をInteger、 Float、 Rational、または他のNumericで指定します。
//emlist[][ruby]{
Time.at(946684800, 123456.789).nsec # => 123456789
//}... -
Time
. at(seconds , xseconds , unit) -> Time (27315.0) -
unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
...unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
@param seconds 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param xseconds unit に対応するミリ秒......ーンを指定します。
//emlist[][ruby]{
Time.at(946684800, 123.456789, :millisecond).nsec # => 123456789
Time.at(946684800, 123456.789, :usec).nsec # => 123456789
Time.at(946684800, 123456.789, :microsecond).nsec # => 123456789
Time.at(946684800, 123456789, :nsec).nsec # =>... -
Time
. at(seconds , xseconds , unit , in:) -> Time (27315.0) -
unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
...unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
@param seconds 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param xseconds unit に対応するミリ秒......ーンを指定します。
//emlist[][ruby]{
Time.at(946684800, 123.456789, :millisecond).nsec # => 123456789
Time.at(946684800, 123456.789, :usec).nsec # => 123456789
Time.at(946684800, 123456.789, :microsecond).nsec # => 123456789
Time.at(946684800, 123456789, :nsec).nsec # =>... -
Time
. at(seconds , xseconds , unit) -> Time (27311.0) -
unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
...unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
@param seconds 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param xseconds unit に対応するミリ秒......ーンを指定します。
//emlist[][ruby]{
Time.at(946684800, 123.456789, :millisecond).nsec # => 123456789
Time.at(946684800, 123456.789, :usec).nsec # => 123456789
Time.at(946684800, 123456.789, :microsecond).nsec # => 123456789
Time.at(946684800, 123456789, :nsec).nsec # =>... -
Time
. at(seconds , xseconds , unit , in:) -> Time (27311.0) -
unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
...unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
@param seconds 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param xseconds unit に対応するミリ秒......ーンを指定します。
//emlist[][ruby]{
Time.at(946684800, 123.456789, :millisecond).nsec # => 123456789
Time.at(946684800, 123456.789, :usec).nsec # => 123456789
Time.at(946684800, 123456.789, :microsecond).nsec # => 123456789
Time.at(946684800, 123456789, :nsec).nsec # =>... -
Time
. at(seconds , xseconds , unit) -> Time (27299.0) -
unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
...unit に応じて seconds + xseconds ミリ秒などの時刻を表す Time オブジェクトを返します。
@param seconds 起算時からの経過秒数を表わす値をInteger、 Float、 Rational、または他のNumericで指定します。
@param xseconds unit に対応するミリ秒......れかを指定します。
//emlist[][ruby]{
Time.at(946684800, 123.456789, :millisecond).nsec # => 123456789
Time.at(946684800, 123456.789, :usec).nsec # => 123456789
Time.at(946684800, 123456.789, :microsecond).nsec # => 123456789
Time.at(946684800, 123456789, :nsec).nsec # =>... -
Time
. strptime(date , format , now=self . now) -> Time (23448.0) -
文字列を Date._strptime を用いて Time オブジェクト に変換します。
...ate._strptime を用いて Time オブジェクト
に変換します。
require 'time'
Time.strptime('2001-02-03T04:05:06+09:00', '%Y-%m-%dT%H:%M:%S%z')
#=> 2001-02-03 06:05:06 +0900
ブロックを渡すと年の部分をブロックによって変換できます。
require 'time'
Time.......strptime('91/5/18 4:13:00', '%Y/%m/%d %T'){|y|
if y > 100 then y
elsif y >= 69 then y + 1900
else y + 2000
end
}
#=> 1991-05-18 04:13:00 +0900
Time.strptime('01/5/18 4:13:00', '%Y/%m/%d %T'){|y|
if y > 100 then y
elsif y >= 69 then y + 1900
else y + 2000
e......nd
}
#=> 2001-05-18 04:13:00 +0900
詳しくは DateTime.strptime, Date.strptime を見てください。
@param date 時刻を表す文字列
@param format 書式文字列... -
Time
. strptime(date , format , now=self . now) {|y| . . . } -> Time (23448.0) -
文字列を Date._strptime を用いて Time オブジェクト に変換します。
...ate._strptime を用いて Time オブジェクト
に変換します。
require 'time'
Time.strptime('2001-02-03T04:05:06+09:00', '%Y-%m-%dT%H:%M:%S%z')
#=> 2001-02-03 06:05:06 +0900
ブロックを渡すと年の部分をブロックによって変換できます。
require 'time'
Time.......strptime('91/5/18 4:13:00', '%Y/%m/%d %T'){|y|
if y > 100 then y
elsif y >= 69 then y + 1900
else y + 2000
end
}
#=> 1991-05-18 04:13:00 +0900
Time.strptime('01/5/18 4:13:00', '%Y/%m/%d %T'){|y|
if y > 100 then y
elsif y >= 69 then y + 1900
else y + 2000
e......nd
}
#=> 2001-05-18 04:13:00 +0900
詳しくは DateTime.strptime, Date.strptime を見てください。
@param date 時刻を表す文字列
@param format 書式文字列... -
Time
. httpdate(date) -> Time (23377.0) -
2616で定義されているHTTP-dateとしてdateをパースして Timeオブジェクトに変換します。
...るHTTP-dateとしてdateをパースして
Timeオブジェクトに変換します。
dateが2616に準拠していない、または
Timeクラスが指定された日時を表現できないときにArgumentErrorが
発生します。
@param date 2616で定義されているHTTP-dateとして......tError dateが2616に準拠していない、または 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 compliant date: "San, 31 Aug 2008 12:34:56 GMT"
end... -
Time
# httpdate -> String (23124.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-31......T12:34:56+09:00'
t = Time.iso8601(iso8601_time)
p t.httpdate #=> "Sun, 31 Aug 2008 03:34:56 GMT"...