BiDateFormatSymbols
A class that provides locale specific date strings and date patterns. The specific strings to use are provided by a static BiStringBundle. This class is based on the Java class DateFormatSymbols.
This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiDateFormatSymbols .
Constructor
new BiDateFormatSymbols ( sLanguage )
Parameters
| Name | Type | Optional | Default | Descripton |
sLanguage | String | Optional language locale string, for example "en-US", to use for the date formats. If not provided, the default language, as provided by the browser, is used. |
Properties
| Name | Type | get | set | Descripton |
amPmStrings | String[] | ![]() | ![]() | This is an array containing the am pm strings |
datePatterns | String[] | ![]() | ![]() | This is an array containing the short and long date pattern |
dateTimePatterns | String[] | ![]() | ![]() | This is an array containing the short and long date time pattern |
eras | String[] | ![]() | ![]() | This is an array containing strings representing the eras berfore and after year zero. |
firstWeekday | Number | ![]() | ![]() | The weekday that starts the week. 0 is Sunday and 6 is Saturday. Setting this to 1 means that Monday starts the week just like in ISO. |
localePatternChars | String | ![]() | ![]() | This is a string the localized pattern charaters. This allows the pattern to use other characters than the default to identify the different parts. |
months | String[] | ![]() | ![]() | This is an array containing the full month names |
redWeekdays | Number[] | ![]() | ![]() | The days of the week that are considered red. 0 is Sunday and 6 is Saturday. Setting this to [0] means that Sundays will be considered red days. |
rightToLeft | Boolean | ![]() | ![]() | Returns whether right to left should be used for this language |
shortMonths | String[] | ![]() | ![]() | This is an array containing the short month names |
shortWeekdays | String[] | ![]() | ![]() | This is an array containing the short weekday names |
stringBundle | | ![]() | Returns the string bundle used for the strings | |
timePatterns | String[] | ![]() | ![]() | This is an array containing the short and long time pattern |
weekdays | String[] | ![]() | ![]() | This is an array containing the weekday names |
Methods
| Name | Description |
getIsRedWeekday | Returns whether the weekday is considered a red day or not |
Events
None.
Static Methods
| Name | Description |
addBundle | Adds a string bundle representing the strings to use for the given language |
Static Fields
None.
Remarks
These are the fields in the string bundle used for the localization am pm bc - This is used to denote the era before year 0 ad - This is used to denote the era after year 0 JanuaryLong - Full month names FebruaryLong MarchLong AprilLong MayLong JuneLong JulyLong AugustLong SeptemberLong OctoberLong NovemberLong DecemberLong Jan - Short month names Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Sunday - Long weekday names Monday Tuesday Wednesday Thursday Friday Saturday Sun - Short weekday names Mon Tue Wed Thu Fri Sat dateTimePattern - Long date time pattern shortDateTimePattern - Short date time pattern shortDatePattern - Short date pattern mediumDatePattern longDatePattern shortTimePattern - Short time pattern mediumTimePattern longTimePattern firstWeekday - The day that the week starts with redWeekdays - A comma separated string with weekday indices localePatternChars - The localized charaters to use in patterns
Method Details
getIsRedWeekday
Returns whether the weekday is considered a red day or not
Syntax
object.getIsRedWeekday ( n ) Parameters
| Name | Type | Optional | Default | Descripton |
n | Number | The weekday index |
Return Type
Boolean
Static Method Details
addBundle
Adds a string bundle representing the strings to use for the given language
Syntax
BiDateFormatSymbols . addBundle ( sLanguage,oStringMap ) Parameters
| Name | Type | Optional | Default | Descripton |
sLanguage | String | A string representing the language, for example "en-US". | ||
oStringMap | Object | An object with the localized strings. |
Return Type
void
