BiDateFormatSymbols

A class that provides locale specific date strings and date patterns. The specific strings to use are provided by a static BiStringBundle. This calss 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 checked 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[] checked checked This is an array containing the am pm strings
datePatterns String[] checked checked This is an array containing the short and long date pattern
dateTimePatterns String[] checked checked This is an array containing the short and long date time pattern
eras String[] checked checked This is an array containing strings representing the eras berfore and after year zero.
firstWeekday Number checked checked 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 checked checked 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[] checked checked This is an array containing the full month names
redWeekdays Number[] checked checked 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 checked checked Returns whether right to left should be used for this language
shortMonths String[] checked checked This is an array containing the short month names
shortWeekdays String[] checked checked This is an array containing the short weekday names
timePatterns String[] checked checked This is an array containing the short and long time pattern
weekdays String[] checked checked 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
getStringBundle Returns the string bundle used for the strings

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

getStringBundle

Returns the string bundle used for the strings

Syntax

BiDateFormatSymbols
 .
 getStringBundle
 (
 
 )
 

Parameters

No arguments.

Return Type

BiStringBundle