/** * Constructs a new period with the specied start and end date. * * @param start * the start date of the period * @param end * the end date of the period */ public Period(final DateTime start, final DateTime end) { super(start, end); normalise(); }
/** * Constructs a new period with the specied start and end date. * * @param start * the start date of the period * @param end * the end date of the period */ public Period(final DateTime start, final DateTime end) { super(start, end); normalise(); }
/** * Constructs a new period with the specied start and end date. * * @param start * the start date of the period * @param end * the end date of the period */ public Period(final DateTime start, final DateTime end) { super(start, end); normalise(); }
/** * Constructs a new period with the specied start and end date. * * @param start * the start date of the period * @param end * the end date of the period */ public Period(final DateTime start, final DateTime end) { super(start, end); normalise(); }
/** * Constructs a new period with the specied start and end date. * * @param start * the start date of the period * @param end * the end date of the period */ public Period(final DateTime start, final DateTime end) { super(start, end); normalise(); }
/** * Constructs a new period with the specified start date and duration. * * @param start * the start date of the period * @param duration * the duration of the period */ public Period(final DateTime start, final TemporalAmount duration) { super(start, new DateTime(Date.from(start.toInstant().plus(duration)))); this.duration = new TemporalAmountAdapter(duration); normalise(); }
/** * Constructs a new period with the specified start date and duration. * * @param start * the start date of the period * @param duration * the duration of the period */ public Period(final DateTime start, final Dur duration) { super(start, new DateTime(duration.getTime(start))); this.duration = duration; normalise(); }
/** * Constructs a new period with the specified start date and duration. * * @param start * the start date of the period * @param duration * the duration of the period */ public Period(final DateTime start, final Dur duration) { super(start, new DateTime(duration.getTime(start))); this.duration = duration; normalise(); }
/** * Constructs a new period with the specified start date and duration. * * @param start * the start date of the period * @param duration * the duration of the period */ public Period(final DateTime start, final Dur duration) { super(start, new DateTime(duration.getTime(start))); this.duration = duration; normalise(); }
/** * Constructs a new period with the specified start date and duration. * * @param start * the start date of the period * @param duration * the duration of the period */ public Period(final DateTime start, final TemporalAmount duration) { super(start, new DateTime(Date.from(start.toInstant().plus(duration)))); this.duration = new TemporalAmountAdapter(duration); 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(); }
/** * 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(); }