parseDeltas(result); applyModifiers(result); return new DateSelection(result, input);
try { AdvancedDateParser parser = new AdvancedDateParser(lang); return (V) LocalDate.from(parser.parse(value).getTemporal()); } catch (ParseException e) { throw new IllegalArgumentException(e.getMessage(), e); try { AdvancedDateParser parser = new AdvancedDateParser(lang); return (V) LocalDateTime.from(parser.parse(value).getTemporal()); } catch (ParseException e) { throw new IllegalArgumentException(e.getMessage(), e); try { AdvancedDateParser parser = new AdvancedDateParser(lang); return (V) ZonedDateTime.from(parser.parse(value).getTemporal()); } catch (ParseException e) { throw new IllegalArgumentException(e.getMessage(), e);
@Override public String toString() { return asDateString(); }
/** * Returns a string representation of this <tt>DateSelection</tt> without any information about the time * of day for the parsed date. * * @return the input string used to create this <tt>DateSelection</tt> appended with the effective * date surrounded by angular brackets */ public String asDateString() { if (dateString == null) { return getDateString(false); } return dateString + " [" + getDateString(false) + "]"; }
/** * Returns the effective date as string * * @return the effective date formatted as string with time information */ public String getDateTime() { return getDateString(true); } }
/** * Returns a string representation of this <tt>DateSelection</tt> including the time information. * * @return the input string used to create this <tt>DateSelection</tt> appended with the effective * date surrounded by angular brackets */ public String asDateTimeString() { if (dateString == null) { return getDateString(true); } return dateString + " [" + getDateString(true) + "]"; }
/** * Returns the effective date as string * * @return the effective date formatted as string without any time information */ public String getDate() { return getDateString(false); }