/** * Constructor. * * @param aValue * a string representation of a period * @throws ParseException * where the specified string is not a valid representation */ public Period(final String aValue) throws ParseException { super(parseStartDate(aValue), parseEndDate(aValue, true)); // period may end in either a date-time or a duration.. try { parseEndDate(aValue, false); } catch (ParseException pe) { // duration = DurationFormat.getInstance().parse(aValue); duration = parseDuration(aValue); } normalise(); }
/** * Constructor. * * @param aValue * a string representation of a period * @throws ParseException * where the specified string is not a valid representation */ public Period(final String aValue) throws ParseException { super(parseStartDate(aValue), parseEndDate(aValue, true)); // period may end in either a date-time or a duration.. try { parseEndDate(aValue, false); } catch (ParseException pe) { // duration = DurationFormat.getInstance().parse(aValue); duration = parseDuration(aValue); } normalise(); }
/** * Constructor. * * @param aValue * a string representation of a period * @throws ParseException * where the specified string is not a valid representation */ public Period(final String aValue) throws ParseException { super(parseStartDate(aValue), parseEndDate(aValue, true)); // period may end in either a date-time or a duration.. try { parseEndDate(aValue, false); } catch (ParseException pe) { // duration = DurationFormat.getInstance().parse(aValue); duration = parseDuration(aValue); } normalise(); }
/** * Constructor. * * @param aValue * a string representation of a period * @throws ParseException * where the specified string is not a valid representation */ public Period(final String aValue) throws ParseException { super(parseStartDate(aValue), parseEndDate(aValue, true)); // period may end in either a date-time or a duration.. try { parseEndDate(aValue, false); } catch (ParseException pe) { // duration = DurationFormat.getInstance().parse(aValue); duration = parseDuration(aValue); } normalise(); }
/** * Constructor. * * @param aValue * a string representation of a period * @throws ParseException * where the specified string is not a valid representation */ public Period(final String aValue) throws ParseException { super(parseStartDate(aValue), parseEndDate(aValue, true)); // period may end in either a date-time or a duration.. try { parseEndDate(aValue, false); } catch (ParseException pe) { // duration = DurationFormat.getInstance().parse(aValue); duration = parseDuration(aValue); } normalise(); }