public final class HttpDateFormat extends Object
Modifier and Type | Method and Description |
---|---|
static SimpleDateFormat |
getPreferredDateFormat()
Get the preferred HTTP specified date format (RFC 1123).
|
static Date |
readDate(String date)
Read a date.
|
public static SimpleDateFormat getPreferredDateFormat()
The date format is scoped to the current thread and may be used without requiring to synchronize access to the instance when parsing or formatting.
public static Date readDate(String date) throws ParseException
date
- the date as a string.ParseException
- in case the date string cannot be parsed.Copyright © 2007-2023, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.