種類
ライブラリ
- ビルトイン (1705)
- base64 (12)
- benchmark (132)
-
cgi
/ core (24) -
cgi
/ session (12) -
cgi
/ util (12) - csv (48)
- date (518)
-
drb
/ timeridconv (48) - etc (120)
- expect (24)
-
fiddle
/ import (12) - fileutils (36)
-
io
/ console (24) -
io
/ wait (36) -
json
/ add / date _ time (24) -
json
/ add / time (24) - logger (93)
-
minitest
/ unit (2) - mkmf (12)
- monitor (18)
-
net
/ ftp (90) -
net
/ http (172) -
net
/ imap (36) -
net
/ pop (48) -
net
/ protocol (31) -
net
/ smtp (48) - objspace (12)
- observer (12)
- open-uri (12)
- openssl (492)
- optparse (48)
- pathname (59)
- profiler (6)
- psych (12)
-
racc
/ parser (12) - rake (84)
- resolv (12)
-
rinda
/ tuplespace (24) -
rubygems
/ package / tar _ header (12) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ security (12) -
rubygems
/ specification (48) -
rubygems
/ timer (12) - shell (36)
-
shell
/ command-processor (36) -
shell
/ filter (36) - socket (334)
-
syslog
/ logger (24) - thread (2)
- time (168)
- timeout (69)
-
webrick
/ accesslog (24) -
webrick
/ httprequest (12) -
webrick
/ httpresponse (12) -
webrick
/ httpservlet / filehandler (12) -
webrick
/ httpstatus (48) -
webrick
/ log (24) -
win32
/ registry (48) - win32ole (48)
- zlib (24)
クラス
- Array (12)
-
Benchmark
:: Tms (96) - CGI (36)
-
CGI
:: Cookie (36) -
CGI
:: Session (12) - CSV (48)
-
DRb
:: TimerIdConv (36) - Data (6)
- Date (84)
- DateTime (398)
- File (114)
-
File
:: Stat (48) -
Gem
:: Package :: TarHeader (12) -
Gem
:: RemoteFetcher (12) -
Gem
:: Security :: Policy (12) -
Gem
:: Specification (48) - IO (96)
- Integer (24)
- Logger (57)
-
Logger
:: Formatter (36) -
MiniTest
:: Unit (2) - Monitor (6)
-
MonitorMixin
:: ConditionVariable (12) - Mutex (2)
-
Net
:: FTP (60) -
Net
:: FTP :: MLSxEntry (30) -
Net
:: HTTP (134) -
Net
:: IMAP (36) -
Net
:: POP3 (48) -
Net
:: SMTP (48) - Object (24)
-
OpenSSL
:: ASN1 :: GeneralizedTime (24) -
OpenSSL
:: ASN1 :: UTCTime (24) -
OpenSSL
:: OCSP :: BasicResponse (24) -
OpenSSL
:: PKCS7 :: SignerInfo (12) -
OpenSSL
:: SSL :: SSLContext (60) -
OpenSSL
:: SSL :: Session (48) -
OpenSSL
:: X509 :: CRL (48) -
OpenSSL
:: X509 :: Certificate (48) -
OpenSSL
:: X509 :: Revoked (24) -
OpenSSL
:: X509 :: Store (12) -
OpenSSL
:: X509 :: StoreContext (12) - OptionParser (48)
- Pathname (59)
-
Process
:: Tms (96) -
Psych
:: ScalarScanner (12) -
Racc
:: Parser (12) -
Rake
:: EarlyTime (24) -
Rake
:: FileCreationTask (12) -
Rake
:: FileTask (12) -
Rake
:: Task (12) - Random (36)
-
Resolv
:: DNS (12) -
Rinda
:: TupleEntry (24) - Shell (36)
-
Shell
:: CommandProcessor (36) -
Shell
:: Filter (36) - Socket (168)
-
Socket
:: AncillaryData (12) - String (24)
-
Syslog
:: Logger (12) -
Syslog
:: Logger :: Formatter (12) - TCPSocket (10)
- Thread (12)
-
Thread
:: ConditionVariable (12) -
Thread
:: Mutex (10) - Time (1095)
- UnboundMethod (12)
-
WEBrick
:: Cookie (24) -
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (12) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (12) -
WEBrick
:: Log (24) -
WIN32OLE
_ TYPE (12) -
WIN32OLE
_ VARIANT (12) -
Win32
:: Registry (48) -
Zlib
:: GzipFile (12) -
Zlib
:: GzipWriter (12)
モジュール
- Base64 (12)
- Benchmark (36)
- Etc (120)
-
Fiddle
:: Importer (12) -
File
:: Constants (12) - FileUtils (24)
-
GC
:: Profiler (48) - Kernel (112)
- ObjectSpace (12)
-
OpenSSL
:: ASN1 (72) -
OpenSSL
:: OCSP (12) -
OpenSSL
:: X509 (24) -
OpenURI
:: Meta (12) - Process (204)
- Rake (12)
-
Socket
:: Constants (144) - Timeout (21)
-
WEBrick
:: AccessLog (12) -
WEBrick
:: HTTPStatus (24) -
WIN32OLE
:: VARIANT (12)
キーワード
- % (12)
- * (24)
- + (12)
- - (24)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - <=> (24)
- AccessLog (12)
- ArgumentError (12)
-
CLF
_ TIME _ FORMAT (12) -
CLOCK
_ BOOTTIME (12) -
CLOCK
_ BOOTTIME _ ALARM (12) -
CLOCK
_ MONOTONIC (12) -
CLOCK
_ PROCESS _ CPUTIME _ ID (12) -
CLOCK
_ REALTIME (12) -
CLOCK
_ REALTIME _ ALARM (12) -
CLOCK
_ REALTIME _ COARSE (12) -
CLOCK
_ REALTIME _ FAST (12) -
CLOCK
_ REALTIME _ PRECISE (12) -
CLOCK
_ THREAD _ CPUTIME _ ID (12) -
CLOCK
_ UPTIME (12) -
CLOCK
_ UPTIME _ FAST (12) -
CLOCK
_ UPTIME _ PRECISE (12) -
CLOCK
_ UPTIME _ RAW (12) -
CLOCK
_ UPTIME _ RAW _ APPROX (12) - Converters (12)
- Cookie (12)
- Date (12)
- DateTime (12)
- DateTimeMatcher (12)
- EARLY (12)
- ETIME (12)
- ETIMEDOUT (12)
- EarlyTime (12)
- Error (12)
- FORMAT (24)
- FileUtils (12)
- Float (12)
- GENERALIZEDTIME (12)
- GatewayTimeout (12)
- GeneralizedTime (36)
- HTTPGatewayTimeOut (12)
- HTTPGatewayTimeout (7)
- HTTPRequestTimeOut (12)
- HTTPRequestTimeout (7)
-
IFF
_ DISABLE _ NETPOLL (24) -
IP
_ TTL (24) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NOATIME (12)
- NOTIME (12)
- OCSP (12)
- Observable (12)
- OpenTimeout (12)
-
PC
_ TIMESTAMP _ RESOLUTION (12) -
Profiler
_ _ (6) -
RC
_ GATEWAY _ TIMEOUT (12) -
RC
_ REQUEST _ TIMEOUT (12) - Random (12)
- ReadTimeout (12)
- RequestTimeout (12)
- Ruby用語集 (12)
- RuntimeError (12)
-
SCM
_ BINTIME (24) -
SCM
_ TIMESTAMP (24) -
SCM
_ TIMESTAMPNS (24) -
SC
_ CPUTIME (12) -
SC
_ DELAYTIMER _ MAX (12) -
SC
_ REALTIME _ SIGNALS (12) -
SC
_ THREAD _ CPUTIME (12) -
SC
_ TIMEOUTS (12) -
SC
_ TIMERS (12) -
SC
_ TIMER _ MAX (12) -
SC
_ XOPEN _ REALTIME (12) -
SC
_ XOPEN _ REALTIME _ THREADS (12) -
SO
_ BINTIME (24) -
SO
_ RCVTIMEO (24) -
SO
_ SNDTIMEO (24) -
SO
_ TIMESTAMP (24) -
SO
_ TIMESTAMPNS (24) -
TCP
_ KEEPIDLE (24) -
TCP
_ KEEPINTVL (24) - TODAY (12)
- Time (12)
- Timeout (12)
- TimeoutError (8)
- TimerIdConv (12)
- UTCTIME (12)
- UTCTime (36)
-
VT
_ DATE (12) -
V
_ ERR _ CERT _ HAS _ EXPIRED (12) -
V
_ ERR _ CERT _ NOT _ YET _ VALID (12) - WIN32OLERuntimeError (12)
- WriteTimeout (7)
- [] (18)
- []= (12)
-
_ dump (12) -
_ strptime (24) - accept (24)
-
add
_ runtime _ dependency (12) -
add
_ status (12) - append (12)
- asctime (24)
- at (53)
- atime (66)
- benchmark (12)
- birthtime (45)
- call (24)
-
catch
_ timer (12) - ceil (6)
- cgi (12)
- civil (12)
-
clock
_ gettime (12) - commercial (12)
-
continue
_ timeout (12) -
continue
_ timeout= (12) - converters (12)
-
count
_ tdata _ objects (12) - create (10)
- cstime (24)
- cstime= (12)
- ctime (90)
- cutime (24)
- cutime= (12)
- date (12)
-
datetime
_ format (24) -
datetime
_ format= (24) - day (12)
-
deconstruct
_ keys (4) -
default
_ event _ sources (12) - define (6)
- drb (12)
-
drb
/ timeridconv (12) - dst? (12)
-
each
_ key (12) - encode64 (12)
- eql? (12)
- expect (24)
- expires (36)
- expires= (36)
- facts (10)
-
fetch
_ path (12) -
fiddle
/ import (12) - floor (6)
-
flush
_ sessions (12) - format (24)
-
format
_ date (12) -
format
_ datetime (12) - formatter (12)
- formatter= (24)
- friday? (12)
- getgm (12)
- getlocal (24)
- getutc (12)
- gm (24)
- gmt? (12)
-
gmt
_ offset (12) - gmtime (12)
- gmtoff (12)
-
handle
_ interrupt (12) - hash (12)
- header (12)
- hour (24)
- httpdate (36)
- inspect (18)
- isdst (12)
- iso8601 (48)
- jd (12)
- jisx0301 (24)
-
json
/ add / date _ time (12) -
json
/ add / time (12) -
json
_ create (24) -
keep
_ alive _ timeout (12) -
keep
_ alive _ timeout= (12) -
last
_ modified (12) -
last
_ update (12) -
last
_ update= (12) - local (24)
- localtime (24)
- lutime (8)
- mday (12)
- min (24)
- minute (12)
- mktime (24)
- modified? (12)
- modify (10)
- mon (12)
- monday? (12)
- month (12)
- mtime (102)
- mtime= (12)
- new (177)
-
new
_ offset (12) -
next
_ update (12) -
next
_ update= (12) -
not
_ after (12) -
not
_ after= (12) -
not
_ before (12) -
not
_ before= (12) -
not
_ modified? (12) - now (24)
- nsec (12)
- offset (12)
- open (5)
-
open
_ timeout (48) -
open
_ timeout= (48) - openssl (12)
-
optparse
/ time (12) - ordinal (12)
- out (12)
- parse (36)
-
parse
_ time (12) - profile (6)
-
racc
_ runtime _ type (12) - rand (36)
- raw (12)
- raw! (12)
-
raw
_ data (12) -
rb
_ thread _ select (1) -
rb
_ thread _ start _ timer (12) -
rb
_ thread _ stop _ timer (12) -
rb
_ thread _ wait _ for (12) -
rb
_ time _ timespec _ new (10) -
rb
_ timespec _ now (10) - rdoc (12)
-
read
_ timeout (48) -
read
_ timeout= (48) - realtime (12)
- reject (24)
-
remove
_ entry _ secure (12) - report (12)
-
request
_ time (12) - result (12)
-
rfc1123
_ date (12) - rfc2822 (36)
- rfc3339 (24)
- rfc822 (36)
- round (12)
- rss (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) -
rubygems
/ timer (12) -
runtime
_ dependencies (12) - saturday? (12)
- sec (24)
-
sec
_ fraction (12) - second (12)
-
second
_ fraction (12) - select (24)
-
signed
_ time (12) - sleep (12)
-
source
_ location (12) - sprintf (12)
- sprintf フォーマット (12)
-
ssl
_ timeout (24) -
ssl
_ timeout= (24) -
start
_ time (1) -
start
_ time= (1) - status (12)
- stime (24)
- stime= (12)
- strftime (24)
- strptime (48)
- struct (12)
- subsec (12)
- succ (7)
- sunday? (12)
- tcp (24)
- test (42)
- thursday? (12)
- time2wtime (12)
- time= (48)
-
time
_ format (12) -
time
_ format= (12) - timeofday (12)
- timeout (73)
- timeout= (24)
- timeouts= (12)
- times (36)
-
to
_ a (24) -
to
_ date (12) -
to
_ datetime (24) -
to
_ f (12) -
to
_ i (12) -
to
_ id (12) -
to
_ json (24) -
to
_ obj (12) -
to
_ r (12) -
to
_ s (24) -
to
_ time (24) - today (12)
-
total
_ time (12) - touch (12)
- tsort (12)
- tuesday? (12)
-
tv
_ nsec (12) -
tv
_ sec (12) -
tv
_ usec (12) - usec (12)
- utc (36)
- utc? (12)
-
utc
_ offset (12) - utime (66)
- utime= (12)
-
verify
_ gem (12) - wait (36)
-
wait
_ for _ cond (6) -
wait
_ readable (12) -
wait
_ writable (12) - wday (12)
-
webrick
/ cgi (12) - wednesday? (12)
-
write
_ timeout (7) -
write
_ timeout= (7) - wtime (12)
- wtime2time (12)
- xmlschema (48)
- yaml (12)
- yday (12)
- year (12)
- zone (24)
- パターンマッチ (3)
検索結果
先頭5件
-
time (38060.0)
-
組み込みの Time クラスを拡張します。 日時を表す文字列をパースして Time オブジェクトに変換したり、 逆に Time オブジェクトを RFC などで定められた文字列に 変換する機能を提供します。
...組み込みの Time クラスを拡張します。
日時を表す文字列をパースして Time オブジェクトに変換したり、
逆に Time オブジェクトを RFC などで定められた文字列に
変換する機能を提供します。
* date-time は 2822 で定義されてい......ます。
* HTTP-date は 2616 で定義されています。
* dateTime は XML Schema Part 2: Datatypes (ISO 8601) で定義されています。
* 文字列から Time オブジェクトへの変換では Date._parse により様々な形式を扱えます。... -
Time
. strptime(date , format , now=self . now) -> Time (23248.0) -
文字列を Date._strptime を用いて Time オブジェクト に変換します。
...time を用いて 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......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
end
}
#=> 2001-05-18 04:13:00 +0900
詳しくは DateTime.strptime, Date.strptime を見てください。
@param date... -
Time
. strptime(date , format , now=self . now) {|y| . . . } -> Time (23248.0) -
文字列を Date._strptime を用いて Time オブジェクト に変換します。
...time を用いて 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......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
end
}
#=> 2001-05-18 04:13:00 +0900
詳しくは DateTime.strptime, Date.strptime を見てください。
@param date... -
OpenSSL
:: SSL :: Session # time -> Time (18208.0) -
セッションが確立された時刻を返します。
...セッションが確立された時刻を返します。
@see OpenSSL::SSL::Session#time=,
OpenSSL::SSL::Session#timeout... -
OpenSSL
:: X509 :: Revoked # time -> Time (18202.0) -
失効した日時を返します。
失効した日時を返します。 -
Kernel
# time(msg , width = 25) { . . . } -> object (18101.0) -
与えられたブロックの実行時間を計測して表示します。
与えられたブロックの実行時間を計測して表示します。
@param msg 表示するメッセージを指定します。
@param width 表示する幅を指定します。
@return ブロックの実行結果を返します。 -
Time
. parse(date , now = Time . now) -> Time (17354.0) -
...date を Date._parse によって
パースして Timeオブジェクトに変換します。
ブロック付きで呼ばれた場合、dateの年はブロックによって変換されます。
require 'time'
Time.parse(...) {|y| y < 100 ? (y >= 69 ? y + 1900 : y + 2000) : y}
与えられ......当要素が使われます。
require '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 now 現在時刻をTime オブジェクトで指定します。
デフォルトはTime.nowとなります。
@raise ArgumentError dateに空文字列を与えた場合、発生します。
なお、1.9.2より前は例外は発生せず... -
Time
. parse(date , now = Time . now) {|year| year } -> Time (17354.0) -
...date を Date._parse によって
パースして Timeオブジェクトに変換します。
ブロック付きで呼ばれた場合、dateの年はブロックによって変換されます。
require 'time'
Time.parse(...) {|y| y < 100 ? (y >= 69 ? y + 1900 : y + 2000) : y}
与えられ......当要素が使われます。
require '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 now 現在時刻をTime オブジェクトで指定します。
デフォルトはTime.nowとなります。
@raise ArgumentError dateに空文字列を与えた場合、発生します。
なお、1.9.2より前は例外は発生せず... -
Time
. iso8601(date) -> Time (17208.0) -
XML Schema で定義されている dateTime として date をパースして Time オブジェクトに変換します。
...いる dateTime として
date をパースして Time オブジェクトに変換します。
date がISO 8601で定義されている形式に準拠していない、
または Time クラスが指定された日時を表現できないときに
ArgumentError が発生します。
Time オブジ......ェクトを ISO8601 形式の文字列にフォーマットする
インスタンスメソッド Time#iso8601, Time#xmlschema もあります。
@param date XML Schema で定義されている dateTime として
パースされる文字列を指定します。
@raise ArgumentError dat......または Time クラスが指定された日時を表現できないとき
に発生します。
使用例
require 'time'
iso8601_time = '2008-08-31T12:34:56+09:00'
t = Time.iso8601(iso8601_time)
p t #=> 2008-08-31 12:34:56 +0900
p t.kind_of?(Time) #=> true...