Package org.ametys.runtime.i18n
Class I18nizableDateTime
java.lang.Object
org.ametys.runtime.i18n.I18nizableDateTime
- All Implemented Interfaces:
FormatableI18nizable,I18nizable,I18nizableTextParameter
public class I18nizableDateTime
extends Object
implements FormatableI18nizable, I18nizableTextParameter
Allow to use
ZonedDateTime as a parameter for I18nizableText.-
Constructor Summary
ConstructorsConstructorDescriptionI18nizableDateTime(ZonedDateTime dateTime, ZoneId zoneId, String pattern) Build anI18nizableDateTimefromZonedDateTimeand pattern.I18nizableDateTime(ZonedDateTime dateTime, ZoneId zoneId, FormatStyle style) Build anI18nizableDateTimefromZonedDateTimeand style. -
Method Summary
Modifier and TypeMethodDescriptionOutputs a localized String representation.voidtoSAX(ContentHandler handler) Represents thisI18nizableas SAX events.voidtoSAXAsParam(ContentHandler handler) Represents thisI18nizableTextParameteras SAX events for anI18nizableTextparameter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.i18n.I18nizable
toSAX
-
Constructor Details
-
I18nizableDateTime
Build anI18nizableDateTimefromZonedDateTimeand style.- Parameters:
dateTime- the valuezoneId- the time zone to use for formattingstyle- the style to use for formatting
-
I18nizableDateTime
Build anI18nizableDateTimefromZonedDateTimeand pattern.- Parameters:
dateTime- the valuezoneId- the time zone to use for formattingpattern- the pattern to use for formatting
-
-
Method Details
-
toSAX
Description copied from interface:I18nizableRepresents thisI18nizableas SAX events.- Specified by:
toSAXin interfaceI18nizable- Parameters:
handler- the SAX content handler- Throws:
SAXException- if an error occurs
-
toSAXAsParam
Description copied from interface:I18nizableTextParameterRepresents thisI18nizableTextParameteras SAX events for anI18nizableTextparameter.- Specified by:
toSAXAsParamin interfaceI18nizableTextParameter- Parameters:
handler- the SAX content handler- Throws:
SAXException- if an error occurs
-
format
Description copied from interface:FormatableI18nizableOutputs a localized String representation.- Specified by:
formatin interfaceFormatableI18nizable- Parameters:
locale- theLocaleto use.- Returns:
- a localized String.
-