List of usage examples for org.apache.commons.lang.time DateFormatUtils ISO_TIME_FORMAT
FastDateFormat ISO_TIME_FORMAT
To view the source code for org.apache.commons.lang.time DateFormatUtils ISO_TIME_FORMAT.
Click Source Link
From source file:org.eclipse.skalli.model.EntityBaseTest.java
@Test(expected = IllegalArgumentException.class) public void testInvalidLastModified() { long now = System.currentTimeMillis(); TestEntityBase entity = new TestEntityBase(); entity.setLastModified(DateFormatUtils.ISO_DATE_FORMAT.format(now)); entity.setLastModified(DateFormatUtils.ISO_DATE_TIME_ZONE_FORMAT.format(now)); entity.setLastModified(DateFormatUtils.ISO_TIME_FORMAT.format(now)); entity.setLastModified("foobar"); entity.setLastModified(Long.toString(now)); }
From source file:oscar.oscarEncounter.oscarConsultationRequest.pageUtil.EctViewConsultationRequestsUtil.java
public boolean estConsultationVecByTeam(String team, boolean showCompleted, Date startDate, Date endDate, String orderby, String desc, String searchDate) { ids = new Vector<String>(); status = new Vector<String>(); patient = new Vector<String>(); provider = new Vector<String>(); providerNo = new Vector(); teams = new Vector<String>(); service = new Vector<String>(); vSpecialist = new Vector<String>(); urgency = new Vector<String>(); date = new Vector<String>(); demographicNo = new Vector<String>(); siteName = new Vector<String>(); this.patientWillBook = new Vector<String>(); apptNo = new Vector<String>(); apptDate = new Vector<String>(); followUpDate = new Vector<String>(); boolean verdict = true; try {//www.j a va 2 s .c o m ConsultationRequestDao consultReqDao = (ConsultationRequestDao) SpringUtils .getBean("consultationRequestDao"); DemographicDao demoDao = (DemographicDao) SpringUtils.getBean("demographicDao"); ProviderDao providerDao = (ProviderDao) SpringUtils.getBean("providerDao"); ProfessionalSpecialistDao specialistDao = (ProfessionalSpecialistDao) SpringUtils .getBean("professionalSpecialistDao"); ConsultationServiceDao serviceDao = (ConsultationServiceDao) SpringUtils .getBean("consultationServiceDao"); ConsultationRequest consult; Demographic demo; Provider prov; ProfessionalSpecialist specialist; ConsultationServices services; Calendar cal = Calendar.getInstance(); Date date1, date2; String providerId, providerName, specialistName; List consultList = consultReqDao.getConsults(team, showCompleted, startDate, endDate, orderby, desc, searchDate); for (int idx = 0; idx < consultList.size(); ++idx) { consult = (ConsultationRequest) consultList.get(idx); demo = demoDao.getDemographicById(consult.getDemographicId()); services = serviceDao.find(consult.getServiceId()); providerId = demo.getProviderNo(); if (providerId != null && !providerId.equals("")) { prov = providerDao.getProvider(demo.getProviderNo()); providerName = prov.getFormattedName(); providerNo.add(prov.getProviderNo()); } else { providerName = "N/A"; providerNo.add("-1"); } if (consult.getProfessionalSpecialist() == null) { specialistName = "N/A"; } else { specialist = consult.getProfessionalSpecialist(); specialistName = specialist.getLastName() + ", " + specialist.getFirstName(); } demographicNo.add(consult.getDemographicId().toString()); date.add(DateFormatUtils.ISO_DATE_FORMAT.format(consult.getReferralDate())); ids.add(consult.getId().toString()); status.add(consult.getStatus()); patient.add(demo.getFormattedName()); provider.add(providerName); service.add(services.getServiceDesc()); vSpecialist.add(specialistName); urgency.add(consult.getUrgency()); siteName.add(consult.getSiteName()); teams.add(consult.getSendTo()); date1 = consult.getAppointmentDate(); date2 = consult.getAppointmentTime(); if (date1 == null || date2 == null) { cal.set(1970, 0, 1, 1, 0, 0); date1 = date2 = cal.getTime(); } apptDate.add(DateFormatUtils.ISO_DATE_FORMAT.format(date1) + " " + DateFormatUtils.ISO_TIME_FORMAT.format(date2)); patientWillBook.add("" + consult.isPatientWillBook()); date1 = consult.getFollowUpDate(); if (date1 == null) { followUpDate.add("N/A"); } else { followUpDate.add(DateFormatUtils.ISO_DATE_FORMAT.format(date1)); } } } catch (Exception e) { MiscUtils.getLogger().error("Error", e); verdict = false; } return verdict; }