るりまサーチ

最速Rubyリファレンスマニュアル検索!
479件ヒット [201-300件を表示] (0.024秒)

別のキーワード

  1. time iso8601
  2. time rfc2822
  3. time httpdate
  4. time parse
  5. time strptime

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 4 5 > >>

Time (6084.0)

時刻を表すクラスです。

...時刻を表すクラスです。

Time
.now は現在の時刻を返します。
File.mtime などが返すファイルのタイムスタンプは Time
オブジェクトです。

Time
オブジェクトは時刻を起算時からの経過秒数で保持しています。
起算時は協定世界...
...定するかどうかはシステムに
よります。

Time
オブジェクトが格納可能な時刻の範囲は環境によって異なっていましたが、
Ruby 1.9.2 からは OS の制限の影響を受けません。

また、Time オブジェクトは協定世界時と地方時のど...
...ます。

//emlist[][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.j...

DateTime (6012.0)

日付だけでなく時刻も扱える Date のサブクラスです。

...も扱える Date のサブクラスです。

DateTime は deprecated とされているため、
Time
を使うことを推奨します。

=== 簡単なつかいかた

require 'date'

a = DateTime.new(1993, 2, 24, 12, 30, 45)
b = DateTime.parse('1993-02-24T12:30:45')
b += 10

b - a...
...#=> 10
b.year #=> 1993
b.strftime('%a') #=> "Sat"

yesterday = DateTime.now - 1...

DateTime#to_json(*args) -> String (3006.0)

自身を JSON 形式の文字列に変換して返します。

...ま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。

//emlist[例][ruby]{
require "json/add/core"

DateTime.now.to_json
# => "{\"json_class\":\"DateTime\",\"y\":2018,\"m\":12,\"d\":10,\"H\":1,\"M\":28,\"S\":57,\"of\":\"3/8\",\"sg\":2299161.0}"
//}

@see JSON::Generator::Generat...

DateTime.today(start = Date::ITALY) -> Date (3006.0)

このクラスでは利用できません。

...このクラスでは利用できません。

DateTime.now を参照してください。

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

Gem::Security::Policy#verify_gem(signature, data, chain, time = Time.now) -> Array (309.0)

与えられたデータを与えられた署名と証明書チェーンで検証します。

...します。

@param data 検証するデータを指定します。

@param chain 検証で使用する証明書チェーンを指定します。

@param time この時刻に有効であることを検証する。

@raise Gem::Security::Exception 検証に失敗した場合に発生します。...

絞り込み条件を変える

NEWS for Ruby 3.0.0 (198.0)

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

...rguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the...
...3.0 => [[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in...
...s in methods is now a SyntaxError
instead of a warning. yield in a class definition outside of a method
is now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a RuntimeError is now raised (previo...

CGI.rfc1123_date(time) -> String (125.0)

与えられた時刻を 1123 フォーマットに準拠した文字列に変換します。

...与えられた時刻を 1123 フォーマットに準拠した文字列に変換します。

@param time Time のインスタンスを指定します。

例:
require "cgi"

CGI.rfc1123_date(Time.now)
# => Sat, 1 Jan 2000 00:00:00 GMT...

Net::IMAP#append(mailbox, message, flags = nil, date_time = nil) -> Net::IMAP::TaggedResponse (125.0)

APPEND コマンドを送ってメッセージをメールボックスの末尾に追加します。

...を送ってメッセージをメールボックスの末尾に追加します。


例:
imap.append("inbox", <<EOF.gsub(/\n/, "\r\n"), [:Seen], Time.now)
Subject: hello
From: someone@example.com
To: somebody@example.com

hello world
EOF

@param mailbox メッセージを追加する...
...字列)
@param message メッセージ文字列
@param flags メッセージに付加するフラグ(Symbol の配列)
@param date_time メッセージの時刻(Time オブジェクト)。省略時は現在時刻が使われる
@raise Net::IMAP::NoResponseError メールボックスが存在しな...

NEWS for Ruby 3.1.0 (114.0)

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

...asure_total_time = true でGCの計測を有効にします。計測によってオーバーヘッドが発生する可能性があります。デフォルトで有効になっています。 GC.measure_total_time は現在の設定を返します。 GC.stat[:time] または GC.stat(:time) は、測...
...定された時間をミリ秒で返します。 10917
* GC.total_time が計測された時間をナノ秒で返します。 10917

* Integer
* 新規メソッド
* Integer.try_convert が追加されました。 15211

* Kernel
* 変更されたメソッド
* Kernel#l...
...るようになりました。 17327

* Time
* 変更されたメソッド
* Time.new は、Time.at や Time.now と同じようにタイムゾーンの in: キーワード引数を任意で渡せるようになりました。これにより Time.new の細かい引数を省略できる...

rss (108.0)

RSS を扱うためのライブラリです。

...数に false を指定して
ください。こうすると、パース中に知らない要素に遭遇した時に
RSS::UnknownTagError 例外が発生します。RSS::UnknownTagError
クラスは RSS::InvalidError クラスのサブクラスです。

以下のようにすると,より厳密に...
....com/"

maker.items.new_item do |item|
item.link = "http://example.com/article.html"
item.title = "Sample Article"
item.date = Time.parse("2004/11/1 10:10")
end
end

サンプル中の

item.date = ...



item.dc_date = ...

でも構いません.#dc_date=は#dat...
...ml"
item.title = "Sample Article"
item.date = Time.parse("2004/11/1 10:10")
end

maker.items.new_item do |item|
item.link = "http://example.com/article2.html"
item.title = "Sample Article2"
item.date = Time.parse("2004/11/2 10:10")
end
end

===== エント...

絞り込み条件を変える

tsort (66.0)

tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。

...inputs_time = inputs.map {|f| File.mtime f}.max
begin
outputs_time = outputs.map {|f| File.mtime f}.min
rescue Errno::ENOENT
outputs_time = nil
end
if outputs_time == nil ||
inputs_time != nil && outputs_time <= inputs_time...
...sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i
block.call
end
end
}
end

def tsort_each_child(node, &block)
@dep[node].each(&block)
end
include TSort
end

def command(arg)
print arg, "\n"
system arg
end

m = Make.new
m.rule(%w[t1]) { c...

NEWS for Ruby 2.0.0 (60.0)

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

...スレッドがメインスレッドか現在のスレッドである場合、
ThreadError を発生させます

* Time
* 返り値変更:
* Time#to_s now returns US-ASCII encoding instead of BINARY.

* TracePoint
* new class. This class is replacement of set_trace_func....
...s doesn't inherit to spawned process unless
explicitly requested such as system(..., fd=>fd).

* Kernel#respond_to? against a protected method now returns false
unless the second argument is true.

* Object#respond_to_missing?, Object#initialize_clone, Object#initialize_dup
* private...
..., IO#getch キーワード引数 :min, :time を受け付けます。

* io/wait
* 追加: IO#wait_writable
* 追加: IO#wait_readable は IO#wait の別名です。

* json
* 1.7.7 に更新

* net/http
* 新機能
* Proxies are now automatically detected from the http_p...
<< < 1 2 3 4 5 > >>