public static SimpleDateFormat getDateFormat(Map<String, String> properties) { return getDateFormat(properties.get(DATE_FORMAT_PROPERTY)); } public static SimpleDateFormat getDateFormat(String dfProperty) {
public static SimpleDateFormat getDateFormat(Map<String, String> properties) { return getDateFormat(properties.get(DATE_FORMAT_PROPERTY)); } public static SimpleDateFormat getDateFormat(String dfProperty) {
private Date convertToDefaultDate(String value) throws ParseException { DateFormat df = SearchUtils.getDateFormat(contextProperties); String dateValue = value; if (SearchUtils.isTimeZoneSupported(contextProperties, Boolean.FALSE)) { // zone in XML is "+01:00" in Java is "+0100"; stripping semicolon int idx = value.lastIndexOf(':'); if (idx != -1) { dateValue = value.substring(0, idx) + value.substring(idx + 1); } } return df.parse(dateValue); }
public Builder(Map<String, String> properties) { parent = null; df = SearchUtils.getDateFormat(properties); timeZoneSupported = SearchUtils.isTimeZoneSupported(properties, Boolean.FALSE); }
public Builder(Map<String, String> properties) { parent = null; df = SearchUtils.getDateFormat(properties); timeZoneSupported = SearchUtils.isTimeZoneSupported(properties, Boolean.FALSE); }
public Builder(Map<String, String> properties) { parent = null; df = SearchUtils.getDateFormat(properties); timeZoneSupported = SearchUtils.isTimeZoneSupported(properties, Boolean.FALSE); }
private Date convertToDefaultDate(String value) throws ParseException { DateFormat df = SearchUtils.getDateFormat(contextProperties); String dateValue = value; if (SearchUtils.isTimeZoneSupported(contextProperties, Boolean.FALSE)) { // zone in XML is "+01:00" in Java is "+0100"; stripping semicolon int idx = value.lastIndexOf(':'); if (idx != -1) { dateValue = value.substring(0, idx) + value.substring(idx + 1); } } return df.parse(dateValue); }
private Date convertToDefaultDate(String value) throws ParseException { DateFormat df = SearchUtils.getDateFormat(contextProperties); String dateValue = value; if (SearchUtils.isTimeZoneSupported(contextProperties, Boolean.FALSE)) { // zone in XML is "+01:00" in Java is "+0100"; stripping semicolon int idx = value.lastIndexOf(':'); if (idx != -1) { dateValue = value.substring(0, idx) + value.substring(idx + 1); } } return df.parse(dateValue); }
public static SimpleDateFormat getContextualDateFormat() { Message m = PhaseInterceptorChain.getCurrentMessage(); if (m != null) { return getDateFormat((String)m.getContextualProperty(DATE_FORMAT_PROPERTY)); } return null; }
public static SimpleDateFormat getContextualDateFormat() { Message m = PhaseInterceptorChain.getCurrentMessage(); if (m != null) { return getDateFormat((String)m.getContextualProperty(DATE_FORMAT_PROPERTY)); } return null; }