public class DateStyle extends Object implements DataStyle
To create a custom `DateStyle`, first create a new `DateStyleFormat` and pass it to a `DateStyleBuilder`:
DateStyleFormat f = new DateStyleFormat(DateStyleFormat.text("Month of "),
DateStyleFormat.LONG_TEXTUAL_MONTH);
DateStyle s = DateStyleBuilder("my style", Locale.US).dateFormat(f).build();
... // use the style
Note that the bricks from `TimeStyleFormat` are allowed too:
DateStyleFormat f = new DateStyleFormat(TimeStyleFormat.MINUTES);
DateStyle s = DateStyleBuilder("my style", Locale.US).dateFormat(f).build();
... // use the style
| Modifier and Type | Class and Description |
|---|---|
static class |
DateStyle.Format
The format of the date
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToElements(OdsElements odsElements)
Add this to OdsElements
|
void |
appendXMLContent(XMLUtil util,
Appendable appendable)
Write the XML format for this object.
|
String |
getName()
Get the name of this object.
|
boolean |
isHidden() |
public void appendXMLContent(XMLUtil util, Appendable appendable) throws IOException
XMLConvertibleappendXMLContent in interface XMLConvertibleutil - a helper objectappendable - the appendable to append data toIOException - if the style can't be addedpublic String getName()
NamedObjectgetName in interface NamedObjectpublic boolean isHidden()
public void addToElements(OdsElements odsElements)
AddableToOdsElementsaddToElements in interface AddableToOdsElementsodsElements - the OdsElements instance where to add this.Copyright © 2016–2021. All rights reserved.