public class RubyDate extends RubyObject
Date implementation - 'native' parts.
In MRI, since 2.x, all of date.rb has been moved to native (C) code.
NOTE: There's still date.rb, where this gets bootstrapped from.RubyObject.DataRubyBasicObject.FinalizerIVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORALL_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, UNTRUST_F, 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, varTableStampNULL_ARRAY| Modifier | Constructor and Description |
|---|---|
|
RubyDate(Ruby runtime,
org.joda.time.DateTime dt) |
|
RubyDate(Ruby runtime,
long millis,
org.joda.time.Chronology chronology) |
protected |
RubyDate(Ruby runtime,
RubyClass klass) |
|
RubyDate(Ruby runtime,
RubyClass klass,
org.joda.time.DateTime dt) |
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, dig, eqlInternal, equalInternal, getNativeClassIndex, inspect, puts, specificEval, toRubyString, toStringaddFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, checkStringType19, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dup, ensureInstanceVariablesSettable, eql, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, freeze, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hashyInspect, hasInstanceVariable, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize19, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method_missing, method_missing19, method, method19, methods, methods, methods19, nil_p, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_equal_19, op_equal, op_match, op_match19, op_not_equal, op_not_match, op_not, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method_added, singleton_method_added19, singleton_method_removed, singleton_method_removed19, singleton_method_undefined, singleton_method_undefined19, singleton_method, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderclone, finalize, getClass, notify, notifyAll, wait, wait, waitarraypublic RubyDate(Ruby runtime, org.joda.time.DateTime dt)
public RubyDate(Ruby runtime, long millis, org.joda.time.Chronology chronology)
public RubyDate initialize(ThreadContext context, IRubyObject dt)
public RubyDate initialize(ThreadContext context, IRubyObject ajd, IRubyObject of)
public RubyDate initialize(ThreadContext context, IRubyObject ajd, IRubyObject of, IRubyObject sg)
public IRubyObject initialize_copy(IRubyObject original)
RubyBasicObjectinitialize_copy in class RubyBasicObjectpublic static RubyDate new_(ThreadContext context, IRubyObject self)
public static RubyDate new_(ThreadContext context, IRubyObject self, IRubyObject ajd)
public static RubyDate new_(ThreadContext context, IRubyObject self, IRubyObject ajd, IRubyObject of)
public static RubyDate new_(ThreadContext context, IRubyObject self, IRubyObject ajd, IRubyObject of, IRubyObject sg)
public static RubyDate civil(ThreadContext context, IRubyObject self)
public static RubyDate civil(ThreadContext context, IRubyObject self, IRubyObject year)
public static RubyDate civil(ThreadContext context, IRubyObject self, IRubyObject year, IRubyObject month)
public static RubyDate civil(ThreadContext context, IRubyObject self, IRubyObject year, IRubyObject month, IRubyObject mday)
public static RubyDate civil(ThreadContext context, IRubyObject self, IRubyObject[] args)
public static org.joda.time.DateTime civilDate(ThreadContext context, int y, int m, int d, org.joda.time.Chronology chronology)
public static IRubyObject valid_civil_p(ThreadContext context, IRubyObject self, IRubyObject[] args)
public static IRubyObject _valid_time_p(ThreadContext context, IRubyObject self, IRubyObject h, IRubyObject m, IRubyObject s)
public static RubyDate jd(ThreadContext context, IRubyObject self)
public static RubyDate jd(ThreadContext context, IRubyObject self, IRubyObject jd)
public static RubyDate jd(ThreadContext context, IRubyObject self, IRubyObject jd, IRubyObject sg)
public static IRubyObject valid_jd_p(ThreadContext context, IRubyObject self, IRubyObject jd)
public static IRubyObject valid_jd_p(ThreadContext context, IRubyObject self, IRubyObject jd, IRubyObject sg)
public static IRubyObject _valid_jd_p(IRubyObject self, IRubyObject jd)
public static IRubyObject _valid_jd_p(IRubyObject self, IRubyObject jd, IRubyObject sg)
public static RubyDate ordinal(ThreadContext context, IRubyObject self, IRubyObject[] args)
public static IRubyObject valid_ordinal_p(ThreadContext context, IRubyObject self, IRubyObject[] args)
@Deprecated public static IRubyObject _valid_ordinal_p(ThreadContext context, IRubyObject self, IRubyObject[] args)
@Deprecated public IRubyObject _valid_ordinal_p(ThreadContext context, IRubyObject[] args)
public static RubyDate commercial(ThreadContext context, IRubyObject self, IRubyObject[] args)
public static IRubyObject valid_commercial_p(ThreadContext context, IRubyObject self, IRubyObject[] args)
@Deprecated public static IRubyObject _valid_commercial_p(ThreadContext context, IRubyObject self, IRubyObject[] args)
@Deprecated public static IRubyObject _valid_weeknum_p(ThreadContext context, IRubyObject self, IRubyObject[] args)
public static RubyDate today(ThreadContext context, IRubyObject self)
public static RubyDate today(ThreadContext context, IRubyObject self, IRubyObject sg)
public static IRubyObject _valid_civil_p(ThreadContext context, IRubyObject self, IRubyObject[] args)
@Deprecated public IRubyObject _valid_civil_p(ThreadContext context, IRubyObject[] args)
public org.joda.time.DateTime getDateTime()
public boolean equals(java.lang.Object other)
RubyObjectequals in class RubyObjectRubyBasicObject.equals(Object)public final boolean equals(RubyDate that)
public IRubyObject eql_p(IRubyObject other)
RubyBasicObjecteql_p in class RubyBasicObjectpublic IRubyObject op_eqq(ThreadContext context, IRubyObject other)
op_eqq in interface IRubyObjectop_eqq in class RubyObjectcontext - other - public IRubyObject op_cmp(ThreadContext context, IRubyObject other)
op_cmp in class RubyBasicObjectpublic int hashCode()
RubyObjecthashCode in class RubyObjectRubyBasicObject.hashCode()public RubyFixnum hash(ThreadContext context)
public RubyFixnum hash()
RubyBasicObjecthash in class RubyBasicObjectpublic RubyFixnum jd(ThreadContext context)
public final long getJulianDayNumber()
public RubyBoolean julian_p(ThreadContext context)
public RubyBoolean gregorian_p(ThreadContext context)
public final boolean isJulian()
public IRubyObject ajd(ThreadContext context)
public IRubyObject amjd(ThreadContext context)
public IRubyObject start(ThreadContext context)
public RubyInteger year(ThreadContext context)
public RubyInteger yday(ThreadContext context)
public RubyInteger mon(ThreadContext context)
public RubyInteger mday(ThreadContext context)
public RubyNumeric day_fraction(ThreadContext context)
public RubyInteger hour(ThreadContext context)
public RubyInteger minute(ThreadContext context)
public RubyInteger second(ThreadContext context)
public RubyNumeric sec_fraction(ThreadContext context)
public RubyInteger cwyear(ThreadContext context)
public RubyInteger cweek(ThreadContext context)
public RubyInteger cwday(ThreadContext context)
public RubyInteger wday(ThreadContext context)
public RubyString zone(ThreadContext context)
public IRubyObject mjd(ThreadContext context)
public IRubyObject ld(ThreadContext context)
public IRubyObject offset(ThreadContext context)
public IRubyObject new_offset(ThreadContext context, IRubyObject[] args)
public IRubyObject new_start(ThreadContext context)
public IRubyObject new_start(ThreadContext context, IRubyObject sg)
public IRubyObject italy(ThreadContext context)
public IRubyObject england(ThreadContext context)
public IRubyObject julian(ThreadContext context)
public IRubyObject gregorian(ThreadContext context)
public static IRubyObject julian_leap_p(ThreadContext context, IRubyObject self, IRubyObject year)
public static IRubyObject gregorian_leap_p(ThreadContext context, IRubyObject self, IRubyObject year)
public IRubyObject leap_p(ThreadContext context)
public IRubyObject op_plus(ThreadContext context, IRubyObject n)
public IRubyObject op_minus(ThreadContext context, IRubyObject n)
public IRubyObject next(ThreadContext context)
public IRubyObject next_day(ThreadContext context)
public IRubyObject next_day(ThreadContext context, IRubyObject n)
public IRubyObject prev_day(ThreadContext context)
public IRubyObject prev_day(ThreadContext context, IRubyObject n)
public IRubyObject next_month(ThreadContext context)
public IRubyObject next_month(ThreadContext context, IRubyObject n)
public IRubyObject prev_month(ThreadContext context)
public IRubyObject prev_month(ThreadContext context, IRubyObject n)
public IRubyObject shift_fw(ThreadContext context, IRubyObject n)
public IRubyObject shift_bw(ThreadContext context, IRubyObject n)
public IRubyObject next_year(ThreadContext context)
public IRubyObject next_year(ThreadContext context, IRubyObject n)
public IRubyObject prev_year(ThreadContext context)
public IRubyObject prev_year(ThreadContext context, IRubyObject n)
public IRubyObject marshal_dump(ThreadContext context)
public static RubyDate _load(ThreadContext context, IRubyObject klass, IRubyObject str)
public RubyDate marshal_load(ThreadContext context, IRubyObject a)
public static RubyNumeric jd_to_ajd(ThreadContext context, IRubyObject self, IRubyObject[] args)
public static org.joda.time.Chronology getChronology(ThreadContext context, long sg, int off)
public final IRubyObject inspect()
RubyBasicObjectto_s method 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"inspect in interface IRubyObjectinspect in class RubyBasicObjectpublic RubyString inspect(ThreadContext context)
public final IRubyObject to_s()
RubyBasicObjectto_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 RubyBasicObjectpublic RubyString to_s(ThreadContext context)
public RubyDate to_date()
public RubyDateTime to_datetime(ThreadContext context)
public RubyTime to_time(ThreadContext context)
public RubyString strftime(ThreadContext context)
public RubyString strftime(ThreadContext context, IRubyObject fmt)
public static IRubyObject _strptime(ThreadContext context, IRubyObject self, IRubyObject string)
public static IRubyObject _strptime(ThreadContext context, IRubyObject self, IRubyObject string, IRubyObject format)
public static IRubyObject _strptime(ThreadContext context, IRubyObject self, IRubyObject[] args)
public static IRubyObject zone_to_diff(ThreadContext context, IRubyObject self, IRubyObject zone)
public static RubyInteger _i(ThreadContext context, IRubyObject self, IRubyObject val)
public static RubyInteger _comp_year69(ThreadContext context, IRubyObject self, IRubyObject year)
public static IRubyObject _parse_jis(ThreadContext context, IRubyObject self, IRubyObject str, IRubyObject h)
public static IRubyObject _parse_vms(ThreadContext context, IRubyObject self, IRubyObject str, IRubyObject h)
public static IRubyObject _parse_iso2(ThreadContext context, IRubyObject self, IRubyObject str, IRubyObject h)
public static IRubyObject _parse_ddd(ThreadContext context, IRubyObject self, IRubyObject str, IRubyObject h)
public static IRubyObject _parse_impl(ThreadContext context, IRubyObject self, IRubyObject s, IRubyObject h)
public static IRubyObject _subs(ThreadContext context, IRubyObject self, IRubyObject str, IRubyObject reg)
public static IRubyObject _match(ThreadContext context, IRubyObject self, IRubyObject reg, IRubyObject str)
public static IRubyObject _s3e(ThreadContext context, IRubyObject self, IRubyObject[] args)
public int getYear()
public int getMonth()
public int getDay()
public int getHour()
public int getMinute()
public int getSecond()
public int getNanos()
public java.util.Date toDate()
public java.time.Instant toInstant()
public java.time.LocalDate toLocalDate()
public java.lang.Class getJavaClass()
RubyBasicObjectgetJavaClass in interface IRubyObjectgetJavaClass in class RubyBasicObjectpublic <T> T toJava(java.lang.Class<T> target)
IRubyObjecttoJava in interface IRubyObjecttoJava in class RubyBasicObjecttarget - The target type to which the object should be converted.IRubyObject.toJava(java.lang.Class<T>)Copyright © 2001-2020 JRuby. All Rights Reserved.