net.sf.saxon.number
public class Numberer_en extends Object implements Numberer, Serializable
Field Summary | |
---|---|
protected static String | cyrillicLower |
protected static String | cyrillicUpper |
protected static String | greekLower |
protected static String | greekUpper |
protected static String | hebrew |
protected static String | hiraganaA |
protected static String | hiraganaI |
protected static String | kanjiDigits |
protected static String | katakanaA |
protected static String | katakanaI |
protected static String | latinLower |
protected static String | latinUpper |
static int | LOWER_CASE |
static HashMap | timezones |
static int | TITLE_CASE |
static int | UPPER_CASE |
protected static String | westernDigits |
Method Summary | |
---|---|
protected void | alphaDefault(long number, char formchar, FastStringBuffer sb)
Default processing with an alphabetic format token: use the contiguous
range of Unicode letters starting with that token. |
String | dayName(int day, int minWidth, int maxWidth)
Get a day name or abbreviation |
String | format(long number, String picture, int groupSize, String groupSeparator, String letterValue, String ordinal)
Format a number into a string |
String | getEraName(int year)
Get the name for an era (e.g. |
String | getOrdinalSuffixForDateTime(String component)
Get an ordinal suffix for a particular component of a date/time.
|
String | getTimezoneName(int tz)
Get the name of a timezone
|
String | halfDayName(int minutes, int minWidth, int maxWidth)
Get an am/pm indicator |
String | monthName(int month, int minWidth, int maxWidth)
Get a month name or abbreviation |
protected String | ordinalSuffix(String ordinalParam, long number)
Construct the ordinal suffix for a number, for example "st", "nd", "rd" |
void | setCountry(String country)
Set the country used by this numberer (currenly used only for names of timezones) |
protected String | toAlpha(long number, int min, int max)
Format the number as an alphabetic label using the alphabet consisting
of consecutive Unicode characters from min to max |
protected String | toAlphaSequence(long number, String alphabet)
Convert the number into an alphabetic label using a given alphabet.
|
String | toOrdinalWords(String ordinalParam, long number, int wordCase)
Show an ordinal number as English words in a requested case (for example, Twentyfirst) |
static String | toRoman(long n)
Generate a Roman numeral (in lower case) |
String | toWords(long number)
Show the number as words in title case. |
String | toWords(long number, int wordCase) |
static void | tz(double offset, String name, String country) |
Parameters: day The day of the week (1=Monday, 7=Sunday) minWidth The minimum number of characters maxWidth The maximum number of characters
Parameters: number The number to be formatted picture The format token. This is a single component of the format attribute of xsl:number, e.g. "1", "01", "i", or "a" groupSize number of digits per group (0 implies no grouping) groupSeparator string to appear between groups of digits letterValue The letter-value specified to xsl:number: "alphabetic" or "traditional". Can also be an empty string or null. ordinal The value of the ordinal attribute specified to xsl:number The value "yes" indicates that ordinal numbers should be used; "" or null indicates that cardinal numbers
Returns: the formatted number. Note that no errors are reported; if the request is invalid, the number is formatted as if the string() function were used.
Parameters: year the proleptic gregorian year, using "0" for the year before 1AD
Parameters: component the component specifier from a format-dateTime picture, for example "M" for the month or "D" for the day.
Returns: a string that is acceptable in the ordinal attribute of xsl:number to achieve the required ordinal representation. For example, "-e" for the day component in German, to have the day represented as "dritte August".
Parameters: tz the offset of the timezone from GMT in minutes
Parameters: minutes the minutes within the day minWidth minimum width of output maxWidth maximum width of output
Returns: the AM or PM indicator
Parameters: month The month number (1=January, 12=December) minWidth The minimum number of characters maxWidth The maximum number of characters
Parameters: ordinalParam the value of the ordinal attribute (used in non-English language implementations) number the number being formatted
Returns: the ordinal suffix to be appended to the formatted number