anchor.diff:      // Returns the week day (in range 0 - 6).
       int weekDay(year) {
         // 1/1/1970 was a Thursday.
  -      return (dayFromYear_(year) + 4) % 7;
  +      return (_dayFromYear(year) + 4) % 7;
       }
       // 1/1/1956 was a Sunday (i.e. weekday 0). 1956 was a leap-year.
       // 1/1/1967 was a Sunday (i.e. weekday 0).
  
positive.code:   }
  
    int get year() {
      int secondsSinceEpoch = secondsSinceEpoch_;
      // According to V8 some library calls have troubles with negative values.
      // Therefore clamp to 0 - year 2035 (which is less than the size of 32bit).
      if (secondsSinceEpoch >= 0 && secondsSinceEpoch < SECONDS_YEAR_2035_) {
        return getYear_(secondsSinceEpoch, timeZone.isUtc);
      }
  
      // Approximate the result. We don't take timeZone into account.
      int approximateYear = yearsFromSecondsSinceEpoch_(secondsSinceEpoch);
      int equivalentYear = equivalentYear_(approximateYear);
      int y = getYear_(equivalentSeconds_(secondsSinceEpoch_), timeZone.isUtc);
      return approximateYear + (y - equivalentYear);
    }
  
    int get month() {
      return getMonth_(equivalentSeconds_(secondsSinceEpoch_), timeZone.isUtc);
    }
  
    int get day() {
      return getDay_(equivalentSeconds_(secondsSinceEpoch_), timeZone.isUtc);
    }
  
    int get hours() {
      return getHours_(equivalentSeconds_(secondsSinceEpoch_), timeZone.isUtc);
    }
  
    int get minutes() {
      return getMinutes_(equivalentSeconds_(secondsSinceEpoch_), timeZone.isUtc);
    }
  
    int get seconds() {
      return getSeconds_(equivalentSeconds_(secondsSinceEpoch_), timeZone.isUtc);
    }
  
    int get milliseconds() {
      return value % Duration.MILLISECONDS_PER_SECOND;
    }
  
    int get secondsSinceEpoch_() {
      // Always round down.
      if (value < 0) {
        return (value + 1) ~/ Duration.MILLISECONDS_PER_SECOND - 1;
  
negative.code:   }
  
    // Given [secondsSinceEpoch] returns seconds such that they are at the same
    // time in an equivalent year (see [_equivalentYear]).
    // Leap seconds are ignored.
    static int _equivalentSeconds(int secondsSinceEpoch) {
      if (secondsSinceEpoch >= 0 && secondsSinceEpoch < _SECONDS_YEAR_2035) {
        return secondsSinceEpoch;
      }
      int year = _yearsFromSecondsSinceEpoch(secondsSinceEpoch);
      int days = _dayFromYear(year);
      int equivalentYear = _equivalentYear(year);
      int equivalentDays = _dayFromYear(equivalentYear);
      int diffDays = equivalentDays - days;
      return secondsSinceEpoch + diffDays * Duration.SECONDS_PER_DAY;
    }
  
    // Returns the days since 1970 for the start of the given [year].
    // [year] may be before epoch.
    static int _dayFromYear(int year) {
      int flooredDivision(int a, int b) {
        return (a - (a < 0 ? b - 1 : 0)) ~/ b;
      }
  