org.simpleods
public class DateStyle extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DATEFORMAT_DDMMYY
Set the date format like '10.07.12'.
|
static int |
DATEFORMAT_DDMMYYYY
Set the date format like '10.07.2012'.
|
static int |
DATEFORMAT_MMMM
Set the date format like 'July'.
|
static int |
DATEFORMAT_MMYY
Set the date format like '07.12'.
|
static int |
DATEFORMAT_TMMMMYY
Set the date format like '10.July 2012'.
|
static int |
DATEFORMAT_WW
Set the date format to the weeknumber like '28'.
|
static int |
DATEFORMAT_YYYYMMDD
Set the date format like '2012-07-10'.
|
Constructor and Description |
---|
DateStyle(java.lang.String sName,
OdsFile odsFile)
Create a new date style with the name sName.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
boolean |
isAutomaticOrder() |
void |
setAutomaticOrder(boolean bAutomatic)
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. |
void |
setDateFormat(int nFormat)
Set the date format.
|
void |
setName(java.lang.String name)
Set the name of this style to sName.
|
java.lang.String |
toXML()
Write the XML format for this object.
|
public static final int DATEFORMAT_DDMMYYYY
public static final int DATEFORMAT_DDMMYY
public static final int DATEFORMAT_TMMMMYY
public static final int DATEFORMAT_MMMM
public static final int DATEFORMAT_MMYY
public static final int DATEFORMAT_WW
public static final int DATEFORMAT_YYYYMMDD
public DateStyle(java.lang.String sName, OdsFile odsFile)
sName
- The name of the number style.odsFile
- The odsFile to which this style belongs to.public java.lang.String getName()
public void setName(java.lang.String name)
name
- - The name of this style.public boolean isAutomaticOrder()
public void setAutomaticOrder(boolean bAutomatic)
bAutomatic
- public void setDateFormat(int nFormat)
nFormat
- The date format to be used.public java.lang.String toXML()