Example usage for java.util Calendar SEPTEMBER

List of usage examples for java.util Calendar SEPTEMBER

Introduction

In this page you can find the example usage for java.util Calendar SEPTEMBER.

Prototype

int SEPTEMBER

To view the source code for java.util Calendar SEPTEMBER.

Click Source Link

Document

Value of the #MONTH field indicating the ninth month of the year in the Gregorian and Julian calendars.

Usage

From source file:com.icesoft.faces.component.selectinputdate.SelectInputDateRenderer.java

/**
 * @param symbols//from   w ww  . j a va  2 s  . co m
 * @return months - String[] containing localized month names
 */
public static String[] mapMonths(DateFormatSymbols symbols) {
    String[] months = new String[12];

    String[] localeMonths = symbols.getMonths();

    months[0] = localeMonths[Calendar.JANUARY];
    months[1] = localeMonths[Calendar.FEBRUARY];
    months[2] = localeMonths[Calendar.MARCH];
    months[3] = localeMonths[Calendar.APRIL];
    months[4] = localeMonths[Calendar.MAY];
    months[5] = localeMonths[Calendar.JUNE];
    months[6] = localeMonths[Calendar.JULY];
    months[7] = localeMonths[Calendar.AUGUST];
    months[8] = localeMonths[Calendar.SEPTEMBER];
    months[9] = localeMonths[Calendar.OCTOBER];
    months[10] = localeMonths[Calendar.NOVEMBER];
    months[11] = localeMonths[Calendar.DECEMBER];

    return months;
}

From source file:com.bangalore.barcamp.BCBUtils.java

public static void setAlarmForSession(Context context, Slot slot, Session session, int slotpos,
        int sessionpos) {
    BCBSharedPrefUtils.setAlarmSettingsForID(context, session.id, BCBSharedPrefUtils.ALARM_SET);
    PendingIntent intent = BCBUtils.createPendingIntentForID(context, session.id, slotpos, sessionpos);
    AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
    int hour = slot.startTime / 100;
    int mins = slot.startTime % 100;
    Log.e("Session", "hour : " + hour + " mins :" + mins);
    GregorianCalendar date = new GregorianCalendar(2013, Calendar.SEPTEMBER, 14, hour, mins);
    long timeInMills = date.getTimeInMillis() - 300000;
    alarmManager.set(AlarmManager.RTC_WAKEUP, timeInMills, intent);
}

From source file:fr.aliacom.obm.common.calendar.CalendarBindingImplTest.java

@Test
public void testGetSyncDoesNotMoveConfidentialEvents() throws FindException, ServerFault, NotAllowedException {
    String calendar = "user@test.tlse.lng";
    ObmUser user = ObmUser.builder().uid(1).entityId(EntityId.valueOf(2)).login(UserLogin.valueOf("user"))
            .domain(ToolBox.getDefaultObmDomain())
            .emails(UserEmails.builder().addAddress("user@test.tlse.lng").domain(ToolBox.getDefaultObmDomain())
                    .build())/* www  .  j  a va 2s .c  o  m*/
            .identity(UserIdentity.builder().firstName("Obm").lastName("User").build()).build();

    Date timeCreate = new DateTime(1974, Calendar.SEPTEMBER, 4, 14, 0).toDate();
    Date lastSync = new DateTime(1973, Calendar.SEPTEMBER, 4, 14, 0).toDate();
    Date syncDateFromDao = new DateTime(lastSync).plusSeconds(5).toDate();

    Event simpleConfidentialEvent = new Event();
    simpleConfidentialEvent.setUid(new EventObmId(4));
    simpleConfidentialEvent.setPrivacy(EventPrivacy.CONFIDENTIAL);
    simpleConfidentialEvent.setExtId(new EventExtId("confidential_event2"));
    simpleConfidentialEvent.setTimeCreate(timeCreate);

    EventChanges eventChangesFromDao = EventChanges.builder().lastSync(syncDateFromDao)
            .updates(Lists.newArrayList(simpleConfidentialEvent)).build();

    EventChanges expectedEventChanges = EventChanges.builder().lastSync(syncDateFromDao)
            .updates(Lists.newArrayList(simpleConfidentialEvent)).build();

    expect(userService.getUserFromCalendar(calendar, "test.tlse.lng")).andReturn(user).atLeastOnce();

    expect(helperService.canReadCalendar(token, calendar)).andReturn(true).once();
    expect(helperService.canWriteOnCalendar(token, calendar)).andReturn(true).once();

    expect(calendarDao.getSync(token, user, lastSync, null, null, false)).andReturn(eventChangesFromDao);

    mocksControl.replay();

    EventChanges actualEventChanges = binding.getSyncWithSortedChanges(token, calendar, lastSync, null);

    mocksControl.verify();

    assertThat(actualEventChanges).isEqualTo(expectedEventChanges);
}