Package com.google.ical.values

Examples of com.google.ical.values.DateValueImpl


   * a DateValue with the same year, month, and day as the given instance that
   * is not a TimeValue.
   */
  public static DateValue toDateValue(DateValue dv) {
    return (!(dv instanceof TimeValue) ? dv
            : new DateValueImpl(dv.year(), dv.month(), dv.day()));
  }
View Full Code Here


   * produces a normalized date.
   * @return not null
   */
  public DateValue toDate() {
    normalize();
    return new DateValueImpl(year, month, day);
  }
View Full Code Here

      return TimeUtils.add(
          refDate, new DateTimeValueImpl(
              0, 0, 0, 0, 0, (int) (daysFromNow * 24 * 60 * 60)));
    } else {
      assert !(refDate instanceof TimeValue);
      return TimeUtils.add(refDate, new DateValueImpl(0, 0, (int) daysFromNow));
    }
  }
View Full Code Here

    assertEquals(golden, sb.toString());
  }

  public void testEmptyCompoundIterators() throws Exception {
    runRecurrenceIteratorTest(
        "", new DateValueImpl(2006, 4, 13), PST, 10, null, "20060413");
  }
View Full Code Here

        "", new DateValueImpl(2006, 4, 13), PST, 10, null, "20060413");
  }

  public void testMultipleChecksDontChange() throws Exception {
    RecurrenceIterator ri = RecurrenceIteratorFactory.createRecurrenceIterator(
        "RRULE:FREQ=WEEKLY;BYDAY=TH;COUNT=3", new DateValueImpl(2006, 4, 9),
        PST);
    StringBuilder sb = new StringBuilder();
    int k = 0;
    int limit = 50;
    while (ri.hasNext() && ri.hasNext() && --limit >= 0) {
View Full Code Here

  public void testInterleavingOfDateIterators() throws Exception {
    runRecurrenceIteratorTest(
        "RDATE:20060418,20070101\n"
        + "RDATE:20060422,20060417,2006\n 0412",
        new DateValueImpl(2006, 4, 13), PST, 10, null,
        "20060412,20060413,20060417,20060418,20060422,20070101");
  }
View Full Code Here

  public void testInterleavingOfDateIterators2() throws Exception {
    runRecurrenceIteratorTest(
        "RDATE:20060418,20070101\n"
        + "RDATE:20060422,20060417,2006\n 0412",
        new DateValueImpl(2006, 4, 13), PST, 10, new DateValueImpl(2006, 4, 10),
        "20060412,20060413,20060417,20060418,20060422,20070101");
  }
View Full Code Here

  public void testInterleavingOfDateIterators3() throws Exception {
    runRecurrenceIteratorTest(
        "RDATE:20060418,20070101\n"
        + "RDATE:20060422,20060417,2006\n 0412",
        new DateValueImpl(2006, 4, 13), PST, 10, new DateValueImpl(2006, 4, 20),
        /*"20060412,20060413,20060417,20060418,*/"20060422,20070101");
  }
View Full Code Here

  public void testInterleavingOfDateIteratorsWithExclusions() throws Exception {
    runRecurrenceIteratorTest(
        "RDATE:20060417,20060418,20070101,20060417\n"
        + "EXDATE:20060417,20060415\n\n"
        + "RDATE:20060422,20060417,2006\n 0412",
        new DateValueImpl(2006, 4, 13), PST, 10, null,
        "20060412,20060413,20060418,20060422,20070101");
  }
View Full Code Here

      throws Exception {
    runRecurrenceIteratorTest(
        "RDATE:20060417,20060418,20070101,20060417\n"
        + "EXDATE:20060417,20060415\n\n"
        + "RDATE:20060422,20060417,2006\n 0412",
        new DateValueImpl(2006, 4, 13), PST, 10, new DateValueImpl(2006, 4, 18),
        /*"20060412,20060413,*/"20060418,20060422,20070101");
  }
View Full Code Here

TOP

Related Classes of com.google.ical.values.DateValueImpl

Copyright © 2018 www.massapicom. 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.