chrono = chronos.get(i); if (minDaysInFirstWeek == chrono.getMinimumDaysInFirstWeek() && cutoverInstant.equals(chrono.getGregorianCutover())) {
/** * Ruby always follows Astronomical year numbering, * that is BC x is -x+1 and there is a year 0 (BC 1) * but Joda-time returns -x for year x BC in Julian chronology (no year 0) */ private static int year(DateTime dt, int year) { Chronology c; if (year < 0 && ( (c = dt.getChronology()) instanceof JulianChronology || (c instanceof GJChronology && ((GJChronology) c).getGregorianCutover().isAfter(dt)))) return year + 1; return year; }
/** * Ruby always follows Astronomical year numbering, * that is BC x is -x+1 and there is a year 0 (BC 1) * but Joda-time returns -x for year x BC in Julian chronology (no year 0) */ private int year(int year) { Chronology c; if (year < 0 && ( (c = dt.getChronology()) instanceof JulianChronology || (c instanceof GJChronology && ((GJChronology) c).getGregorianCutover().isAfter(dt)))) return year + 1; return year; }
/** * Ruby always follows Astronomical year numbering, * that is BC x is -x+1 and there is a year 0 (BC 1) * but Joda-time returns -x for year x BC in Julian chronology (no year 0) */ private int year(int year) { Chronology c; if (year < 0 && ( (c = dt.getChronology()) instanceof JulianChronology || (c instanceof GJChronology && ((GJChronology) c).getGregorianCutover().isAfter(dt)))) return year + 1; return year; }
/** * Ruby always follows Astronomical year numbering, * that is BC x is -x+1 and there is a year 0 (BC 1) * but Joda-time returns -x for year x BC in Julian chronology (no year 0) */ private static int year(DateTime dt, int year) { Chronology c; if (year < 0 && ( (c = dt.getChronology()) instanceof JulianChronology || (c instanceof GJChronology && ((GJChronology) c).getGregorianCutover().isAfter(dt)))) return year + 1; return year; }
/** * Ruby always follows Astronomical year numbering, * that is BC x is -x+1 and there is a year 0 (BC 1) * but Joda-time returns -x for year x BC in Julian chronology (no year 0) */ private int year(DateTime dt, int year) { Chronology c; if (year < 0 && ( (c = dt.getChronology()) instanceof JulianChronology || (c instanceof GJChronology && ((GJChronology) c).getGregorianCutover().isAfter(dt)))) return year + 1; return year; }
/** * Ruby always follows Astronomical year numbering, * that is BC x is -x+1 and there is a year 0 (BC 1) * but Joda-time returns -x for year x BC in Julian chronology (no year 0) */ private int year(int year) { Chronology c; if (year < 0 && ( (c = dt.getChronology()) instanceof JulianChronology || (c instanceof GJChronology && ((GJChronology) c).getGregorianCutover().isAfter(dt)))) return year + 1; return year; }
/** * Ruby always follows Astronomical year numbering, * that is BC x is -x+1 and there is a year 0 (BC 1) * but Joda-time returns -x for year x BC in Julian chronology (no year 0) */ private int year(DateTime dt, int year) { Chronology c; if (year < 0 && ( (c = dt.getChronology()) instanceof JulianChronology || (c instanceof GJChronology && ((GJChronology) c).getGregorianCutover().isAfter(dt)))) return year + 1; return year; }
/** * Ruby always follows Astronomical year numbering, * that is BC x is -x+1 and there is a year 0 (BC 1) * but Joda-time returns -x for year x BC in Julian chronology (no year 0) */ private int year(int year) { Chronology c; if (year < 0 && ( (c = dt.getChronology()) instanceof JulianChronology || (c instanceof GJChronology && ((GJChronology) c).getGregorianCutover().isAfter(dt)))) return year + 1; return year; }
chrono = chronos.get(i); if (minDaysInFirstWeek == chrono.getMinimumDaysInFirstWeek() && cutoverInstant.equals(chrono.getGregorianCutover())) {
chrono = (GJChronology)chronos.get(i); if (minDaysInFirstWeek == chrono.getMinimumDaysInFirstWeek() && cutoverInstant.equals(chrono.getGregorianCutover())) {
chrono = chronos.get(i); if (minDaysInFirstWeek == chrono.getMinimumDaysInFirstWeek() && cutoverInstant.equals(chrono.getGregorianCutover())) {
chrono = chronos.get(i); if (minDaysInFirstWeek == chrono.getMinimumDaysInFirstWeek() && cutoverInstant.equals(chrono.getGregorianCutover())) {
chrono = chronos.get(i); if (minDaysInFirstWeek == chrono.getMinimumDaysInFirstWeek() && cutoverInstant.equals(chrono.getGregorianCutover())) {
chrono = chronos.get(i); if (minDaysInFirstWeek == chrono.getMinimumDaysInFirstWeek() && cutoverInstant.equals(chrono.getGregorianCutover())) {
@JRubyMethod public IRubyObject start(ThreadContext context) { Chronology chrono = dt.getChronology(); if (chrono instanceof GregorianChronology) { return getMetaClass().getConstant("GREGORIAN"); // Date::GREGORIAN (-Date::Infinity) } if (chrono instanceof JulianChronology) { return getMetaClass().getConstant("JULIAN"); // Date::JULIAN (+Date::Infinity) } long cutover = DateTimeUtils.toJulianDayNumber(((GJChronology) chrono).getGregorianCutover().getMillis()); return new RubyFixnum(context.runtime, cutover); }
@JRubyMethod public IRubyObject start(ThreadContext context) { Chronology chrono = dt.getChronology(); if (chrono instanceof GregorianChronology) { return getMetaClass().getConstant("GREGORIAN"); // Date::GREGORIAN (-Date::Infinity) } if (chrono instanceof JulianChronology) { return getMetaClass().getConstant("JULIAN"); // Date::JULIAN (+Date::Infinity) } long cutover = DateTimeUtils.toJulianDayNumber(((GJChronology) chrono).getGregorianCutover().getMillis()); return new RubyFixnum(context.runtime, cutover); }