Time

Time

ri

 ------------------------------------------------------------ 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

refe

 ==== 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

  • 2006/05/12 19:52:41 -
  • 2006/05/12 19:53:03 <=
  • 2006/05/12 19:53:11 <=>
  • 2006/05/12 19:53:41 >
  • 2006/05/12 19:54:20 ArgumentError
  • 2006/05/15 12:03:11 at
  • 2006/05/12 19:55:27 CGI::Cookie
  • 2006/05/12 19:55:49 CGI::Session
  • 2006/05/15 12:12:46 ctime
  • 2006/05/15 12:15:15 dump
  • 2006/05/15 12:18:15 eql?
  • 2006/05/15 12:23:56 flock
  • 2006/05/15 12:28:54 gm
  • 2006/05/15 12:32:31 inspect
  • 2006/05/15 12:38:13 load
  • 2006/05/15 12:38:21 local
  • 2006/05/15 12:41:16 min
  • 2006/05/15 12:41:31 mktime
  • 2006/05/15 12:41:48 mtime
  • 2006/05/15 12:42:14 new