List of usage examples for java.util Calendar OCTOBER
int OCTOBER
To view the source code for java.util Calendar OCTOBER.
Click Source Link
From source file:edu.northwestern.bioinformatics.studycalendar.dao.reporting.ScheduledActivitiesReportRowDaoTest.java
public void testSearchWithStopIdealDateFilter_Neg() { MutableRange<Date> range = new MutableRange<Date>(); range.setStop(DateUtils.createDate(2006, Calendar.OCTOBER, 25)); filters.setIdealDate(range);// w ww .j a va 2 s . co m assertSearchWithResults(); }
From source file:netmason.support.graphics.GanttDisplay.java
/** * Creates a sample dataset for a Gantt chart, using sub-tasks. In general, * you won't hard-code the dataset in this way - it's done here so that the * demo is self-contained./*from ww w . j ava2 s .com*/ * * @return The dataset. */ private IntervalCategoryDataset createSampleDataset() { final Task t1 = new Task("Write Proposal", date(1, Calendar.APRIL, 2001), date(5, Calendar.APRIL, 2001)); t1.setPercentComplete(1.00); s1.add(t1); final Task t2 = new Task("Obtain Approval", date(9, Calendar.APRIL, 2001), date(9, Calendar.APRIL, 2001)); t2.setPercentComplete(1.00); s1.add(t2); // here is a task split into two subtasks... final Task t3 = new Task("Requirements Analysis", date(10, Calendar.APRIL, 2001), date(5, Calendar.MAY, 2001)); final Task st31 = new Task("Requirements 1", date(10, Calendar.APRIL, 2001), date(25, Calendar.APRIL, 2001)); st31.setPercentComplete(1.0); final Task st32 = new Task("Requirements 2", date(1, Calendar.MAY, 2001), date(5, Calendar.MAY, 2001)); st32.setPercentComplete(1.0); t3.addSubtask(st31); t3.addSubtask(st32); s1.add(t3); // and another... final Task t4 = new Task("Design Phase", date(6, Calendar.MAY, 2001), date(30, Calendar.MAY, 2001)); final Task st41 = new Task("Design 1", date(6, Calendar.MAY, 2001), date(10, Calendar.MAY, 2001)); st41.setPercentComplete(1.0); final Task st42 = new Task("Design 2", date(15, Calendar.MAY, 2001), date(20, Calendar.MAY, 2001)); st42.setPercentComplete(1.0); final Task st43 = new Task("Design 3", date(23, Calendar.MAY, 2001), date(30, Calendar.MAY, 2001)); st43.setPercentComplete(0.50); t4.addSubtask(st41); t4.addSubtask(st42); t4.addSubtask(st43); s1.add(t4); final Task t5 = new Task("Design Signoff", date(2, Calendar.JUNE, 2001), date(2, Calendar.JUNE, 2001)); s1.add(t5); final Task t6 = new Task("Alpha Implementation", date(3, Calendar.JUNE, 2001), date(31, Calendar.JULY, 2001)); t6.setPercentComplete(0.60); s1.add(t6); final Task t7 = new Task("Design Review", date(1, Calendar.AUGUST, 2001), date(8, Calendar.AUGUST, 2001)); t7.setPercentComplete(0.0); s1.add(t7); final Task t8 = new Task("Revised Design Signoff", date(10, Calendar.AUGUST, 2001), date(10, Calendar.AUGUST, 2001)); t8.setPercentComplete(0.0); s1.add(t8); final Task t9 = new Task("Beta Implementation", date(12, Calendar.AUGUST, 2001), date(12, Calendar.SEPTEMBER, 2001)); t9.setPercentComplete(0.0); s1.add(t9); final Task t10 = new Task("Testing", date(13, Calendar.SEPTEMBER, 2001), date(31, Calendar.OCTOBER, 2001)); t10.setPercentComplete(0.0); s1.add(t10); final Task t11 = new Task("Final Implementation", date(1, Calendar.NOVEMBER, 2001), date(15, Calendar.NOVEMBER, 2001)); t11.setPercentComplete(0.0); s1.add(t11); final Task t12 = new Task("Signoff", date(28, Calendar.NOVEMBER, 2001), date(30, Calendar.NOVEMBER, 2001)); t12.setPercentComplete(0.0); s1.add(t12); final TaskSeriesCollection collection = new TaskSeriesCollection(); collection.add(s1); return collection; }
From source file:org.jfree.chart.demo.GanttDemo2.java
/** * Creates a sample dataset for a Gantt chart, using sub-tasks. In general, you won't * hard-code the dataset in this way - it's done here so that the demo is self-contained. * * @return The dataset.// w w w . ja va 2s .c om */ private IntervalCategoryDataset createSampleDataset() { final TaskSeries s1 = new TaskSeries("Scheduled"); final Task t1 = new Task("Write Proposal", date(1, Calendar.APRIL, 2001), date(5, Calendar.APRIL, 2001)); t1.setPercentComplete(1.00); s1.add(t1); final Task t2 = new Task("Obtain Approval", date(9, Calendar.APRIL, 2001), date(9, Calendar.APRIL, 2001)); t2.setPercentComplete(1.00); s1.add(t2); // here is a task split into two subtasks... final Task t3 = new Task("Requirements Analysis", date(10, Calendar.APRIL, 2001), date(5, Calendar.MAY, 2001)); final Task st31 = new Task("Requirements 1", date(10, Calendar.APRIL, 2001), date(25, Calendar.APRIL, 2001)); st31.setPercentComplete(1.0); final Task st32 = new Task("Requirements 2", date(1, Calendar.MAY, 2001), date(5, Calendar.MAY, 2001)); st32.setPercentComplete(1.0); t3.addSubtask(st31); t3.addSubtask(st32); s1.add(t3); // and another... final Task t4 = new Task("Design Phase", date(6, Calendar.MAY, 2001), date(30, Calendar.MAY, 2001)); final Task st41 = new Task("Design 1", date(6, Calendar.MAY, 2001), date(10, Calendar.MAY, 2001)); st41.setPercentComplete(1.0); final Task st42 = new Task("Design 2", date(15, Calendar.MAY, 2001), date(20, Calendar.MAY, 2001)); st42.setPercentComplete(1.0); final Task st43 = new Task("Design 3", date(23, Calendar.MAY, 2001), date(30, Calendar.MAY, 2001)); st43.setPercentComplete(0.50); t4.addSubtask(st41); t4.addSubtask(st42); t4.addSubtask(st43); s1.add(t4); final Task t5 = new Task("Design Signoff", date(2, Calendar.JUNE, 2001), date(2, Calendar.JUNE, 2001)); s1.add(t5); final Task t6 = new Task("Alpha Implementation", date(3, Calendar.JUNE, 2001), date(31, Calendar.JULY, 2001)); t6.setPercentComplete(0.60); s1.add(t6); final Task t7 = new Task("Design Review", date(1, Calendar.AUGUST, 2001), date(8, Calendar.AUGUST, 2001)); t7.setPercentComplete(0.0); s1.add(t7); final Task t8 = new Task("Revised Design Signoff", date(10, Calendar.AUGUST, 2001), date(10, Calendar.AUGUST, 2001)); t8.setPercentComplete(0.0); s1.add(t8); final Task t9 = new Task("Beta Implementation", date(12, Calendar.AUGUST, 2001), date(12, Calendar.SEPTEMBER, 2001)); t9.setPercentComplete(0.0); s1.add(t9); final Task t10 = new Task("Testing", date(13, Calendar.SEPTEMBER, 2001), date(31, Calendar.OCTOBER, 2001)); t10.setPercentComplete(0.0); s1.add(t10); final Task t11 = new Task("Final Implementation", date(1, Calendar.NOVEMBER, 2001), date(15, Calendar.NOVEMBER, 2001)); t11.setPercentComplete(0.0); s1.add(t11); final Task t12 = new Task("Signoff", date(28, Calendar.NOVEMBER, 2001), date(30, Calendar.NOVEMBER, 2001)); t12.setPercentComplete(0.0); s1.add(t12); final TaskSeriesCollection collection = new TaskSeriesCollection(); collection.add(s1); return collection; }
From source file:ISO8601DateTimeFormat.java
/** * Write century, year, and months./*from w w w. ja va 2 s. c o m*/ * @param sbuf The buffer to append the string. */ protected final void writeCCYYMM(StringBuffer sbuf) { int year = calendar.get(Calendar.YEAR); appendInt(sbuf, year, 4); String month; switch (calendar.get(Calendar.MONTH)) { case Calendar.JANUARY: month = "-01-"; break; case Calendar.FEBRUARY: month = "-02-"; break; case Calendar.MARCH: month = "-03-"; break; case Calendar.APRIL: month = "-04-"; break; case Calendar.MAY: month = "-05-"; break; case Calendar.JUNE: month = "-06-"; break; case Calendar.JULY: month = "-07-"; break; case Calendar.AUGUST: month = "-08-"; break; case Calendar.SEPTEMBER: month = "-09-"; break; case Calendar.OCTOBER: month = "-10-"; break; case Calendar.NOVEMBER: month = "-11-"; break; case Calendar.DECEMBER: month = "-12-"; break; default: month = "-NA-"; break; } sbuf.append(month); int day = calendar.get(Calendar.DAY_OF_MONTH); appendInt(sbuf, day, 2); }
From source file:com.mb.framework.util.DateTimeUtil.java
/** * This method is used for getting month long description * // w w w.java 2 s . c o m * @param mthNum * @return */ public static String getMonthLongDesc(int mthNum) { String mthLongDesc; switch (mthNum) { case Calendar.JANUARY: { mthLongDesc = DateTimeConstants.JANUARY; break; } case Calendar.FEBRUARY: { mthLongDesc = DateTimeConstants.FEBRUARY; break; } case Calendar.MARCH: { mthLongDesc = DateTimeConstants.MARCH; break; } case Calendar.APRIL: { mthLongDesc = DateTimeConstants.APRIL; break; } case Calendar.MAY: { mthLongDesc = DateTimeConstants.MAY; break; } case Calendar.JUNE: { mthLongDesc = DateTimeConstants.JUNE; break; } case Calendar.JULY: { mthLongDesc = DateTimeConstants.JULY; break; } case Calendar.AUGUST: { mthLongDesc = DateTimeConstants.AUGUST; break; } case Calendar.SEPTEMBER: { mthLongDesc = DateTimeConstants.SEPTEMBER; break; } case Calendar.OCTOBER: { mthLongDesc = DateTimeConstants.OCTOBER; break; } case Calendar.NOVEMBER: { mthLongDesc = DateTimeConstants.NOVEMBER; break; } case Calendar.DECEMBER: { mthLongDesc = DateTimeConstants.DECEMBER; break; } default: { mthLongDesc = ""; break; } } return mthLongDesc; }
From source file:org.emfjson.jackson.tests.ValueTest.java
@Test public void testDateValue() throws IOException { Calendar calendar = Calendar.getInstance(); calendar.set(2020, Calendar.OCTOBER, 10); assertNotNull(mapper.getDateFormat()); JsonNode expected = mapper.createObjectNode().put("eClass", "http://www.emfjson.org/jackson/model#//ETypes") .put("eDate", mapper.getDateFormat().format(calendar.getTime())); Resource resource = resourceSet.createResource(URI.createURI("tests/test.json")); ETypes valueObject = ModelFactory.eINSTANCE.createETypes(); Date value = calendar.getTime(); valueObject.setEDate(value);/*from w w w . ja va 2 s. c o m*/ resource.getContents().add(valueObject); assertEquals(expected, mapper.valueToTree(resource)); }
From source file:ch.cyberduck.core.ftp.parser.UnixFTPEntryParserTest.java
/** * http://trac.cyberduck.ch/ticket/143//from w ww. jav a 2 s . com */ @Test public void testLeadingWhitespace() { FTPFileEntryParser parser = new FTPParserSelector().getParser("UNIX"); FTPFile parsed; parsed = parser.parseFTPEntry("-rw-r--r-- 1 20708 205 3553312 Feb 18 2005 D3I0_515.fmr"); assertNotNull(parsed); assertTrue(parsed.isFile()); assertEquals("D3I0_515.fmr", parsed.getName()); assertEquals("20708", parsed.getUser()); assertEquals("205", parsed.getGroup()); assertNotNull(parsed.getTimestamp()); assertEquals(Calendar.FEBRUARY, parsed.getTimestamp().get(Calendar.MONTH)); assertEquals(18, parsed.getTimestamp().get(Calendar.DAY_OF_MONTH)); assertEquals(2005, parsed.getTimestamp().get(Calendar.YEAR)); parsed = parser.parseFTPEntry("drwxr-sr-x 14 17037 209 4096 Oct 6 2000 v3r7"); assertNotNull(parsed); assertTrue(parsed.isDirectory()); assertEquals("v3r7", parsed.getName()); assertEquals("17037", parsed.getUser()); assertEquals("209", parsed.getGroup()); assertNotNull(parsed.getTimestamp()); assertEquals(Calendar.OCTOBER, parsed.getTimestamp().get(Calendar.MONTH)); assertEquals(6, parsed.getTimestamp().get(Calendar.DAY_OF_MONTH)); assertEquals(2000, parsed.getTimestamp().get(Calendar.YEAR)); // #2895 parsed = parser.parseFTPEntry("-rwx------ 1 user group 38635 Jul 13 2006 users.xml"); assertNotNull(parsed); assertEquals(FTPFile.FILE_TYPE, parsed.getType()); assertEquals("users.xml", parsed.getName()); assertEquals("user", parsed.getUser()); assertEquals("group", parsed.getGroup()); assertNotNull(parsed.getTimestamp()); assertEquals(Calendar.JULY, parsed.getTimestamp().get(Calendar.MONTH)); assertEquals(13, parsed.getTimestamp().get(Calendar.DAY_OF_MONTH)); assertEquals(2006, parsed.getTimestamp().get(Calendar.YEAR)); }
From source file:com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.java
public void doPutsInClientCache() { ClientCache cache = GemFireCacheImpl.getInstance(); assertNotNull(cache);/* w w w. j a va2 s .c o m*/ Region<String, Object> region = cache.getRegion(PEOPLE_REGION_NAME); // put person object final Person person1 = new Person(101L, "Mithali", "Dorai", "Raj", DateTimeUtils.createDate(1982, Calendar.DECEMBER, 4), Gender.FEMALE); final Person person2 = new Person(102L, "Sachin", "Ramesh", "Tendulkar", DateTimeUtils.createDate(1975, Calendar.DECEMBER, 14), Gender.MALE); final Person person3 = new Person(103L, "Saurabh", "Baburav", "Ganguly", DateTimeUtils.createDate(1972, Calendar.AUGUST, 29), Gender.MALE); final Person person4 = new Person(104L, "Rahul", "subrymanyam", "Dravid", DateTimeUtils.createDate(1979, Calendar.MARCH, 17), Gender.MALE); final Person person5 = new Person(105L, "Jhulan", "Chidambaram", "Goswami", DateTimeUtils.createDate(1983, Calendar.NOVEMBER, 25), Gender.FEMALE); region.put("1", person1); region.put("2", person2); region.put("3", person3); region.put("4", person4); region.put("5", person5); final Person person6 = new Person(101L, "Rahul", "Rajiv", "Gndhi", DateTimeUtils.createDate(1970, Calendar.MAY, 14), Gender.MALE); final Person person7 = new Person(102L, "Narendra", "Damodar", "Modi", DateTimeUtils.createDate(1945, Calendar.DECEMBER, 24), Gender.MALE); final Person person8 = new Person(103L, "Atal", "Bihari", "Vajpayee", DateTimeUtils.createDate(1920, Calendar.AUGUST, 9), Gender.MALE); final Person person9 = new Person(104L, "Soniya", "Rajiv", "Gandhi", DateTimeUtils.createDate(1929, Calendar.MARCH, 27), Gender.FEMALE); final Person person10 = new Person(104L, "Priyanka", "Robert", "Gandhi", DateTimeUtils.createDate(1973, Calendar.APRIL, 15), Gender.FEMALE); final Person person11 = new Person(104L, "Murali", "Manohar", "Joshi", DateTimeUtils.createDate(1923, Calendar.APRIL, 25), Gender.MALE); final Person person12 = new Person(104L, "Lalkrishna", "Parmhansh", "Advani", DateTimeUtils.createDate(1910, Calendar.JANUARY, 01), Gender.MALE); final Person person13 = new Person(104L, "Shushma", "kumari", "Swaraj", DateTimeUtils.createDate(1943, Calendar.AUGUST, 10), Gender.FEMALE); final Person person14 = new Person(104L, "Arun", "raman", "jetly", DateTimeUtils.createDate(1942, Calendar.OCTOBER, 27), Gender.MALE); final Person person15 = new Person(104L, "Amit", "kumar", "shah", DateTimeUtils.createDate(1958, Calendar.DECEMBER, 21), Gender.MALE); final Person person16 = new Person(104L, "Shila", "kumari", "Dixit", DateTimeUtils.createDate(1927, Calendar.FEBRUARY, 15), Gender.FEMALE); Map<String, Object> userMap = new HashMap<String, Object>(); userMap.put("6", person6); userMap.put("7", person7); userMap.put("8", person8); userMap.put("9", person9); userMap.put("10", person10); userMap.put("11", person11); userMap.put("12", person12); userMap.put("13", person13); userMap.put("14", person14); userMap.put("15", person15); userMap.put("16", person16); region.putAll(userMap); if (cache != null) cache.getLogger().info("Gemfire Cache Client: Puts successfully done"); }
From source file:gov.nih.nci.firebird.selenium2.tests.profile.credentials.WorkHistoryCredentialsTest.java
private void checkForExpirationBeforeEffectiveDateError(final EditWorkHistoryDialog credentialDialog) throws IOException { credentialDialog.getHelper().setWorkHistory(workHistoryWithExistingIssuer); Date today = new Date(); credentialDialog.getHelper().setStartDate(DateUtils.setMonths(today, Calendar.DECEMBER)); credentialDialog.getHelper().setEndDate(DateUtils.setMonths(today, Calendar.OCTOBER)); ExpectedValidationFailure expectedValidationFailure = new ExpectedValidationFailure( "error.end.date.before.start"); expectedValidationFailure.assertFailureOccurs(new FailingAction() { @Override// ww w . ja v a 2 s .c o m public void perform() { credentialDialog.clickSave(); } }); }
From source file:gov.nih.nci.firebird.selenium2.tests.profile.credentials.AbstractSpecialtyCredentialTest.java
private void checkForExpirationBeforeEffectiveDateError(final EditSpecialtyCredentialDialog credentialDialog) throws IOException { credentialDialog.getHelper().setCredential(getCredentialWithExistingIssuer()); Date today = new Date(); credentialDialog.getHelper().setStartDate(DateUtils.setMonths(today, Calendar.DECEMBER)); credentialDialog.getHelper().setEndDate(DateUtils.setMonths(today, Calendar.OCTOBER)); ExpectedValidationFailure expectedValidationFailure = new ExpectedValidationFailure( "error.end.date.before.start"); expectedValidationFailure.assertFailureOccurs(new FailingAction() { @Override/*from w w w. ja v a2 s . c o m*/ public void perform() { credentialDialog.clickSave(); } }); }