Package io.zerocopy.json.schema.format
Interface DateTimeConverter
-
- All Known Implementing Classes:
AbstractDateTimeConverter,RFC3339Converter
public interface DateTimeConverter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidformat(java.lang.Appendable out, java.util.Date date)Prints a date in UTCvoidformat(java.lang.Appendable out, java.util.Date date, int offset)Prints a date with a specified offsetvoidformat(java.lang.Appendable out, java.util.Date date, java.util.TimeZone timeZone)Prints a date in the specified time zonejava.lang.Stringformat(java.util.Date date)java.lang.Stringformat(java.util.Date date, int offset)java.lang.Stringformat(java.util.Date date, java.util.TimeZone timeZone)java.util.Dateparse(java.lang.String source)
-
-
-
Method Detail
-
parse
java.util.Date parse(java.lang.String source)
-
format
java.lang.String format(java.util.Date date)
- Parameters:
date- the date to print- Returns:
- string representation of the date in UTC
-
format
java.lang.String format(java.util.Date date, java.util.TimeZone timeZone)- Parameters:
date- the date to printtimeZone- the timezone in which the date shall be printed- Returns:
- string representation of the date in the specified tine zone
-
format
java.lang.String format(java.util.Date date, int offset)- Parameters:
date- the date to printoffset- the timezone offset in [ms], with which the date shall be printed. Must be a multiple of 60000- Returns:
- string representation of the date with the specified offset
-
format
void format(java.lang.Appendable out, java.util.Date date) throws java.io.IOExceptionPrints a date in UTC- Parameters:
out- print destinationdate- the date to print- Throws:
java.io.IOException- when a print operation fails
-
format
void format(java.lang.Appendable out, java.util.Date date, java.util.TimeZone timeZone) throws java.io.IOExceptionPrints a date in the specified time zone- Parameters:
out- print destinationdate- the date to printtimeZone- the timezone in which the date shall be printed- Throws:
java.io.IOException- when a print operation fails
-
format
void format(java.lang.Appendable out, java.util.Date date, int offset) throws java.io.IOExceptionPrints a date with a specified offset- Parameters:
out- print destinationdate- the date to printoffset- the timezone offset in [ms], with which the date shall be printed. Must be a multiple of 60000- Throws:
java.io.IOException- when a print operation fails
-
-