/**
* Returns the first millisecond of the week. This will be determined
* relative to the time zone specified in the constructor, or in the
* calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The first millisecond of the week.
*
* @see #getLastMillisecond()
*/
/**
* Returns the first millisecond of the month. This will be determined
* relative to the time zone specified in the constructor, or in the
* calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The first millisecond of the month.
*
* @see #getLastMillisecond()
*/
/**
* Returns the first millisecond of the minute. This will be determined
* relative to the time zone specified in the constructor, or in the
* calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The first millisecond of the minute.
*
* @see #getLastMillisecond()
*/
/**
* Returns the first millisecond of the hour. This will be determined
* relative to the time zone specified in the constructor, or in the
* calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The first millisecond of the hour.
*
* @see #getLastMillisecond()
*/
/**
* Returns the first millisecond of the quarter. This will be determined
* relative to the time zone specified in the constructor, or in the
* calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The first millisecond of the quarter.
*
* @see #getLastMillisecond()
*/
/**
* Returns the first millisecond of the day. This will be determined
* relative to the time zone specified in the constructor, or in the
* calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The first millisecond of the day.
*
* @see #getLastMillisecond()
*/
/**
* Returns the first millisecond of the year. This will be determined
* relative to the time zone specified in the constructor, or in the
* calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The first millisecond of the year.
*
* @see #getLastMillisecond()
*/
public long getFirstMillisecond() {
return this.firstMillisecond;
}
/**
* Returns the last millisecond of the week. This will be
* determined relative to the time zone specified in the constructor, or
* in the calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The last millisecond of the week.
*
* @see #getFirstMillisecond()
*/
/**
* Returns the last millisecond of the month. This will be
* determined relative to the time zone specified in the constructor, or
* in the calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The last millisecond of the month.
*
* @see #getFirstMillisecond()
*/
/**
* Returns the last millisecond of the minute. This will be
* determined relative to the time zone specified in the constructor, or
* in the calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The last millisecond of the minute.
*
* @see #getFirstMillisecond()
*/
/**
* Returns the last millisecond of the hour. This will be
* determined relative to the time zone specified in the constructor, or
* in the calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The last millisecond of the hour.
*
* @see #getFirstMillisecond()
*/
/**
* Returns the last millisecond of the quarter. This will be
* determined relative to the time zone specified in the constructor, or
* in the calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The last millisecond of the quarter.
*
* @see #getFirstMillisecond()
*/
/**
* Returns the last millisecond of the day. This will be
* determined relative to the time zone specified in the constructor, or
* in the calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The last millisecond of the day.
*
* @see #getFirstMillisecond()
*/
/**
* Returns the last millisecond of the year. This will be
* determined relative to the time zone specified in the constructor, or
* in the calendar instance passed in the most recent call to the
* {@link #peg(Calendar)} method.
*
* @return The last millisecond of the year.
*
* @see #getFirstMillisecond()
*/
public long getLastMillisecond() {
return this.lastMillisecond;
}
/**
* Recalculates the start date/time and end date/time for this time period
* relative to the supplied calendar (which incorporates a time zone).
*
* @param calendar the calendar (<code>null</code> not permitted).
*
* @since 1.0.3
*/
public void peg(Calendar calendar) {
this.firstMillisecond = getFirstMillisecond(calendar);
this.lastMillisecond = getLastMillisecond(calendar);
}
|