Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-1077

GregorianCalendar does weird things before 1582

    Details

      Description

      http://docs.oracle.com/javase/7/docs/api/java/util/GregorianCalendar.html

      "GregorianCalendar is a hybrid calendar that supports both the Julian and Gregorian calendar systems with the support of a single discontinuity, which corresponds by default to the Gregorian date when the Gregorian calendar was instituted (October 15, 1582 in some countries, later in others). The cutover date may be changed by the caller by calling setGregorianChange().
      Historically, in those countries which adopted the Gregorian calendar first, October 4, 1582 (Julian) was thus followed by October 15, 1582 (Gregorian). This calendar models this correctly. Before the Gregorian cutover,GregorianCalendar implements the Julian calendar. The only difference between the Gregorian and the Julian calendar is the leap year rule. The Julian calendar specifies leap years every four years, whereas the Gregorian calendar omits century years which are not divisible by 400."

      Need to start using this method in DateTimeExtension:

      public void setGregorianChange(Date date)

      Sets the GregorianCalendar change date. This is the point when the switch from Julian dates to Gregorian dates occurred. Default is October 15, 1582 (Gregorian). Previous to this, dates will be in the Julian calendar.

      To obtain a pure Julian calendar, set the change date to Date(Long.MAX_VALUE). To obtain a pure Gregorian calendar, set the change date to Date(Long.MIN_VALUE).

        Issue Links

          Activity

          Hide
          bryanthompson bryanthompson added a comment -

          Mike has identified a fix. The fix is being tested with our subscribers.

          Show
          bryanthompson bryanthompson added a comment - Mike has identified a fix. The fix is being tested with our subscribers.
          Hide
          bryanthompson bryanthompson added a comment -

          This is the previous ticket that had a very similar problem. In the case of this previous ticket (BLZG-1077), the problem was around dates of calendar reform. In the case of the new ticket, the problem is around a more recent date that is suspiciously close to the end of a year (1999).

          Show
          bryanthompson bryanthompson added a comment - This is the previous ticket that had a very similar problem. In the case of this previous ticket ( BLZG-1077 ), the problem was around dates of calendar reform. In the case of the new ticket, the problem is around a more recent date that is suspiciously close to the end of a year (1999).

            People

            • Assignee:
              mikepersonick mikepersonick
              Reporter:
              mikepersonick mikepersonick
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: