|
KosherJava Zmanim Homepage Includes a dynamic Zmanim calendar generator |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.zmanim.util.ZmanimFormatter
A class used to format non Date times generated by the
Zmanim package. For example the
AstronomicalCalendar.getTemporalHour() returns
the length of the hour in milliseconds. This class can format this time.
| Field Summary | |
static int |
DECIMAL_FORMAT
Format using standard decimal format with 5 positions after the decimal. |
static int |
SEXAGESIMAL_FORMAT
Format using hours and minutes. |
static int |
SEXAGESIMAL_MILLIS_FORMAT
Format using hours, minutes, seconds and milliseconds. |
static int |
SEXAGESIMAL_SECONDS_FORMAT
Format using hours, minutes and seconds. |
static int |
SEXAGESIMAL_XSD_FORMAT
Format using hours, minutes, seconds and milliseconds using the xsd:time format. |
(package private) boolean |
useDecimal
|
static int |
XSD_DURATION_FORMAT
Format using the XSD Duration format. |
| Constructor Summary | |
ZmanimFormatter()
|
|
ZmanimFormatter(int format,
SimpleDateFormat dateFormat)
ZmanimFormatter constructor using a formatter |
|
| Method Summary | |
String |
format(double milliseconds)
A method that formats milliseconds into a time format. |
String |
format(int millis)
A method that formats milliseconds into a time format. |
String |
format(Time time)
A method that formats Timeobjects. |
String |
formatDateTime(Date dateTime,
Calendar calendar)
Formats a date using this classe's date format. |
String |
formatXSDDurationTime(long millis)
This returns the xml representation of an xsd:duration object. |
String |
formatXSDDurationTime(Time time)
This returns the xml representation of an xsd:duration object. |
SimpleDateFormat |
getDateFormat()
|
String |
getXSDateTime(Date dateTime,
Calendar cal)
The date:date-time function returns the current date and time as a date/time string. |
void |
setDateFormat(SimpleDateFormat sdf)
|
void |
setTimeFormat(int format)
Sets the format to use for formatting. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
boolean useDecimal
public static final int SEXAGESIMAL_XSD_FORMAT
public static final int DECIMAL_FORMAT
public static final int SEXAGESIMAL_FORMAT
public static final int SEXAGESIMAL_SECONDS_FORMAT
public static final int SEXAGESIMAL_MILLIS_FORMAT
public static final int XSD_DURATION_FORMAT
| Constructor Detail |
public ZmanimFormatter()
public ZmanimFormatter(int format,
SimpleDateFormat dateFormat)
format - int The formatting style to use. Using
ZmanimFormatter.SEXAGESIMAL_SECONDS_FORMAT will format the
time time of 90*60*1000 + 1 as 1:30:00| Method Detail |
public void setTimeFormat(int format)
format - int the format constant to use.public void setDateFormat(SimpleDateFormat sdf)
public SimpleDateFormat getDateFormat()
public String format(double milliseconds)
milliseconds - The time in milliseconds.
Stringpublic String format(int millis)
millis - The time in milliseconds.
Stringpublic String format(Time time)
Timeobjects.
time - The time Object to be formatted.
String
public String formatDateTime(Date dateTime,
Calendar calendar)
date format.
dateTime - the date to formatcalendar - the Calendar used to help format
based on the Calendar's DST and other settings.
public String getXSDateTime(Date dateTime,
Calendar cal)
public String formatXSDDurationTime(long millis)
millis - the duration in milliseconds
public String formatXSDDurationTime(Time time)
time - the duration as a Time object
|
KosherJava Zmanim Homepage Includes a dynamic Zmanim calendar generator |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||