public final class DateFormatter extends Object
Modifier and Type | Method and Description |
---|---|
static StringBuilder |
append(Date date,
StringBuilder sb)
Append a
Date to a StringBuilder into RFC1123 format |
static String |
format(Date date)
Format a
Date into RFC1123 format |
static Date |
parseHttpDate(CharSequence txt)
Parse some text into a
Date , according to RFC6265 |
static Date |
parseHttpDate(CharSequence txt,
int start,
int end)
Parse some text into a
Date , according to RFC6265 |
void |
reset() |
public static Date parseHttpDate(CharSequence txt)
Date
, according to RFC6265txt
- text to parseDate
, or null if text couldn't be parsedpublic static Date parseHttpDate(CharSequence txt, int start, int end)
Date
, according to RFC6265txt
- text to parsestart
- the start index inside txt
end
- the end index inside txt
Date
, or null if text couldn't be parsedpublic static String format(Date date)
Date
into RFC1123 formatdate
- the date to formatpublic static StringBuilder append(Date date, StringBuilder sb)
Date
to a StringBuilder
into RFC1123 formatdate
- the date to formatsb
- the StringBuilderpublic void reset()
Copyright © 2008–2019 The Netty Project. All rights reserved.