/** * Constructs an instance from an Object that represents a datetime, * forcing the time zone to that specified. * <p> * If the object contains no chronology, <code>ISOChronology</code> is used. * If the specified time zone is null, the default zone is used. * <p> * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. * * @param instant the datetime object * @param zone the time zone * @throws IllegalArgumentException if the instant is invalid */ public BaseDateTime(Object instant, DateTimeZone zone) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); Chronology chrono = checkChronology(converter.getChronology(instant, zone)); iChronology = chrono; iMillis = checkInstant(converter.getInstantMillis(instant, chrono), chrono); adjustForMinMax(); }
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
/** * Constructs an instance from an Object that represents a datetime, * using the specified chronology. * <p> * If the chronology is null, ISO in the default time zone is used. * <p> * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. * * @param instant the datetime object * @param chronology the chronology * @throws IllegalArgumentException if the instant is invalid */ public BaseDateTime(Object instant, Chronology chronology) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iChronology = checkChronology(converter.getChronology(instant, chronology)); iMillis = checkInstant(converter.getInstantMillis(instant, chronology), iChronology); adjustForMinMax(); }
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
/** * Constructs an instance from an Object that represents a datetime, * using the specified chronology. * <p> * If the chronology is null, ISO in the default time zone is used. * <p> * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. * * @param instant the datetime object * @param chronology the chronology * @throws IllegalArgumentException if the instant is invalid */ public BaseDateTime(Object instant, Chronology chronology) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iChronology = checkChronology(converter.getChronology(instant, chronology)); iMillis = checkInstant(converter.getInstantMillis(instant, chronology), iChronology); adjustForMinMax(); }
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
/** * Constructs an instance from an Object that represents a datetime, * forcing the time zone to that specified. * <p> * If the object contains no chronology, <code>ISOChronology</code> is used. * If the specified time zone is null, the default zone is used. * <p> * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. * * @param instant the datetime object * @param zone the time zone * @throws IllegalArgumentException if the instant is invalid */ public BaseDateTime(Object instant, DateTimeZone zone) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); Chronology chrono = checkChronology(converter.getChronology(instant, zone)); iChronology = chrono; iMillis = checkInstant(converter.getInstantMillis(instant, chrono), chrono); adjustForMinMax(); }
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
Chronology lhsChrono = conv.getChronology(lhsObj, (Chronology) null); long lhsMillis = conv.getInstantMillis(lhsObj, lhsChrono); Chronology rhsChrono = conv.getChronology(rhsObj, (Chronology) null); long rhsMillis = conv.getInstantMillis(rhsObj, rhsChrono);
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
Chronology lhsChrono = conv.getChronology(lhsObj, (Chronology) null); long lhsMillis = conv.getInstantMillis(lhsObj, lhsChrono); Chronology rhsChrono = conv.getChronology(rhsObj, (Chronology) null); long rhsMillis = conv.getInstantMillis(rhsObj, rhsChrono);
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
/** * Constructs an instance from an Object that represents a datetime, * using the specified chronology. * <p> * If the chronology is null, ISO in the default time zone is used. * <p> * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. * * @param instant the datetime object * @param chronology the chronology * @throws IllegalArgumentException if the instant is invalid */ public BaseDateTime(Object instant, Chronology chronology) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iChronology = checkChronology(converter.getChronology(instant, chronology)); iMillis = checkInstant(converter.getInstantMillis(instant, chronology), iChronology); }
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
/** * Constructs an instance from an Object that represents a datetime, * forcing the time zone to that specified. * <p> * If the object contains no chronology, <code>ISOChronology</code> is used. * If the specified time zone is null, the default zone is used. * <p> * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. * * @param instant the datetime object * @param zone the time zone * @throws IllegalArgumentException if the instant is invalid */ public BaseDateTime(Object instant, DateTimeZone zone) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); Chronology chrono = checkChronology(converter.getChronology(instant, zone)); iChronology = chrono; iMillis = checkInstant(converter.getInstantMillis(instant, chrono), chrono); }
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
Chronology lhsChrono = conv.getChronology(lhsObj, (Chronology) null); long lhsMillis = conv.getInstantMillis(lhsObj, lhsChrono); Chronology rhsChrono = conv.getChronology(rhsObj, (Chronology) null); long rhsMillis = conv.getInstantMillis(rhsObj, rhsChrono);
/** * Constructs an instance from an Object that represents a datetime. * <p> * The recognised object types are defined in {@link ConverterManager} and * include String, Calendar and Date. * * @param instant the datetime object, null means now * @throws IllegalArgumentException if the instant is invalid */ public Instant(Object instant) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC()); }
/** * Constructs an instance from an Object that represents a datetime, * forcing the time zone to that specified. * <p> * If the object contains no chronology, <code>ISOChronology</code> is used. * If the specified time zone is null, the default zone is used. * <p> * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. * * @param instant the datetime object * @param zone the time zone * @throws IllegalArgumentException if the instant is invalid */ public BaseDateTime(Object instant, DateTimeZone zone) { super(); InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant); Chronology chrono = checkChronology(converter.getChronology(instant, zone)); iChronology = chrono; iMillis = checkInstant(converter.getInstantMillis(instant, chrono), chrono); }