Package org.timepedia.chronoscope.client.util.date

Examples of org.timepedia.chronoscope.client.util.date.DayOfWeek


    // This test hits the Julian, JulianGregorianCrossover, and Gregorian EraCalc
    // subclasses.  Verifies that the day-of-week value is the same for each week
    // that we increment.
    d = createTestDate(1581, 0, 15);
    DayOfWeek dow = d.getDayOfWeek();
    for (int i = 0; i < (52 * 3); i++) {
      d.add(TimeUnit.WEEK, 1);
      assertEquals(dow, d.getDayOfWeek());
    }
  }
View Full Code Here


   
    for (int y = minYear; y <= maxYear; y++) {
      boolean isLeapYear = eraCalc.isLeapYear(y);
      for (int m = 0; m < 12; m++) {
        for (int d = 1; d <= eraCalc.getDaysInMonth(m, isLeapYear); d++) {
          DayOfWeek dow = eraCalc.calcDayOfWeek(y, m, d);
          //Date javaDate = javaDate(y, m, d);
          javaDate.setYear(y - 1900);
          javaDate.setMonth(m);
          javaDate.setDate(d);
          DayOfWeek expectedDOW = DayOfWeek.values()[javaDate.getDay()];
          //System.out.println("TESTING: javaDate=" + javaDate + "; dow=" + dow);
          assertEquals("y=" + y + ";m=" + m + ";d=" + d + ": ", expectedDOW, dow);
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.timepedia.chronoscope.client.util.date.DayOfWeek

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.