public class LocaleInfo extends Object
Modifier and Type | Field and Description |
---|---|
static String |
clockAM
The AM clock string (or null for 24 hour clock).
|
static String |
clockPM
The PM clock string (or null for 24 hour clock).
|
static char |
clockSeparator
The separator character between hours-minutes-seconds (default '.').
|
static Collator |
collator
The collator used for sorting.
|
static byte |
dateFormat
The date current format.
|
static char |
dateSeparator
The date separator character (default '-').
|
static char |
decimalSeparator
The decimal separator character (default '.').
|
static char |
listSeparator
The list separator character for numbers (default ';').
|
static String |
sortRule
The rule for sorting.
|
static char |
thousandSeparator
The thousand separator character (or zero if not used).
|
Constructor and Description |
---|
LocaleInfo() |
Modifier and Type | Method and Description |
---|---|
static String |
getDate()
Gets the current date string.
|
static String |
getDate(Date date)
Gets the date string.
|
static String |
getDateDayMonth()
Gets the current day and month for the date (MM,DD or DD,MM).
|
static String |
getDateDayMonth(Date date)
Gets the day and month for the date (MM,DD or DD,MM).
|
static int |
getDay(Date date)
Gets the day (1-31).
|
static int |
getMonth(Date date)
Gets the month (1-12).
|
static String |
getShortDate()
Gets the current short day and month for the date (date is two digits).
|
static String |
getShortDate(Date date)
Gets the short day and month for the date (date is two digits).
|
static String |
getTime()
Gets the current time.
|
static String |
getTime(Date date)
Gets the time.
|
static String |
getTimeHourMinute()
Gets the current time as hour,minute.
|
static String |
getTimeHourMinute(Date date)
Gets the time as hour,minute.
|
static int |
getYear(Date date)
Gets the year.
|
static void |
initiate(Transaction trans)
Initiates the settings from a transaction.
|
static boolean |
is12HourClock()
Checks if the clock is represented with a 12 hour
clock rather than a 24 hour one.
|
static void |
setCollator()
Loads the collator instance to use for sorting.
|
public static char listSeparator
public static char thousandSeparator
public static char decimalSeparator
public static String clockAM
public static String clockPM
public static char clockSeparator
public static byte dateFormat
The values are:
0 - Month,Day,Year
1 - Day,Month,Year
2 - Year,Month,Day
public static char dateSeparator
public static String sortRule
public static Collator collator
public static void initiate(Transaction trans)
public static String getDateDayMonth()
public static String getDateDayMonth(Date date)
public static String getShortDate()
public static String getShortDate(Date date)
public static String getDate()
public static boolean is12HourClock()
public static String getTime()
public static String getTimeHourMinute()
public static int getYear(Date date)
public static int getMonth(Date date)
public static int getDay(Date date)
public static void setCollator()
If no sorting rule was specified, or if the creation of the RuleBasedCollator failed (because of error in rule string), a default collator based US locale will be used. No other locale will be used, due to a bug in JDK 1.1 and 1.2, e.g. because Swedish collator has wrong ordering, sort order bug (A and a after Z and z)!
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.