Package net.sbbi.upnp.services
Class ISO8601Date
java.lang.Object
net.sbbi.upnp.services.ISO8601Date
ISO8601 Date implementation taken from org.w3c package and modified
to work with UPNP date types
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getIsoDate
(Date date) Generate a ISO 8601 datestatic String
getIsoDateTime
(Date date) Generate a ISO 8601 date time without timezonestatic String
getIsoDateTimeZone
(Date date) Generate a ISO 8601 date time with timezonestatic String
getIsoTime
(Date date) Generate a ISO 8601 timestatic String
getIsoTimeZone
(Date date) Generate a ISO 8601 timestatic Date
Parse the given string in ISO 8601 format and build a Date object.
-
Constructor Details
-
ISO8601Date
public ISO8601Date()
-
-
Method Details
-
parse
Parse the given string in ISO 8601 format and build a Date object.- Parameters:
isodate
- the date in ISO 8601 format- Returns:
- a Date instance
- Throws:
NumberFormatException
- if the date is not valid
-
getIsoDate
Generate a ISO 8601 date- Parameters:
date
- a Date instance- Returns:
- a string representing the date in the ISO 8601 format
-
getIsoDateTime
Generate a ISO 8601 date time without timezone- Parameters:
date
- a Date instance- Returns:
- a string representing the date in the ISO 8601 format
-
getIsoDateTimeZone
Generate a ISO 8601 date time with timezone- Parameters:
date
- a Date instance- Returns:
- a string representing the date in the ISO 8601 format
-
getIsoTime
Generate a ISO 8601 time- Parameters:
date
- a Date instance- Returns:
- a string representing the date in the ISO 8601 format
-
getIsoTimeZone
Generate a ISO 8601 time- Parameters:
date
- a Date instance- Returns:
- a string representing the date in the ISO 8601 format
-