anchor.diff:        _clamp(this, min: min, max: max);
     DatepickerDateRange unclamped() => this;
     DateRange asPlainRange() => _plainRange(this);
  -  proto.DatepickerDateRange toProtoBuf() =>
  -      _makeProtoBuf(this)..lastNDays = _lengthInDays;
  +  proto.DatepickerDateRange toProtoBuf();
   
     bool operator ==(o) => rangeEqual(this, o);
     int get hashCode => rangeHash(this);
     String toString() => _rangeString(this);
  +}
  +
  +/// A range 'N' days long, which ends yesterday (today is not included).
  +///
  +/// Special-cased to have titles like 'Last 7 days', etc.
  +/// [lengthInDays] should be at least 1.
  +class LastNDaysRange extends MultipleDaysRange {
  +  LastNDaysRange(Date start, int lengthInDays, [String title])
  +      : super(start, lengthInDays, title ?? _lastNDaysMsg(lengthInDays));
  +
  +  LastNDaysRange.beforeToday(clock, lengthInDays, [String title])
  +      : super(Date.today(clock).add(days: -lengthInDays), lengthInDays,
  +            title ?? _lastNDaysMsg(lengthInDays));
  +
  +  @override
  +  proto.DatepickerDateRange toProtoBuf() =>
  +      _makeProtoBuf(this)..lastNDays = _lengthInDays;
   
     static _lastNDaysMsg(lengthInDays) => Intl.plural(lengthInDays,
         one: 'Yesterday',
  
positive.code:       examples: const {'daysFromNow': 2});
  }
  
  /// A range 'N' days long, which ends yesterday (today is not included).
  ///
  /// Special-cased to have titles like 'Last 7 days', etc.
  /// 'lengthInDays' should be at least 1.
  class LastNDaysRange implements DatepickerDateRange {
    final Date _start;
    final int _lengthInDays;
    final String title;
    LastNDaysRange(this._start, int lengthInDays, [String title])
        : title = title ?? _lastNDaysMsg(lengthInDays),
          _lengthInDays = lengthInDays;
    LastNDaysRange.beforeToday(clock, lengthInDays, [String title])
        : this(Date.today(clock).add(days: -lengthInDays), lengthInDays, title);
    Date get start => _start;
    Date get end => _start.add(days: _lengthInDays - 1);
    DatepickerDateRange get next => _genericNext(this);
  
negative.code: /// A range 'N' days long which ends today.
  ///
  /// Special-cased to have titles like '7 days to today', etc.
  /// [lengthInDays] should be at least 1.
  class LastNDaysToTodayRange extends MultipleDaysRange {
    LastNDaysToTodayRange(Date start, int lengthInDays, [String title])
        : super(start, lengthInDays, title ?? _lastNDaysToTodayMsg(lengthInDays));
  
    LastNDaysToTodayRange.beforeToday(clock, lengthInDays, [String title])
        : super(Date.today(clock).add(days: -(lengthInDays - 1)), lengthInDays,
              title ?? _lastNDaysToTodayMsg(lengthInDays));
  
    proto.DatepickerDateRange toProtoBuf() =>
        _makeProtoBuf(this)..lastNDaysToToday = _lengthInDays;
  
    static _lastNDaysToTodayMsg(lengthInDays) => Intl.plural(lengthInDays,
        one: 'Today',
  