1 package org.kuali.ole.docstore.engine.service;
2
3 import org.kuali.rice.core.api.CoreApiServiceLocator;
4 import org.kuali.rice.core.impl.datetime.DateTimeServiceImpl;
5
6 import java.text.ParseException;
7 import java.util.Arrays;
8 import java.util.Date;
9 import java.util.List;
10
11
12
13
14 public class DocstoreDateTimeUtil extends DateTimeServiceImpl {
15
16 @Override
17 public Date convertToDate(String dateString) throws ParseException {
18 String[]strings = new String[6];
19 strings[0] = "MM/dd/yyyy hh:mm:ssa";
20 strings[1] = "MM/dd/yyyy hh:mm:ss a";
21 strings[2] = "MM/dd/yyyy hh:mm:ss";
22 strings[3] = "MM/dd/yyyy HH:mm:ss";
23 strings[4] = CoreApiServiceLocator.getKualiConfigurationService().getPropertyValueAsString("info.DateFormat")+"hh:mm:ss";
24 strings[5] = CoreApiServiceLocator.getKualiConfigurationService().getPropertyValueAsString("info.DateFormat")+"HH:mm:ss";
25 return parseAgainstFormatArray(dateString, strings);
26 }
27 }