Java Code Examples for org.joda.time.format.ISODateTimeFormat#timeParser()

The following examples show how to use org.joda.time.format.ISODateTimeFormat#timeParser() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TimeOfDay.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructs a TimeOfDay from an Object that represents a time.
 * <p>
 * The recognised object types are defined in
 * {@link org.joda.time.convert.ConverterManager ConverterManager} and
 * include ReadableInstant, String, Calendar and Date.
 * The String formats are described by {@link ISODateTimeFormat#timeParser()}.
 * <p>
 * The chronology used will be derived from the object, defaulting to ISO.
 * <p>
 * NOTE: Prior to v1.3 the string format was described by
 * {@link ISODateTimeFormat#dateTimeParser()}. Dates are now rejected.
 *
 * @param instant  the datetime object, null means now
 * @throws IllegalArgumentException if the instant is invalid
 */
public TimeOfDay(Object instant) {
    super(instant, null, ISODateTimeFormat.timeParser());
}
 
Example 2
Source File: TimeOfDay.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructs a TimeOfDay from an Object that represents a time, using the
 * specified chronology.
 * <p>
 * The recognised object types are defined in
 * {@link org.joda.time.convert.ConverterManager ConverterManager} and
 * include ReadableInstant, String, Calendar and Date.
 * The String formats are described by {@link ISODateTimeFormat#timeParser()}.
 * <p>
 * The constructor uses the time zone of the chronology specified.
 * Once the constructor is complete, all further calculations are performed
 * without reference to a timezone (by switching to UTC).
 * The specified chronology overrides that of the object.
 * <p>
 * NOTE: Prior to v1.3 the string format was described by
 * {@link ISODateTimeFormat#dateTimeParser()}. Dates are now rejected.
 *
 * @param instant  the datetime object, null means now
 * @param chronology  the chronology, null means ISO default
 * @throws IllegalArgumentException if the instant is invalid
 */
public TimeOfDay(Object instant, Chronology chronology) {
    super(instant, DateTimeUtils.getChronology(chronology), ISODateTimeFormat.timeParser());
}
 
Example 3
Source File: TimeOfDay.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructs a TimeOfDay from an Object that represents a time.
 * <p>
 * The recognised object types are defined in
 * {@link org.joda.time.convert.ConverterManager ConverterManager} and
 * include ReadableInstant, String, Calendar and Date.
 * The String formats are described by {@link ISODateTimeFormat#timeParser()}.
 * <p>
 * The chronology used will be derived from the object, defaulting to ISO.
 * <p>
 * NOTE: Prior to v1.3 the string format was described by
 * {@link ISODateTimeFormat#dateTimeParser()}. Dates are now rejected.
 *
 * @param instant  the datetime object, null means now
 * @throws IllegalArgumentException if the instant is invalid
 */
public TimeOfDay(Object instant) {
    super(instant, null, ISODateTimeFormat.timeParser());
}
 
Example 4
Source File: TimeOfDay.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructs a TimeOfDay from an Object that represents a time, using the
 * specified chronology.
 * <p>
 * The recognised object types are defined in
 * {@link org.joda.time.convert.ConverterManager ConverterManager} and
 * include ReadableInstant, String, Calendar and Date.
 * The String formats are described by {@link ISODateTimeFormat#timeParser()}.
 * <p>
 * The constructor uses the time zone of the chronology specified.
 * Once the constructor is complete, all further calculations are performed
 * without reference to a timezone (by switching to UTC).
 * The specified chronology overrides that of the object.
 * <p>
 * NOTE: Prior to v1.3 the string format was described by
 * {@link ISODateTimeFormat#dateTimeParser()}. Dates are now rejected.
 *
 * @param instant  the datetime object, null means now
 * @param chronology  the chronology, null means ISO default
 * @throws IllegalArgumentException if the instant is invalid
 */
public TimeOfDay(Object instant, Chronology chronology) {
    super(instant, DateTimeUtils.getChronology(chronology), ISODateTimeFormat.timeParser());
}