|
|
||
------------------------------------------------------------ Class: Time Implements the extensions to the Time class that are described in the documentation for the time.rb library. ------------------------------------------------------------------------ Includes: --------- Comparable(<, <=, ==, >, >=, between?) Constants: ---------- ZoneOffset: { 'UTC' => 0, # ISO 8601 'Z' => 0, # RFC 822 'UT' => 0, 'GMT' => 0, 'EST' => -5, 'EDT' => -4, 'CST' => -6, 'CDT' => -5, 'MST' => -7, 'MDT' => -6, 'PST' => -8, 'PDT' => -7, # Following definition of military zones is original one. # See RFC 1123 and RFC 2822 for the error in RFC 822. 'A' => 1, 'B' => 2, 'C' => 3, 'D' => 4, 'E' => 5, 'F' => 6, 'G' => 7, 'H' => 8, 'I' => 9, 'K' => 10, 'L' => 11, 'M' => 12, 'N' => -1, 'O' => -2, 'P' => -3, 'Q' => -4, 'R' => -5, 'S' => -6, 'T' => -7, 'U' => -8, 'V' => -9, 'W' => -10, 'X' => -11, 'Y' => -12, } LeapYearMonthDays: [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] CommonYearMonthDays: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] MonthValue: { 'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' =>10, 'NOV' =>11, 'DEC' =>12 RFC2822_DAY_NAME: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' RFC2822_MONTH_NAME: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' Class methods: -------------- _load, apply_offset, at, gm, httpdate, local, make_time, mktime, month_days, new, now, parse, rfc2822, times, utc, xmlschema, zone_offset, zone_utc? Instance methods: ----------------- , -, <=>, _dump, asctime, ctime, day, dst?, eql?, getgm, getlocal, getutc, gmt?, gmt_offset, gmtime, gmtoff, hash, hour, httpdate, inspect, isdst, iso8601, localtime, marshal_dump, marshal_load, mday, min, mon, month, rfc2822, rfc822, sec, strftime, succ, to_a, to_f, to_i, to_s, tv_sec, tv_usec, usec, utc, utc?, utc_offset, wday, xmlschema, yday, year, zone
==== Time ==== 時刻オブジェクト。Time.now は現在の時刻を返します。 File#stat [File/stat] の返すファイルのタイムスタンプは Time オブジェクトです。 Time オブジェクトは時刻を起算時からの経過秒数で保持しています。 起算時は協定世界時(UTC、もしくはその旧称から GMT とも表記されます) の 1970年1月1日午前0時です。なお、うるう秒を勘定するかどうかはシステムに よります。 また、Time オブジェクトは協定世界時と地方時のどちらのタイムゾー ンを使用するかのフラグを内部に保持しています。ただし、この情報は Marshal.dump では保存されず、Marshal.load で読み込んだ Time オブジェクトのタイムゾーンは常に地方時になりま す。 ---- Singleton methods ---- at gm local mktime new now times utc ---- Instance methods ---- - <=> asctime ctime day dst? getgm getlocal getutc gmt? gmt_offset gmtime gmtoff hour isdst localtime mday min mon month sec strftime to_a to_f to_i to_s tv_sec tv_usec usec utc utc? utc_offset wday yday year zone ---- Singleton methods (inherited) ---- ---- Instance methods (inherited) ---- < <= == === =~ > >= __id__ __send__ _dump _load between? class clone display dup eql? equal? extend freeze frozen? hash id initialize initialize_copy inspect instance_eval instance_of? instance_variable_get instance_variable_set instance_variables is_a? kind_of? marshal_dump marshal_load method method_missing methods nil? object_id pretty_print pretty_print_cycle pretty_print_instance_variables private_methods protected_methods public_methods remove_instance_variable respond_to? send singleton_method_added singleton_method_removed singleton_method_undefined singleton_methods taint tainted? to_ary to_hash to_int to_str type untaint
* はてなダイアリーキーワード:Time