/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * The parse will use the ISO chronology, and the default time zone. * If the text contains a time zone string then that will be taken into account. * * @param text the text to parse, not null * @return parsed value expressed in milliseconds since the epoch * @throws UnsupportedOperationException if parsing is not supported * @throws IllegalArgumentException if the text to parse is invalid */ public long parseMillis(String text) { InternalParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear, iDefaultYear); return bucket.doParseMillis(parser, text); }
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * The parse will use the ISO chronology, and the default time zone. * If the text contains a time zone string then that will be taken into account. * * @param text the text to parse, not null * @return parsed value expressed in milliseconds since the epoch * @throws UnsupportedOperationException if parsing is not supported * @throws IllegalArgumentException if the text to parse is invalid */ public long parseMillis(String text) { InternalParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear, iDefaultYear); return bucket.doParseMillis(parser, text); }
InternalParser parser = requireParser();
InternalParser parser = requireParser();
InternalParser parser = requireParser();
InternalParser parser = requireParser();
InternalParser parser = requireParser();
InternalParser parser = requireParser();
InternalParser parser = requireParser(); if (instant == null) { throw new IllegalArgumentException("Instant must not be null");
InternalParser parser = requireParser(); if (instant == null) { throw new IllegalArgumentException("Instant must not be null");
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * The parse will use the ISO chronology, and the default time zone. * If the text contains a time zone string then that will be taken into account. * * @param text text to parse * @return parsed value expressed in milliseconds since the epoch * @throws UnsupportedOperationException if parsing is not supported * @throws IllegalArgumentException if the text to parse is invalid */ public long parseMillis(String text) { DateTimeParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear, iDefaultYear); int newPos = parser.parseInto(bucket, text, 0); if (newPos >= 0) { if (newPos >= text.length()) { return bucket.computeMillis(true, text); } } else { newPos = ~newPos; } throw new IllegalArgumentException(FormatUtils.createErrorMessage(text, newPos)); }
DateTimeParser parser = requireParser();
DateTimeParser parser = requireParser();
DateTimeParser parser = requireParser();
DateTimeParser parser = requireParser(); if (instant == null) { throw new IllegalArgumentException("Instant must not be null");
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * The parse will use the ISO chronology, and the default time zone. * If the text contains a time zone string then that will be taken into account. * * @param text the text to parse, not null * @return parsed value expressed in milliseconds since the epoch * @throws UnsupportedOperationException if parsing is not supported * @throws IllegalArgumentException if the text to parse is invalid */ public long parseMillis(String text) { InternalParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear, iDefaultYear); return bucket.doParseMillis(parser, text); }
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * The parse will use the ISO chronology, and the default time zone. * If the text contains a time zone string then that will be taken into account. * * @param text the text to parse, not null * @return parsed value expressed in milliseconds since the epoch * @throws UnsupportedOperationException if parsing is not supported * @throws IllegalArgumentException if the text to parse is invalid */ public long parseMillis(String text) { InternalParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear, iDefaultYear); return bucket.doParseMillis(parser, text); }
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * The parse will use the ISO chronology, and the default time zone. * If the text contains a time zone string then that will be taken into account. * * @param text text to parse * @return parsed value expressed in milliseconds since the epoch * @throws UnsupportedOperationException if parsing is not supported * @throws IllegalArgumentException if the text to parse is invalid */ public long parseMillis(String text) { DateTimeParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear, iDefaultYear); int newPos = parser.parseInto(bucket, text, 0); if (newPos >= 0) { if (newPos >= text.length()) { return bucket.computeMillis(true, text); } } else { newPos = ~newPos; } throw new IllegalArgumentException(FormatUtils.createErrorMessage(text, newPos)); }
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * The parse will use the ISO chronology, and the default time zone. * If the text contains a time zone string then that will be taken into account. * * @param text text to parse * @return parsed value expressed in milliseconds since the epoch * @throws UnsupportedOperationException if parsing is not supported * @throws IllegalArgumentException if the text to parse is invalid */ public long parseMillis(String text) { DateTimeParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear, iDefaultYear); int newPos = parser.parseInto(bucket, text, 0); if (newPos >= 0) { if (newPos >= text.length()) { return bucket.computeMillis(true, text); } } else { newPos = ~newPos; } throw new IllegalArgumentException(FormatUtils.createErrorMessage(text, newPos)); }
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * The parse will use the ISO chronology, and the default time zone. * If the text contains a time zone string then that will be taken into account. * * @param text text to parse * @return parsed value expressed in milliseconds since the epoch * @throws UnsupportedOperationException if parsing is not supported * @throws IllegalArgumentException if the text to parse is invalid */ public long parseMillis(String text) { DateTimeParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear); int newPos = parser.parseInto(bucket, text, 0); if (newPos >= 0) { if (newPos >= text.length()) { return bucket.computeMillis(true, text); } } else { newPos = ~newPos; } throw new IllegalArgumentException(FormatUtils.createErrorMessage(text, newPos)); }