Time
ruby/spec describes 68 methods in core/time, and Metorex implements 68 of them. The parameters are what Method#parameters answers under Metorex.
Encoding#
Encoding.default_internal: implemented, parameters[[:req, :args]]. Returns default internal encoding. An example calling it.
Time#
Time#+: implemented, parameters[[:req, :other]]. Returns a newTimeobject whose value is the sum of the numeric value ofselfand the givennumeric:Time#-: implemented, parameters[[:req, :other]]. Whennumericis given, returns a newTimeobject whose value is the difference of the numeric value ofselfandnumeric:Time#<=>: implemented, parameters[[:req, :other]]. Comparesselfwithother_time; returns:Time#_dump: implemented, parameters[[:opt, :_limit]].Time._load: implemented, parameters[[:req, :written]].Time#asctime: implemented, parameters[]. Returns a string representation ofself, formatted bystrftime('%a %b %e %T %Y')or its shorthand versionstrftime('%c'); see Formats for Dates and Times: An example calling it.Time.at: implemented, parameters[[:req, :seconds], [:rest, :rest], [:keyrest, :options]]. Returns a newTimeobject based on the given arguments. An example calling it.Time#ceil: implemented, parameters[[:opt, :digits]]. Returns a newTimeobject whose numerical value is greater than or equal toselfwith its seconds truncated to precisionndigits: An example calling it.Time#ctime: implemented, parameters[]. Returns a string representation ofself, formatted bystrftime('%a %b %e %T %Y')or its shorthand versionstrftime('%c'); see Formats for Dates and Times:Time#day: implemented, parameters[]. Returns the integer day of the month forself, in range (1..31): An example calling it.Time#deconstruct_keys: implemented, parameters[[:req, :keys]]. Returns a hash of the name/value pairs, to use in pattern matching. An example calling it.Time#dst?: implemented, parameters[]. Returnstrueifselfis in daylight saving time,falseotherwise:Time#dup: implemented, parameters[]. Produces a shallow copy of obj---the instance variables of obj are copied, but not the objects they reference. An example calling it.Time#eql?: implemented, parameters[[:req, :other]]. Returnstrueifselfandother_timeare bothTimeobjects with the exact same time value. An example calling it.Time#floor: implemented, parameters[[:opt, :digits]]. Returns a newTimeobject whose numerical value is less than or equal toselfwith its seconds truncated to precisionndigits: An example calling it.Time#friday?: implemented, parameters[]. Returnstrueifselfrepresents a Friday,falseotherwise:Time#getgm: implemented, parameters[]. Returns a newTimeobject representing the value ofselfconverted to the UTC timezone:Time#getlocal: implemented, parameters[[:opt, :offset]]. Returns a newTimeobject representing the value ofselfconverted to a given timezone; ifzoneisnil, the local timezone is used: An example calling it.Time#getutc: implemented, parameters[]. Returns a newTimeobject representing the value ofselfconverted to the UTC timezone:Time.gm: implemented, parameters[[:rest, :args]]. Returns a newTimeobject based the on given arguments, in the UTC timezone.Time#gmt?: implemented, parameters[]. Returnstrueifselfrepresents a time in UTC (GMT):Time#gmt_offset: implemented, parameters[]. Returns the offset in seconds between the timezones of UTC andself:Time#gmtime: implemented, parameters[]. Returnsself, converted to the UTC timezone: An example calling it.Time#gmtoff: implemented, parameters[]. Returns the offset in seconds between the timezones of UTC andself:Time#hash: implemented, parameters[]. Returns the integer hash code forself. An example calling it.Time#hour: implemented, parameters[]. Returns the integer hour of the day forself, in range (0..23): An example calling it.Time#inspect: implemented, parameters[]. Returns a string representation ofselfwith subseconds: An example calling it.Time#isdst: implemented, parameters[]. Returnstrueifselfis in daylight saving time,falseotherwise:Time#iso8601: implemented, parameters[[:opt, :fraction]]. Parsestimeas a dateTime defined by the XML Schema and converts it to a Time object. An example calling it.Time.local: implemented, parameters[[:rest, :args]]. Like Time.utc, except that the returnedTimeobject has the local timezone, not the UTC timezone:Time#localtime: implemented, parameters[[:opt, :offset]]. With no argument given: An example calling it.Time#mday: implemented, parameters[]. Returns the integer day of the month forself, in range (1..31):Time#min: implemented, parameters[]. Returns the integer minute of the hour forself, in range (0..59): An example calling it.Time.mktime: implemented, parameters[[:rest, :args]]. Like Time.utc, except that the returnedTimeobject has the local timezone, not the UTC timezone:Time#mon: implemented, parameters[]. Returns the integer month of the year forself, in range (1..12):Time#monday?: implemented, parameters[]. Returnstrueifselfrepresents a Monday,falseotherwise: An example calling it.Time#month: implemented, parameters[]. Returns the integer month of the year forself, in range (1..12): An example calling it.Time.new: implemented, parameters[[:rest, :args], [:keyrest, :options]]. Returns a newTimeobject based on the given arguments, by default in the local timezone. An example calling it.Time.now: implemented, parameters[[:keyrest, :options]]. Creates a newTimeobject from the current system time. An example calling it.Time#nsec: implemented, parameters[]. Returns the number of nanoseconds in the subseconds part ofselfin the range (0..999_999_999); lower-order digits are truncated, not rounded: An example calling it.Time#round: implemented, parameters[[:opt, :digits]]. Returns a newTimeobject whose numeric value is that ofself, with its seconds value rounded to precisionndigits: An example calling it.Time#saturday?: implemented, parameters[]. Returnstrueifselfrepresents a Saturday,falseotherwise: An example calling it.Time#sec: implemented, parameters[]. Returns the integer second of the minute forself, in range (0..60): An example calling it.Time#strftime: implemented, parameters[[:req, :template]]. Returns a string representation ofself, formatted according to the given stringformat. An example calling it.Time#subsec: implemented, parameters[]. Returns the exact subseconds forselfas a Numeric (Integer or Rational): An example calling it.Time#sunday?: implemented, parameters[]. Returnstrueifselfrepresents a Sunday,falseotherwise:Time#thursday?: implemented, parameters[]. Returnstrueifselfrepresents a Thursday,falseotherwise:Time#to_a: implemented, parameters[]. Returns a 10-element array of values representingself: An example calling it.Time#to_f: implemented, parameters[]. Returns the value ofselfas a Float number Epoch seconds; subseconds are included. An example calling it.Time#to_i: implemented, parameters[]. Returns the value ofselfas integer Epoch seconds; subseconds are truncated (not rounded): An example calling it.Time#to_r: implemented, parameters[]. Returns the value ofselfas a Rational exact number of Epoch seconds;Time.now.to_r # => (16571402750320203/10000000). An example calling it.Time#to_s: implemented, parameters[]. Returns a string representation ofself, without subseconds: An example calling it.Time#tuesday?: implemented, parameters[]. Returnstrueifselfrepresents a Tuesday,falseotherwise:Time#tv_nsec: implemented, parameters[]. Returns the number of nanoseconds in the subseconds part ofselfin the range (0..999_999_999); lower-order digits are truncated, not rounded:Time#tv_sec: implemented, parameters[]. Returns the value ofselfas integer Epoch seconds; subseconds are truncated (not rounded):Time#tv_usec: implemented, parameters[]. Returns the number of microseconds in the subseconds part ofselfin the range (0..999_999); lower-order digits are truncated, not rounded:Time#usec: implemented, parameters[]. Returns the number of microseconds in the subseconds part ofselfin the range (0..999_999); lower-order digits are truncated, not rounded: An example calling it.Time#utc: implemented, parameters[]. Returnsself, converted to the UTC timezone: An example calling it.Time.utc: implemented, parameters[[:rest, :args]]. Returns a newTimeobject based the on given arguments, in the UTC timezone. An example calling it.Time#utc?: implemented, parameters[]. Returnstrueifselfrepresents a time in UTC (GMT): An example calling it.Time#utc_offset: implemented, parameters[]. Returns the offset in seconds between the timezones of UTC andself: An example calling it.Time#wday: implemented, parameters[]. Returns the integer day of the week forself, in range (0..6), with Sunday as zero. An example calling it.Time#wednesday?: implemented, parameters[]. Returnstrueifselfrepresents a Wednesday,falseotherwise: An example calling it.Time#xmlschema: implemented, parameters[[:opt, :fraction]]. Returns a string which represents the time as a dateTime defined by XML Schema: An example calling it.Time#yday: implemented, parameters[]. Returns the integer day of the year ofself, in range (1..366). An example calling it.Time#year: implemented, parameters[]. Returns the integer year forself: An example calling it.Time#zone: implemented, parameters[]. Returns the string name of the time zone forself: An example calling it.
The method summaries are the first sentences of Ruby's own documentation for each method, read from MRI 4.0.6's ri data. Ruby's documentation is distributed under Ruby's license.