public class FormatType extends java.lang.Object implements ArooaValue, java.io.Serializable
Form more information on the number format see DecimalFormat
For more information on the date format see SimpleDateFormat
<oddjob> <job> <sequential> <jobs> <variables id="vars"> <businessDate> <format format="yyyyMMdd" date="2005-12-25"/> </businessDate> <sequence> <format format="000000" number="123"/> </sequence> </variables> <exists id="file-check" file="Data-${vars.businessDate}-${vars.sequence}.dat"/> </jobs> </sequential> </job> </oddjob>
<oddjob> <job> <sequential> <jobs> <properties> <values> <date date="NOW" key="date-time.now"> <clock> <value value="${our-clock}"/> </clock> </date> <format date="${date-time.now}" format="h:mm a" key="time.now.formatted"/> </values> </properties> <echo>The time is ${time.now.formatted}.</echo> </jobs> </sequential> </job> </oddjob>Note that the
our-clock
reference is provided for the tests
but when not provided (if this is run as is) the current time is used.
An example of the output is:
The time is 8:17 AM.
Modifier and Type | Class and Description |
---|---|
static class |
FormatType.Conversions |
Constructor and Description |
---|
FormatType() |
Modifier and Type | Method and Description |
---|---|
void |
setDate(java.util.Date date) |
void |
setFormat(java.lang.String format) |
void |
setNumber(java.lang.Number number) |
void |
setTimeZone(java.lang.String timeZoneId) |
java.lang.String |
toString() |
public void setDate(java.util.Date date)
public void setFormat(java.lang.String format)
public void setTimeZone(java.lang.String timeZoneId)
public void setNumber(java.lang.Number number)
public java.lang.String toString()
toString
in class java.lang.Object