public class DateStyleBuilder extends Object implements DataStyleBuilder<DateStyle,DateStyleBuilder>
| Constructor and Description |
|---|
DateStyleBuilder(String name,
Locale locale)
Create a new date style with the name
|
| Modifier and Type | Method and Description |
|---|---|
DateStyleBuilder |
automaticOrder(boolean automatic)
The automatic-order attribute can be used to automatically order data to
match the default order
for the language and country of the date style. |
DateStyle |
build() |
DateStyleBuilder |
country(String countryCode)
Set the country code
|
DateStyleBuilder |
dateFormat(DateTimeStyleFormat format)
Set the date format.
|
DateStyleBuilder |
formatSource(FormatSource formatSource) |
DateStyleBuilder |
language(String languageCode)
Set the language code
|
DateStyleBuilder |
locale(Locale locale)
Set the locale
|
DateStyleBuilder |
visible()
Make this style visible, ie part of common styles
|
DateStyleBuilder |
volatileStyle(boolean volatileStyle)
19.517 style:volatile
"The style:volatile attribute specifies whether unused style in a document are retained or
discarded by consumers."
|
public DateStyleBuilder automaticOrder(boolean automatic)
automatic - specifies whether data is ordered to match the default
order for the language and country of a data style (19.340
number:automatic-order).public DateStyleBuilder formatSource(FormatSource formatSource)
formatSource - the new number:format-sourcepublic DateStyle build()
build in interface StyleBuilder<DateStyle>public DateStyleBuilder dateFormat(DateTimeStyleFormat format)
format - The date format to be used.public DateStyleBuilder country(String countryCode)
LocalizedBuildercountry in interface LocalizedBuilder<DateStyleBuilder>countryCode - The two letter country code, e.g. 'US'public DateStyleBuilder language(String languageCode)
LocalizedBuilderlanguage in interface LocalizedBuilder<DateStyleBuilder>languageCode - The two letter language code, e.g. 'en'. See http://www.ietf
.org/rfc/rfc3066.txtpublic DateStyleBuilder locale(Locale locale)
LocalizedBuilderlocale in interface LocalizedBuilder<DateStyleBuilder>locale - the localepublic DateStyleBuilder volatileStyle(boolean volatileStyle)
IsVolatileBuildervolatileStyle in interface IsVolatileBuilder<DateStyleBuilder>volatileStyle - true if "consumers should keep unused styles", false otherwise.public DateStyleBuilder visible()
ShowableBuildervisible in interface ShowableBuilder<DateStyleBuilder>Copyright © 2016–2021. All rights reserved.