Package com.google.ical.values

Examples of com.google.ical.values.DateValue.year()


        {
          // step back one interval
          DTBuilder dtStartMinus1B = new DTBuilder(dtStart);
          dtStartMinus1B.day -= interval;
          DateValue dtStartMinus1 = dtStartMinus1B.toDate();
          year = dtStartMinus1.year();
          month = dtStartMinus1.month();
          date = dtStartMinus1.day();
          nDays = TimeUtils.monthLength(year, month);
        }
View Full Code Here


            // we only generate instances in the next set

            DateValue d0 = null;
            if (null != pushback) {
              d0 = pushback;
              builder.year = d0.year();
              builder.month = d0.month();
              builder.day = d0.day();
              pushback = null;
            } else if (!first) {
              // we need to skip ahead to the next item since we didn't exhaust
View Full Code Here

                      > ((7 + Weekday.valueOf(d0).javaDayNum
                          - wkst.javaDayNum) % 7);
                    break;
                  case MONTHLY:
                    contained =
                      d0.month() == d.month() && d0.year() == d.year();
                    break;
                  case YEARLY:
                    contained = d0.year() == d.year();
                    break;
                  default:
View Full Code Here

                  case MONTHLY:
                    contained =
                      d0.month() == d.month() && d0.year() == d.year();
                    break;
                  case YEARLY:
                    contained = d0.year() == d.year();
                    break;
                  default:
                    done = true;
                    return false;
                }
View Full Code Here

            }
          }
          // (5) Emit a date.  It will be checked against the end condition and
          // dtStart elsewhere
          DateValue d = candidates.get(i++);
          builder.year = d.year();
          builder.month = d.month();
          builder.day = d.day();
          if (d instanceof TimeValue) {
            TimeValue t = (TimeValue) d;
            builder.hour = t.hour();
View Full Code Here

      // The actual iterator implementation is responsible for anything
      // < dtStart.
      switch (freq) {
        case YEARLY:
          start = dtStart instanceof TimeValue
              ? new DateTimeValueImpl(start.year(), 1, 1, 0, 0, 0)
              : new DateValueImpl(start.year(), 1, 1);
          break;
        case MONTHLY:
          start = dtStart instanceof TimeValue
              ? new DateTimeValueImpl(start.year(), start.month(), 1, 0, 0, 0)
View Full Code Here

      // < dtStart.
      switch (freq) {
        case YEARLY:
          start = dtStart instanceof TimeValue
              ? new DateTimeValueImpl(start.year(), 1, 1, 0, 0, 0)
              : new DateValueImpl(start.year(), 1, 1);
          break;
        case MONTHLY:
          start = dtStart instanceof TimeValue
              ? new DateTimeValueImpl(start.year(), start.month(), 1, 0, 0, 0)
              : new DateValueImpl(start.year(), start.month(), 1);
View Full Code Here

              ? new DateTimeValueImpl(start.year(), 1, 1, 0, 0, 0)
              : new DateValueImpl(start.year(), 1, 1);
          break;
        case MONTHLY:
          start = dtStart instanceof TimeValue
              ? new DateTimeValueImpl(start.year(), start.month(), 1, 0, 0, 0)
              : new DateValueImpl(start.year(), start.month(), 1);
          break;
        case WEEKLY:
          int d = (7 + wkst.ordinal() - Weekday.valueOf(dtStart).ordinal()) % 7;
          start = TimeUtils.add(dtStart, new DateValueImpl(0, 0, -d));
View Full Code Here

              : new DateValueImpl(start.year(), 1, 1);
          break;
        case MONTHLY:
          start = dtStart instanceof TimeValue
              ? new DateTimeValueImpl(start.year(), start.month(), 1, 0, 0, 0)
              : new DateValueImpl(start.year(), start.month(), 1);
          break;
        case WEEKLY:
          int d = (7 + wkst.ordinal() - Weekday.valueOf(dtStart).ordinal()) % 7;
          start = TimeUtils.add(dtStart, new DateValueImpl(0, 0, -d));
          break;
View Full Code Here

    this.pendingUtc_ = null;

    try {
      if (this.canShortcutAdvance_) {
        // skip years before date.year
        if (this.builder_.year < dateLocal.year()) {
          do {
            if (!this.yearGenerator_.generate(this.builder_)) {
              this.done_ = true;
              return;
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.