|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.RubyObject
org.jruby.RubyTime
public class RubyTime
The Time class.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jruby.RubyObject |
---|
RubyObject.Finalizer, RubyObject.ObjectMethods, RubyObject.VariableTableEntry |
Field Summary | |
---|---|
static java.lang.String |
UTC
|
Fields inherited from class org.jruby.RubyObject |
---|
ALL_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, metaClassName, NEVER, NIL_F, OBJECT_ALLOCATOR, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, VARIABLE_TABLE_DEFAULT_CAPACITY, VARIABLE_TABLE_EMPTY_TABLE, VARIABLE_TABLE_LOAD_FACTOR, VARIABLE_TABLE_MAXIMUM_CAPACITY, variableTable, variableTableSize, variableTableThreshold |
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject |
---|
NULL_ARRAY |
Constructor Summary | |
---|---|
RubyTime(Ruby runtime,
RubyClass rubyClass)
|
|
RubyTime(Ruby runtime,
RubyClass rubyClass,
org.joda.time.DateTime dt)
|
Method Summary | |
---|---|
RubyString |
asctime()
|
static IRubyObject |
at(ThreadContext context,
IRubyObject recv,
IRubyObject[] args)
|
static RubyClass |
createTimeClass(Ruby runtime)
|
RubyString |
dump(IRubyObject[] args,
Block unusedBlock)
|
IRubyObject |
eql_p(IRubyObject other)
rb_obj_equal Just like "==" and "equal?", "eql?" will use identity equality for Object. |
org.joda.time.DateTime |
getDateTime()
|
RubyTime |
getgm()
|
java.util.Date |
getJavaDate()
|
RubyTime |
getlocal()
|
static org.joda.time.DateTimeZone |
getLocalTimeZone(Ruby runtime)
|
protected long |
getTimeInMillis()
|
long |
getUSec()
|
RubyInteger |
gmt_offset()
|
RubyBoolean |
gmt()
|
RubyTime |
gmtime()
|
RubyFixnum |
hash()
rb_obj_id Will return the hash code of this object. |
RubyInteger |
hour()
|
IRubyObject |
initialize_copy(IRubyObject original)
rb_obj_init_copy Initializes this object as a copy of the original, that is the parameter to this object. |
IRubyObject |
initialize(Block block)
|
RubyBoolean |
isdst()
|
static RubyTime |
load(IRubyObject recv,
IRubyObject from,
Block block)
|
RubyTime |
localtime()
|
RubyInteger |
mday()
|
RubyObject |
mdump(IRubyObject[] args)
|
long |
microseconds()
|
RubyInteger |
min()
|
RubyInteger |
month()
|
static RubyTime |
new_local(IRubyObject recv,
IRubyObject[] args)
|
static RubyTime |
new_utc(IRubyObject recv,
IRubyObject[] args)
|
static IRubyObject |
newInstance(ThreadContext context,
IRubyObject recv,
IRubyObject[] args,
Block block)
|
static RubyTime |
newTime(Ruby runtime,
org.joda.time.DateTime dt)
|
static RubyTime |
newTime(Ruby runtime,
org.joda.time.DateTime dt,
long usec)
|
static RubyTime |
newTime(Ruby runtime,
long milliseconds)
|
IRubyObject |
op_cmp(IRubyObject other)
|
IRubyObject |
op_eqq(ThreadContext context,
IRubyObject other)
rb_equal The Ruby "===" method is used by default in case/when statements. |
IRubyObject |
op_ge(ThreadContext context,
IRubyObject other)
|
IRubyObject |
op_gt(ThreadContext context,
IRubyObject other)
|
IRubyObject |
op_le(ThreadContext context,
IRubyObject other)
|
IRubyObject |
op_lt(ThreadContext context,
IRubyObject other)
|
IRubyObject |
op_minus(IRubyObject other)
|
IRubyObject |
op_plus(IRubyObject other)
|
protected static RubyTime |
s_mload(IRubyObject recv,
RubyTime time,
IRubyObject from)
|
static IRubyObject |
s_new(IRubyObject recv,
IRubyObject[] args,
Block block)
|
RubyInteger |
sec()
|
void |
setDateTime(org.joda.time.DateTime dt)
|
void |
setMicroseconds(long mic)
|
void |
setUSec(long usec)
|
RubyString |
strftime(IRubyObject format)
|
RubyTime |
succ()
|
RubyArray |
to_a()
rb_any_to_a call-seq: obj.to_a -> anArray Returns an array representation of obj. |
RubyFloat |
to_f()
|
RubyInteger |
to_i()
|
IRubyObject |
to_s()
rb_any_to_s call-seq: obj.to_s => string Returns a string representing obj. |
void |
updateCal(org.joda.time.DateTime dt)
|
RubyInteger |
usec()
|
RubyInteger |
wday()
|
RubyInteger |
yday()
|
RubyInteger |
year()
|
RubyString |
zone()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String UTC
Constructor Detail |
---|
public RubyTime(Ruby runtime, RubyClass rubyClass)
public RubyTime(Ruby runtime, RubyClass rubyClass, org.joda.time.DateTime dt)
Method Detail |
---|
public static org.joda.time.DateTimeZone getLocalTimeZone(Ruby runtime)
public static RubyClass createTimeClass(Ruby runtime)
public void setUSec(long usec)
public long getUSec()
public void updateCal(org.joda.time.DateTime dt)
protected long getTimeInMillis()
public static RubyTime newTime(Ruby runtime, long milliseconds)
public static RubyTime newTime(Ruby runtime, org.joda.time.DateTime dt)
public static RubyTime newTime(Ruby runtime, org.joda.time.DateTime dt, long usec)
public IRubyObject initialize_copy(IRubyObject original)
RubyObject
initialize_copy
in class RubyObject
public RubyTime succ()
public RubyTime gmtime()
public RubyTime localtime()
public RubyBoolean gmt()
public RubyTime getgm()
public RubyTime getlocal()
public RubyString strftime(IRubyObject format)
public IRubyObject op_ge(ThreadContext context, IRubyObject other)
public IRubyObject op_gt(ThreadContext context, IRubyObject other)
public IRubyObject op_le(ThreadContext context, IRubyObject other)
public IRubyObject op_lt(ThreadContext context, IRubyObject other)
public IRubyObject op_plus(IRubyObject other)
public IRubyObject op_minus(IRubyObject other)
public IRubyObject op_eqq(ThreadContext context, IRubyObject other)
RubyObject
op_eqq
in interface IRubyObject
op_eqq
in class RubyObject
public IRubyObject op_cmp(IRubyObject other)
public IRubyObject eql_p(IRubyObject other)
RubyObject
eql_p
in class RubyObject
public RubyString asctime()
public IRubyObject to_s()
RubyObject
to_s
prints the object's class and an encoding of the
object id. As a special case, the top-level object that is the
initial execution context of Ruby programs returns ``main.''
to_s
in class RubyObject
public RubyArray to_a()
RubyObject
Object
and others that don't explicitly override the
method, the return value is an array containing self
.
However, this latter behavior will soon be obsolete.
self.to_a #=> -:1: warning: default `to_a' will be obsolete
"hello".to_a #=> ["hello"]
Time.new.to_a #=> [39, 54, 8, 9, 4, 2003, 3, 99, true, "CDT"]
The default to_a method is deprecated.
to_a
in class RubyObject
public RubyFloat to_f()
public RubyInteger to_i()
public RubyInteger usec()
public void setMicroseconds(long mic)
public long microseconds()
public RubyInteger sec()
public RubyInteger min()
public RubyInteger hour()
public RubyInteger mday()
public RubyInteger month()
public RubyInteger year()
public RubyInteger wday()
public RubyInteger yday()
public RubyInteger gmt_offset()
public RubyBoolean isdst()
public RubyString zone()
public void setDateTime(org.joda.time.DateTime dt)
public org.joda.time.DateTime getDateTime()
public java.util.Date getJavaDate()
public RubyFixnum hash()
RubyObject
hash
in class RubyObject
public RubyString dump(IRubyObject[] args, Block unusedBlock)
public RubyObject mdump(IRubyObject[] args)
public IRubyObject initialize(Block block)
public static IRubyObject s_new(IRubyObject recv, IRubyObject[] args, Block block)
public static IRubyObject newInstance(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
public static IRubyObject at(ThreadContext context, IRubyObject recv, IRubyObject[] args)
public static RubyTime new_local(IRubyObject recv, IRubyObject[] args)
public static RubyTime new_utc(IRubyObject recv, IRubyObject[] args)
public static RubyTime load(IRubyObject recv, IRubyObject from, Block block)
protected static RubyTime s_mload(IRubyObject recv, RubyTime time, IRubyObject from)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |