|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectswisseph.Extlib
public class Extlib
Some supportive methods, mainly for internationalization. These methods are not available in the original Swiss Ephemeris package.
| Constructor Summary | |
|---|---|
Extlib()
This class contains some additional method not contained in the original Swiss Ephemeris package. |
|
| Method Summary | |
|---|---|
java.text.SimpleDateFormat |
createLocDateTimeFormatter(java.lang.String locString,
boolean force24h)
Creates a localized date time formatter suitable for tabular output with 4 digit years and UTC timezone. |
java.lang.String |
getDecimalSeparator(java.text.NumberFormat nf)
Returns the decimal separator of the NumberFormat |
java.util.Locale |
getLocale(java.lang.String locString)
Returns the requested locale from a locale string. |
java.lang.String[] |
getLocales()
This method returns all available locale strings |
java.lang.String |
getNormalizedDatePattern(java.lang.String pattern,
boolean force24h)
Ensures a date pattern with four letter year, two letter month and day and 24h time format, if requested. |
int |
getPatternLastIdx(java.lang.String pattern,
java.lang.String what,
java.text.SimpleDateFormat dof)
Returns the index in the formatter pattern of the given pattern 'what' recalculated to the APPLIED pattern of the formatter. |
static void |
main(java.lang.String[] argv)
This method is for debugging purposes only. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Extlib()
| Method Detail |
|---|
public static void main(java.lang.String[] argv)
public java.lang.String[] getLocales()
public java.util.Locale getLocale(java.lang.String locString)
locString - A String describing the locale as a two letter
language code, a two letter language code plus a "_" plus a two
letter country code, or null or the empty string. Null or the
empty string will return the default locale, all others will
return the requested locale.
public java.text.SimpleDateFormat createLocDateTimeFormatter(java.lang.String locString,
boolean force24h)
SimpleDateFormat sdf = createLocDateTimeFormatter("da_DK", true);
SweDate sd = new SweDate(2005,3,27);
//...
System.out.println(sdf.format(sd.getDate(0)));
Years B.C. will be prefixed by a "-". Years are counted including year "0", which differs from normal DateFormat output.
locString - The input locale for which this date time format
should be created. See getLocale() for more infos.
public java.lang.String getNormalizedDatePattern(java.lang.String pattern,
boolean force24h)
public java.lang.String getDecimalSeparator(java.text.NumberFormat nf)
public int getPatternLastIdx(java.lang.String pattern,
java.lang.String what,
java.text.SimpleDateFormat dof)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||