| net.sf.saxon.number.Numberer
All known Subclasses: net.sf.saxon.number.Numberer_en,
Numberer | public interface Numberer (Code) | | Interface Numberer supports number formatting. There is a separate
implementation for each language, e.g. Numberer_en for English.
This supports the xsl:number element
author: Michael H. Kay |
Method Summary | |
public String | dayName(int day, int minWidth, int maxWidth) | public String | format(long number, String picture, int groupSize, String groupSeparator, String letterValue, String ordinal) Format a number into a string
Parameters: number - The number to be formatted Parameters: picture - The format token. | public String | getEraName(int year) Get the name for an era (e.g. | public String | getOrdinalSuffixForDateTime(String component) Get an ordinal suffix for a particular component of a date/time.
Parameters: component - the component specifier from a format-dateTime picture, forexample "M" for the month or "D" for the day. | public String | getTimezoneName(int tz) | public String | halfDayName(int minutes, int minWidth, int maxWidth) | public String | monthName(int month, int minWidth, int maxWidth) | public void | setCountry(String country) |
dayName | public String dayName(int day, int minWidth, int maxWidth)(Code) | | Get a day name or abbreviation
Parameters: day - The month number (1=Monday, 7=Sunday) Parameters: minWidth - The minimum number of characters Parameters: maxWidth - The maximum number of characters |
format | public String format(long number, String picture, int groupSize, String groupSeparator, String letterValue, String ordinal)(Code) | | Format a number into a string
Parameters: number - The number to be formatted Parameters: picture - The format token. This is a single component of the format attributeof xsl:number, e.g. "1", "01", "i", or "a" Parameters: groupSize - number of digits per group (0 implies no grouping) Parameters: groupSeparator - string to appear between groups of digits Parameters: letterValue - The letter-value specified to xsl:number: "alphabetic" or"traditional". Can also be an empty string or null. Parameters: ordinal - The value of the ordinal attribute specified to xsl:numberThe value "yes" indicates that ordinal numbers should be used; "" or null indicatesthat cardinal numbers the formatted number. Note that no errors are reported; if the requestis invalid, the number is formatted as if the string() function were used. |
getEraName | public String getEraName(int year)(Code) | | Get the name for an era (e.g. "BC" or "AD")
year: the proleptic gregorian year, using "0" for the year before 1AD |
getOrdinalSuffixForDateTime | public String getOrdinalSuffixForDateTime(String component)(Code) | | Get an ordinal suffix for a particular component of a date/time.
Parameters: component - the component specifier from a format-dateTime picture, forexample "M" for the month or "D" for the day. a string that is acceptable in the ordinal attribute of xsl:numberto achieve the required ordinal representation. For example, "-e" for the day componentin German, to have the day represented as "dritte August". |
getTimezoneName | public String getTimezoneName(int tz)(Code) | | Get the name of a timezone
tz: the offset of the timezone from GMT in minutes |
halfDayName | public String halfDayName(int minutes, int minWidth, int maxWidth)(Code) | | Get an am/pm indicator
Parameters: minutes - the minutes within the day Parameters: minWidth - minimum width of output Parameters: maxWidth - maximum width of output the AM or PM indicator |
monthName | public String monthName(int month, int minWidth, int maxWidth)(Code) | | Get a month name or abbreviation
Parameters: month - The month number (1=January, 12=December) Parameters: minWidth - The minimum number of characters Parameters: maxWidth - The maximum number of characters |
setCountry | public void setCountry(String country)(Code) | | Set the country used by this numberer (currenly used only for names of timezones)
|
|
|