Examples of Week


Examples of org.jfree.data.time.Week

        Locale saved = Locale.getDefault();
        Locale.setDefault(Locale.ITALY);
        Calendar cal = Calendar.getInstance(Locale.ITALY);
        cal.set(2006, Calendar.JANUARY, 8, 23, 59, 59);
        cal.set(Calendar.MILLISECOND, 999);
        Week w = new Week(1, 2006);
        assertEquals(cal.getTime(), w.getEnd());
        Locale.setDefault(saved);
    }
View Full Code Here

Examples of org.jfree.data.time.Week

        // first day of week is monday
        assertEquals(Calendar.MONDAY, cal.getFirstDayOfWeek());
        cal.set(2007, Calendar.AUGUST, 26, 1, 0, 0);
        cal.set(Calendar.MILLISECOND, 0);
        Date t = cal.getTime();
        Week w = new Week(t, TimeZone.getTimeZone("Europe/Copenhagen"));
        assertEquals(34, w.getWeek());

        Locale.setDefault(Locale.US);
        TimeZone.setDefault(TimeZone.getTimeZone("US/Detroit"));
        cal = (GregorianCalendar) Calendar.getInstance(TimeZone.getDefault());
        // first day of week is Sunday
        assertEquals(Calendar.SUNDAY, cal.getFirstDayOfWeek());
        cal.set(2007, Calendar.AUGUST, 26, 1, 0, 0);
        cal.set(Calendar.MILLISECOND, 0);

        t = cal.getTime();
        w = new Week(t, TimeZone.getTimeZone("Europe/Copenhagen"));
        assertEquals(35, w.getWeek());
        w = new Week(t, TimeZone.getTimeZone("Europe/Copenhagen"),
                new Locale("da", "DK"));
        assertEquals(34, w.getWeek());

        Locale.setDefault(savedLocale);
        TimeZone.setDefault(savedZone);
    }
View Full Code Here

Examples of org.ocpsoft.prettytime.units.Week

      addUnit(new Millisecond());
      addUnit(new Second());
      addUnit(new Minute());
      addUnit(new Hour());
      addUnit(new Day());
      addUnit(new Week());
      addUnit(new Month());
      addUnit(new Year());
      addUnit(new Decade());
      addUnit(new Century());
      addUnit(new Millennium());
View Full Code Here

Examples of org.openmeetings.app.data.calendar.beans.Week

        long z = 0;

        for (int k = 0; k < 6; k++) { // 6 weeks per monthly summary

          Week week = new Week();

          for (int i = 0; i < 7; i++) { // 7 days a week

            Calendar tCal = Calendar.getInstance(timezone);
            tCal.setTimeInMillis(startWeekDay.getTimeInMillis()
                + (z * 86400000L));
           
            Day day = new Day(tCal.getTime());
           
            for (Appointment appointment : appointments) {
              if (appointment
                  .appointmentStartAsCalendar(timezone).get(
                      Calendar.MONTH) == tCal
                  .get(Calendar.MONTH)
                  && appointment.appointmentStartAsCalendar(
                      timezone).get(Calendar.DATE) == tCal
                      .get(Calendar.DATE)) {
                day.getAppointments().add(
                    new AppointmentDTO(appointment,
                        timezone));
              }
            }

            week.getDays().add(day);
            z++;
          }

          weeks.add(week);
        }
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.