/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * This parses the text using the parser into this bucket. * The bucket is reset before parsing begins, allowing the bucket to be re-used. * The bucket must not be shared between threads. * * @param parser the parser to use, see {@link DateTimeFormatter#getParser()}, not null * @param text 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 * @since 2.4 */ public long parseMillis(DateTimeParser parser, CharSequence text) { reset(); return doParseMillis(DateTimeParserInternalParser.of(parser), text); }
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * This parses the text using the parser into this bucket. * The bucket is reset before parsing begins, allowing the bucket to be re-used. * The bucket must not be shared between threads. * * @param parser the parser to use, see {@link DateTimeFormatter#getParser()}, not null * @param text 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 * @since 2.4 */ public long parseMillis(DateTimeParser parser, CharSequence text) { reset(); return doParseMillis(DateTimeParserInternalParser.of(parser), text); }
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * This parses the text using the parser into this bucket. * The bucket is reset before parsing begins, allowing the bucket to be re-used. * The bucket must not be shared between threads. * * @param parser the parser to use, see {@link DateTimeFormatter#getParser()}, not null * @param text 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 * @since 2.4 */ public long parseMillis(DateTimeParser parser, CharSequence text) { reset(); return doParseMillis(DateTimeParserInternalParser.of(parser), text); }
/** * Parses a datetime from the given text, returning the number of * milliseconds since the epoch, 1970-01-01T00:00:00Z. * <p> * This parses the text using the parser into this bucket. * The bucket is reset before parsing begins, allowing the bucket to be re-used. * The bucket must not be shared between threads. * * @param parser the parser to use, see {@link DateTimeFormatter#getParser()}, not null * @param text 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 * @since 2.4 */ public long parseMillis(DateTimeParser parser, CharSequence text) { reset(); return doParseMillis(DateTimeParserInternalParser.of(parser), text); }