Created by staff of the U.S. Securities and Exchange Commission.
Data and content created by government employees within the scope of their employment are not subject to domestic copyright protection. 17 U.S.C. 105.
date.js README
Purpose
High level Developer information regarding the Constant date functionality.
Variables
ConstantsDate.eraStart
- Simple key=>value JS object. The keys represent unicode CJK characters. The values represent which era is represented.
ConstantsDate.gregorianLastMoDay
- Simple JS Array. The amount of days in each month according to the Gregorian Calendar. Index of zero refers to January, Index of 1 refers to February, etc.
ConstantsDate.sakaMonthLength
- Simple JS Array. The amount of days in each month according to the Indian National Calendar. Index of zero refers to Chaitra, Index of 1 refers to Vaishākha, etc.
ConstantsDate.sakaMonthOffset
- Semi-complex 2d JS Array. When transforming a Indian National Calendar Date to a Gregorian Calendar Date, these offsets correspond to the Indian National Calendar Month input.
ConstantsDate.getGregorianHindiMonthNumber
- Simple key=>value JS Object. The keys represent unicode Devanagari characters. The values represent which Gregoian month number is represented.
ConstantsDate.getSakaMonthNumber
- Simple key=>value JS Object. The keys represent unicode as well as plain text of the Indian National Calendar. The values represent the month number.
Functions
ConstantsDate.getDuration()
- Purpose:
- Used by fact transform(s). Returns a simple key=>value JS Object. Casts the input to a float. Sets negative to boolean, value to the absolute value of the input, error to boolean.
- Arguments:
ConstantsDate.getSakaYearPadding()
- Purpose:
- Used by fact transform(s). Returns a simple JS String. Casts the year argument to a string, if necessary. If the year string is only 2 characters long (ex: 07) it adds ‘19’, or ‘20’ to the beginning of the string.
- Arguments:
- year : String || Number
- month : Number
- day : Number
ConstantsDate.getSakaToGregorian()
- Purpose:
- Used by fact transform(s). Returns a simple JS String (ex: 01-01-2010).
- Arguments:
- inputYear : Number
- inputMonth: Number
- inputDay: Number