org.jruby
Class RubyTime

java.lang.Object
  extended byorg.jruby.RubyObject
      extended byorg.jruby.RubyTime
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject

public class RubyTime
extends RubyObject

The Time class.

Author:
chadfowler, jpetersen

Field Summary
 
Fields inherited from class org.jruby.RubyObject
runtime
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubyTime(Ruby ruby, RubyClass rubyClass)
           
 
Method Summary
 RubyString asctime()
           
static RubyClass createTimeClass(Ruby ruby)
           
 java.util.Date getJavaDate()
           
protected  long getTimeInMillis()
           
 RubyBoolean gmt()
           
 RubyTime gmtime()
           
 RubyFixnum hash()
           
 RubyInteger hour()
           
 RubyBoolean isdst()
           
 RubyTime localtime()
           
 RubyInteger mday()
           
 RubyInteger min()
           
 RubyInteger month()
           
static RubyTime new_at(IRubyObject receiver, IRubyObject[] args)
           
static RubyTime new_local(IRubyObject type, IRubyObject[] args)
           
static RubyTime new_utc(IRubyObject type, IRubyObject[] args)
           
 RubyFixnum op_cmp(IRubyObject other)
           
 IRubyObject op_minus(IRubyObject other)
           
 IRubyObject op_plus(IRubyObject other)
           
static RubyTime s_at(IRubyObject rubyClass, IRubyObject[] args)
           
static RubyTime s_new(IRubyObject receiver)
           
 RubyInteger sec()
           
 void setJavaCalendar(java.util.Calendar cal)
           
 RubyString strftime(IRubyObject format)
           
 RubyArray to_a()
           
 RubyFloat to_f()
           
 RubyInteger to_i()
           
 RubyString to_s()
           
 RubyInteger usec()
           
 RubyInteger wday()
           
 RubyInteger yday()
           
 RubyInteger year()
           
 RubyString zone()
           
 
Methods inherited from class org.jruby.RubyObject
argCount, asSymbol, callbackFactory, callInit, callMethod, callMethod, callMethod, checkSafeString, convertToString, convertToType, convertType, createObjectClass, defineSingletonMethod, display, dup, equal, equals, eval, eval, evalUnder, extend, extendObject, freeze, frozen, getInstanceVariable, getInstanceVariables, getJavaClass, getMetaClass, getRuntime, getSingletonClass, getType, hashCode, hasInstanceVariable, id, infectBy, inspect, instance_eval, instance_of, instance_variables, instanceVariableNames, isFalse, isFrozen, isKindOf, isNil, isTaint, isTrue, kind_of, makeMetaClass, marshalTo, method_missing, method, methods, nilObject, private_methods, protected_methods, rbClone, removeInstanceVariable, respond_to, respondsTo, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, setupClone, singleton_methods, singletonMethodsAllowed, specificEval, taint, tainted, toString, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RubyTime

public RubyTime(Ruby ruby,
                RubyClass rubyClass)
Method Detail

createTimeClass

public static RubyClass createTimeClass(Ruby ruby)

getTimeInMillis

protected long getTimeInMillis()

s_new

public static RubyTime s_new(IRubyObject receiver)

new_at

public static RubyTime new_at(IRubyObject receiver,
                              IRubyObject[] args)

new_local

public static RubyTime new_local(IRubyObject type,
                                 IRubyObject[] args)

new_utc

public static RubyTime new_utc(IRubyObject type,
                               IRubyObject[] args)

s_at

public static RubyTime s_at(IRubyObject rubyClass,
                            IRubyObject[] args)

gmtime

public RubyTime gmtime()

localtime

public RubyTime localtime()

gmt

public RubyBoolean gmt()

strftime

public RubyString strftime(IRubyObject format)

op_plus

public IRubyObject op_plus(IRubyObject other)

op_minus

public IRubyObject op_minus(IRubyObject other)

op_cmp

public RubyFixnum op_cmp(IRubyObject other)

asctime

public RubyString asctime()

to_s

public RubyString to_s()
Overrides:
to_s in class RubyObject

to_a

public RubyArray to_a()
Overrides:
to_a in class RubyObject

to_f

public RubyFloat to_f()

to_i

public RubyInteger to_i()

usec

public RubyInteger usec()

sec

public RubyInteger sec()

min

public RubyInteger min()

hour

public RubyInteger hour()

mday

public RubyInteger mday()

month

public RubyInteger month()

year

public RubyInteger year()

wday

public RubyInteger wday()

yday

public RubyInteger yday()

isdst

public RubyBoolean isdst()

zone

public RubyString zone()

setJavaCalendar

public void setJavaCalendar(java.util.Calendar cal)

getJavaDate

public java.util.Date getJavaDate()

hash

public RubyFixnum hash()
Overrides:
hash in class RubyObject


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.