Package org.jruby
Class RubyTime
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyTime
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
The Time class.
- Author:
- chadfowler, jpetersen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsFields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasctime()static IRubyObjectat(ThreadContext context, IRubyObject recv, IRubyObject arg) static IRubyObjectat(ThreadContext context, IRubyObject recv, IRubyObject[] args) static IRubyObjectat(ThreadContext context, IRubyObject recv, IRubyObject arg1, IRubyObject arg2) static IRubyObjectat(ThreadContext context, IRubyObject recv, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) ceil(ThreadContext context, IRubyObject[] args) static doubleconvertTimeInterval(ThreadContext context, IRubyObject sec) static RubyClasscreateTimeClass(ThreadContext context, RubyClass Object, RubyModule Comparable) dump(IRubyObject[] args, Block unusedBlock) Deprecated.dump(ThreadContext context) dump(ThreadContext context, IRubyObject arg) eql_p(ThreadContext context, IRubyObject otherArg) floor(ThreadContext context, IRubyObject[] args) friday_p(ThreadContext context) org.joda.time.DateTimeintgetDay()static StringgetEnvTimeZone(Ruby runtime) Deprecated.static StringgetEnvTimeZone(ThreadContext context) getgm()intgetHour()Class<?> Will return the Java interface that most closely can represent this object, when working through Java integration translations.final RubyTimegetlocal()getlocal(ThreadContext context) getlocal(ThreadContext context, IRubyObject off) static org.joda.time.DateTimeZonegetLocalTimeZone(Ruby runtime) Deprecated.static org.joda.time.DateTimeZonegetLocalTimeZone(ThreadContext context) intReturn the micro-seconds of this time.intintgetMonth()intgetNanos()Return the nano-seconds of this time.This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.longgetNSec()Get the nano-second (only) part of the time.static StringgetRubyTimeZoneName(String envTZ, org.joda.time.DateTime dt) static StringgetRubyTimeZoneName(Ruby runtime, org.joda.time.DateTime dt) Deprecated.static StringgetRubyTimeZoneName(ThreadContext context, org.joda.time.DateTime dt) intlonglongstatic org.joda.time.DateTimeZonegetTimeZone(Ruby runtime, long seconds) Deprecated.static org.joda.time.DateTimeZonegetTimeZone(ThreadContext context, long seconds) static org.joda.time.DateTimeZonegetTimeZoneFromString(Ruby runtime, String zone) Deprecated.static org.joda.time.DateTimeZonegetTimeZoneFromTZString(Ruby runtime, String zone) Deprecated.static org.joda.time.DateTimeZonegetTimeZoneFromTZString(ThreadContext context, String zone) static org.joda.time.DateTimeZonegetTimeZoneFromUtcOffset(ThreadContext context, IRubyObject arg) static org.joda.time.DateTimeZonegetTimeZoneWithOffset(Ruby runtime, String zoneName, int offset) Deprecated.static org.joda.time.DateTimeZonegetTimeZoneWithOffset(ThreadContext context, String zoneName, int offset) longgetUSec()Get the micro-second (only) part of the time.intgetYear()Deprecated.gmt()Deprecated.gmt(ThreadContext context) Deprecated.gmt_offset(ThreadContext context) gmtime()Deprecated.gmtime(ThreadContext context) hash(ThreadContext context) Will return the hash code of this object.inthashCode()This override does not do "checked" dispatch since Object usually has #hash defined.hour()Deprecated.hour(ThreadContext context) initialize(ThreadContext context) initialize(ThreadContext context, IRubyObject[] args) initialize(ThreadContext context, IRubyObject year, IRubyObject month, IRubyObject day, IRubyObject hour, IRubyObject minute, IRubyObject second, IRubyObject usec, IRubyObject zone) initialize_copy(ThreadContext context, IRubyObject original) Initializes this object as a copy of the original, that is the parameter to this object.inspect(ThreadContext context) Returns a string containing a human-readable representation of obj.static RaiseExceptioninvalidUTCOffset(Ruby runtime) Deprecated.UseinvalidUTCOffset(ThreadContext)insteadstatic RaiseExceptioninvalidUTCOffset(Ruby runtime, IRubyObject value) Deprecated.UseinvalidUTCOffset(ThreadContext)insteadstatic RaiseExceptioninvalidUTCOffset(ThreadContext context) static RaiseExceptioninvalidUTCOffset(ThreadContext context, IRubyObject value) isdst()Deprecated.isdst(ThreadContext context) booleanisUTC()static RubyTimeload(IRubyObject recv, IRubyObject from, Block block) Deprecated.static RubyTimeload(ThreadContext context, IRubyObject recv, IRubyObject from) static RubyTimelocal(ThreadContext context, IRubyObject recv, IRubyObject[] args) final RubyTimelocaltime(ThreadContext context) localtime(ThreadContext context, IRubyObject arg) mday()Deprecated.mday(ThreadContext context) mdump()Deprecated.longDeprecated.usegetMicros()insteadmin()Deprecated.min(ThreadContext context) monday_p(ThreadContext context) month()Deprecated.month(ThreadContext context) static RubyTimenewInstance(ThreadContext context, IRubyObject recv, IRubyObject[] args) static IRubyObjectnewInstance(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) Deprecated.static RubyTimestatic RubyTimestatic RubyTimeCreate new (Ruby) Time instance.static RubyTimenewTimeFromNanoseconds(Ruby runtime, long nanoseconds) Deprecated.static RubyTimenewTimeFromNanoseconds(ThreadContext context, long nanoseconds) nsec()Deprecated.nsec(ThreadContext context) Get the fractional part of time in nanoseconds.op_cmp(ThreadContext context, IRubyObject other) op_eqq(ThreadContext context, IRubyObject other) rb_equal The Ruby "===" method is used by default in case/when statements.op_equal(ThreadContext context, IRubyObject other) rb_obj_equal Will by default use identity equality to compare objects.op_ge(ThreadContext context, IRubyObject other) op_gt(ThreadContext context, IRubyObject other) op_le(ThreadContext context, IRubyObject other) op_lt(ThreadContext context, IRubyObject other) op_minus(IRubyObject other) op_minus(ThreadContext context, IRubyObject other) op_plus(IRubyObject other) op_plus(ThreadContext context, IRubyObject other) round(ThreadContext context, IRubyObject[] args) static IRubyObjects_new(IRubyObject recv, IRubyObject[] args, Block block) Deprecated.saturday_p(ThreadContext context) sec()Deprecated.sec(ThreadContext context) voidsetDateTime(org.joda.time.DateTime dt) voidsetMicros(int micros) Sets the microsecond part for this Time object.voidsetMicroseconds(long micros) Deprecated.usesetMicros(int)insteadvoidsetNanos(int nanos) Sets the nanosecond part for this Time object.voidsetNSec(long nsec) Set the nano-second (only) part for this time.voidsetUSec(long usec) Set the micro-second (only) part of the time.voidsetZoneObject(IRubyObject zone) strftime(IRubyObject format) Deprecated.strftime(ThreadContext context, IRubyObject format) subsec()Deprecated.subsec(ThreadContext context) sunday_p(ThreadContext context) thursday_p(ThreadContext context) static RubyTimetimeZoneLocal(ThreadContext context, IRubyObject off, RubyTime time) to_a(ThreadContext context) to_f()to_i()Deprecated.to_i(ThreadContext context) longto_r(ThreadContext context) to_s(ThreadContext context) <T> TConvert the object to the specified Java class, if possible.toString()The default toString method is just a wrapper that calls the Ruby "to_s" method.tuesday_p(ThreadContext context) voidupdateCal(org.joda.time.DateTime dt) Deprecated.usec()Deprecated.usec(ThreadContext context) Get the microsecond part of this time value.static RubyTimeutc(ThreadContext context, IRubyObject recv, IRubyObject[] args) wday()Deprecated.wday(ThreadContext context) wednesday_p(ThreadContext context) yday()Deprecated.yday(ThreadContext context) year()Deprecated.year(ThreadContext context) zone()Deprecated.Usezone(ThreadContext)instead.zone(ThreadContext context) static booleanzoneLocalTime(ThreadContext context, IRubyObject zone, RubyTime time) static booleanzoneTimeLocal(ThreadContext context, IRubyObject zone, RubyTime time) Methods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, dig, dig1, dig2, eqlInternal, equalInternal, equals, finishObjectClass, inspect, puts, specificEval, toRubyStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dup, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, equal_p, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize_copy, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_match, op_not, op_not_equal, op_not_match, private_methods, protected_methods, public_methods, rbClone, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, singletonClass, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_s, trust, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, dup, marshalLiveVariables
-
Field Details
-
UTC
- See Also:
-
TIME_SCALE
public static final int TIME_SCALE- See Also:
-
-
Constructor Details
-
RubyTime
-
RubyTime
-
RubyTime
-
-
Method Details
-
getNativeClassIndex
Description copied from class:RubyObjectThis is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex- Specified by:
getNativeClassIndexin interfaceCoreObjectType- Overrides:
getNativeClassIndexin classRubyObject- Returns:
- the ClassIndex of the native type this object was constructed from
- See Also:
-
getEnvTimeZone
Deprecated. -
getEnvTimeZone
-
getLocalTimeZone
Deprecated. -
getLocalTimeZone
-
getTimeZoneFromTZString
@Deprecated(since="10.0") public static org.joda.time.DateTimeZone getTimeZoneFromTZString(Ruby runtime, String zone) Deprecated. -
getTimeZoneFromTZString
public static org.joda.time.DateTimeZone getTimeZoneFromTZString(ThreadContext context, String zone) -
getTimeZoneFromString
@Deprecated public static org.joda.time.DateTimeZone getTimeZoneFromString(Ruby runtime, String zone) Deprecated. -
getTimeZoneFromUtcOffset
public static org.joda.time.DateTimeZone getTimeZoneFromUtcOffset(ThreadContext context, IRubyObject arg) -
invalidUTCOffset
Deprecated.UseinvalidUTCOffset(ThreadContext)instead- Parameters:
runtime-- Returns:
- ""
-
invalidUTCOffset
-
invalidUTCOffset
@Deprecated(since="10.0") public static RaiseException invalidUTCOffset(Ruby runtime, IRubyObject value) Deprecated.UseinvalidUTCOffset(ThreadContext)instead- Parameters:
runtime-- Returns:
- ""
-
invalidUTCOffset
-
getTimeZone
@Deprecated(since="10.0") public static org.joda.time.DateTimeZone getTimeZone(Ruby runtime, long seconds) Deprecated. -
getTimeZone
-
getTimeZoneWithOffset
@Deprecated(since="10.0") public static org.joda.time.DateTimeZone getTimeZoneWithOffset(Ruby runtime, String zoneName, int offset) Deprecated. -
getTimeZoneWithOffset
public static org.joda.time.DateTimeZone getTimeZoneWithOffset(ThreadContext context, String zoneName, int offset) -
createTimeClass
public static RubyClass createTimeClass(ThreadContext context, RubyClass Object, RubyModule Comparable) -
setNSec
public void setNSec(long nsec) Set the nano-second (only) part for this time. Note thatnsecmeans the 4 to 9 decimal places of sec fractional part of time. For example, 123456 fornsecmeans.000123456, not.123456000.- Parameters:
nsec- the nano second part only (4 to 9 decimal places) of time
-
getNSec
public long getNSec()Get the nano-second (only) part of the time. Note that it returns the 4 to 9 decimal places, not the entire sec fraction part till nano. For example for an epoch second1500000000.123456789returns456789.- Returns:
- the nano second part (only) of time
-
setUSec
public void setUSec(long usec) Set the micro-second (only) part of the time.- Parameters:
usec-- See Also:
-
getUSec
public long getUSec()Get the micro-second (only) part of the time.- Returns:
- the micro-second only part of this time
- See Also:
-
setZoneObject
-
updateCal
Deprecated.UsesetDateTime(DateTime)instead. -
newTime
-
newTimeFromNanoseconds
@Deprecated(since="10.0") public static RubyTime newTimeFromNanoseconds(Ruby runtime, long nanoseconds) Deprecated. -
newTimeFromNanoseconds
-
newTime
-
newTime
Create new (Ruby) Time instance. Note thatdtoforg.joda.time.DateTimerepresents the integer part and the fraction part to milliseconds, andnsecthe nano part (4 to 9 decimal places). For example,RubyTime.newTime(rt, new DateTime(987000), 345678)creates an epoch second of987.000345678, not987000.345678.- Parameters:
runtime- the runtimedt- the integer part of time + the fraction part in millisecondsnsec- the nanos only party of the time (millis excluded)- Returns:
- the new Time
- See Also:
-
initialize_copy
Description copied from class:RubyBasicObjectInitializes this object as a copy of the original, that is the parameter to this object. Will make sure that the argument actually has the same real class as this object. It shouldn't be possible to initialize an object with something totally different.- Overrides:
initialize_copyin classRubyBasicObject- Parameters:
context- the thread contextoriginal- the original- Returns:
- a copy unless the same thing
-
gmtime
Deprecated. -
gmtime
-
localtime
-
localtime
-
localtime
-
gmt
-
gmt
Deprecated. -
isUTC
public boolean isUTC() -
getgm
-
getlocal
-
getlocal
-
getlocal
-
strftime
Deprecated. -
strftime
-
op_equal
Description copied from class:RubyBasicObjectrb_obj_equal Will by default use identity equality to compare objects. This follows the Ruby semantics. The name of this method doesn't follow the convention because hierarchy problems- Specified by:
op_equalin interfaceIRubyObject- Overrides:
op_equalin classRubyBasicObject
-
op_ge
-
op_gt
-
op_le
-
op_lt
-
op_plus
-
op_plus
-
op_minus
-
op_minus
-
op_eqq
Description copied from class:RubyObjectrb_equal The Ruby "===" method is used by default in case/when statements. The Object implementation first checks Java identity equality and then calls the "==" method too.- Specified by:
op_eqqin interfaceIRubyObject- Overrides:
op_eqqin classRubyObject
-
op_cmp
- Overrides:
op_cmpin classRubyBasicObject
-
eql_p
- Overrides:
eql_pin classRubyBasicObject
-
asctime
-
to_s
- Overrides:
to_sin classRubyBasicObject
-
inspect
Description copied from class:RubyBasicObjectReturns a string containing a human-readable representation of obj. If not overridden, uses theto_smethod to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"- Specified by:
inspectin interfaceIRubyObject- Overrides:
inspectin classRubyBasicObject
-
toString
Description copied from class:RubyObjectThe default toString method is just a wrapper that calls the Ruby "to_s" method.- Overrides:
toStringin classRubyObject- Returns:
- string representation
-
to_a
- Overrides:
to_ain classRubyBasicObject
-
to_f
-
to_i
-
to_i_long
public long to_i_long() -
to_i
Deprecated. -
nsec
Get the fractional part of time in nanoseconds. Note that this returns the entire fraction part of the time in nanosecond, unlikeRubyTime#getNSec. This method represents Ruby'snsecmethod.- Returns:
- the (sec) fractional part of time (in nanos)
-
nsec
Deprecated. -
to_r
-
usec
Get the microsecond part of this time value.- Returns:
- the (whole) microsecond part of time
-
usec
Deprecated. -
getTimeInMicros
public long getTimeInMicros()- Returns:
- the total time in microseconds
- See Also:
-
getMicros
public int getMicros()Return the micro-seconds of this time.- Returns:
- micro seconds (only)
- See Also:
-
setMicros
public void setMicros(int micros) Sets the microsecond part for this Time object.- Parameters:
micros- the microseconds to be set- See Also:
-
setMicroseconds
Deprecated.usesetMicros(int)instead -
microseconds
Deprecated.usegetMicros()instead -
getNanos
public int getNanos()Return the nano-seconds of this time.- Returns:
- nano seconds (only)
-
setNanos
public void setNanos(int nanos) Sets the nanosecond part for this Time object.- Parameters:
nanos- the nanoseconds to be set- See Also:
-
sec
-
sec
Deprecated. -
min
-
min
Deprecated. -
hour
-
hour
Deprecated. -
mday
-
mday
Deprecated. -
month
-
month
Deprecated. -
year
-
year
Deprecated. -
wday
-
wday
Deprecated. -
yday
-
yday
Deprecated. -
sunday_p
-
monday_p
-
tuesday_p
-
wednesday_p
-
thursday_p
-
friday_p
-
saturday_p
-
subsec
Deprecated. -
subsec
-
gmt_offset
-
gmt_offset
Deprecated. -
isdst
-
isdst
Deprecated. -
zone
Deprecated.Usezone(ThreadContext)instead.- Returns:
- ""
-
zone
-
getZoneName
Deprecated. -
getRubyTimeZoneName
@Deprecated(since="10.0") public static String getRubyTimeZoneName(Ruby runtime, org.joda.time.DateTime dt) Deprecated.UsegetRubyTimeZoneName(ThreadContext, DateTime)instead.- Parameters:
runtime-dt-- Returns:
- ""
-
getRubyTimeZoneName
-
getRubyTimeZoneName
-
setDateTime
public void setDateTime(org.joda.time.DateTime dt) -
getDateTime
public org.joda.time.DateTime getDateTime() -
hash
Description copied from class:RubyBasicObjectWill return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.- Overrides:
hashin classRubyBasicObject- Parameters:
context- the current thread context- Returns:
- the hash value
-
hashCode
public int hashCode()Description copied from class:RubyObjectThis override does not do "checked" dispatch since Object usually has #hash defined.- Overrides:
hashCodein classRubyObject- Returns:
- the hash code
- See Also:
-
dump
-
dump
-
dump
Deprecated. -
mdump
Deprecated. -
round
-
floor
-
ceil
-
s_new
Deprecated. -
newInstance
@Deprecated public static IRubyObject newInstance(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) Deprecated. -
newInstance
-
at
-
at
public static IRubyObject at(ThreadContext context, IRubyObject recv, IRubyObject arg1, IRubyObject arg2) -
at
public static IRubyObject at(ThreadContext context, IRubyObject recv, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) -
at
-
local
-
initialize
- Overrides:
initializein classRubyBasicObject
-
initialize
-
initialize
public IRubyObject initialize(ThreadContext context, IRubyObject year, IRubyObject month, IRubyObject day, IRubyObject hour, IRubyObject minute, IRubyObject second, IRubyObject usec, IRubyObject zone) -
utc
-
load
Deprecated. -
load
-
getJavaClass
Description copied from class:RubyBasicObjectWill return the Java interface that most closely can represent this object, when working through Java integration translations.- Specified by:
getJavaClassin interfaceIRubyObject- Overrides:
getJavaClassin classRubyBasicObject- Returns:
- the true Java class of this (Ruby) object
-
toJava
Description copied from interface:IRubyObjectConvert the object to the specified Java class, if possible.- Specified by:
toJavain interfaceIRubyObject- Overrides:
toJavain classRubyBasicObject- Type Parameters:
T- type- Parameters:
target- The target type to which the object should be converted.- Returns:
- java type
- See Also:
-
getTimeInMillis
public long getTimeInMillis()- Returns:
- millis since epoch this (date-time) value represents
- Since:
- 9.2 (public)
-
getYear
public int getYear()- Returns:
- year
- Since:
- 9.2
-
getMonth
public int getMonth()- Returns:
- month-of-year (1..12)
- Since:
- 9.2
-
getDay
public int getDay()- Returns:
- day-of-month
- Since:
- 9.2
-
getHour
public int getHour()- Returns:
- hour-of-day (0..23)
- Since:
- 9.2
-
getMinute
public int getMinute()- Returns:
- minute-of-hour
- Since:
- 9.2
-
getSecond
public int getSecond()- Returns:
- second-of-minute
- Since:
- 9.2
-
getJavaDate
- Returns:
- a Java (legacy) Date instance
- Since:
- 1.7
-
toInstant
- Returns:
- an instant
- Since:
- 9.2
-
toLocalDateTime
- Returns:
- a date time
- Since:
- 9.2
-
toZonedDateTime
- Returns:
- a date time
- Since:
- 9.2
-
toOffsetDateTime
- Returns:
- a date time
- Since:
- 9.2
-
convertTimeInterval
-
zoneTimeLocal
-
zoneLocalTime
-
timeZoneLocal
-
getRubyTimeZoneName(ThreadContext, DateTime)instead.