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

NameTypeOptionalDefaultDescripton
sLanguageStringOptional 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

NameTypegetsetDescripton
amPmStringsString[]checkedcheckedThis is an array containing the am pm strings
datePatternsString[]checkedcheckedThis is an array containing the short and long date pattern
dateTimePatternsString[]checkedcheckedThis is an array containing the short and long date time pattern
erasString[]checkedcheckedThis is an array containing strings representing the eras berfore and after year zero.
firstWeekdayNumbercheckedcheckedThe 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.
localePatternCharsStringcheckedcheckedThis is a string the localized pattern charaters. This allows the pattern to use other characters than the default to identify the different parts.
monthsString[]checkedcheckedThis is an array containing the full month names
redWeekdaysNumber[]checkedcheckedThe 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.
rightToLeftBooleancheckedcheckedReturns whether right to left should be used for this language
shortMonthsString[]checkedcheckedThis is an array containing the short month names
shortWeekdaysString[]checkedcheckedThis is an array containing the short weekday names
stringBundleBiStringBundlecheckedReturns the string bundle used for the strings
timePatternsString[]checkedcheckedThis is an array containing the short and long time pattern
weekdaysString[]checkedcheckedThis is an array containing the weekday names

Methods

NameDescription
getIsRedWeekdayReturns whether the weekday is considered a red day or not

Events

None.

Static Methods

NameDescription
addBundleAdds 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

NameTypeOptionalDefaultDescripton
nNumberThe 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

NameTypeOptionalDefaultDescripton
sLanguageStringA string representing the language, for example "en-US".
oStringMapObjectAn object with the localized strings.

Return Type

void