Classes
Methods
-
<inner> fromGregorianDate(date)
-
Converts a Gregorian date to the equivalent Kollavarsham date, respecting the current configuration
Parameters:
Name Type Description dateDate The Gregorian date to be converted to Kollavarsham
Returns:
Converted date
- Type
- kollavarshamDate
Example
const Kollavarsham = require('Kollavarsham'); const kollavarsham = new Kollavarsham(); let today = kollavarsham.fromGregorianDate(new Date(1979, 4, 22)); -
<inner> toGregorianDate(date)
-
Converts a Kollavarsham date (an instance of
kollavarshamDate) to its equivalent Gregorian date, respecting the current configuration. This method Will returnJulianDateobject for any date before 1st January 1583 AD and Date objects for later dates.This API has not been implemented yet
Parameters:
Name Type Description datekollavarshamDate The Kollavarsham date to be converted to Gregorian
Throws:
"When the API is implemented, will convert <date>"
Returns:
Converted date
- Type
- Date | JulianDate
-
<inner> toGregorianDateFromSaka(sakaDate)
-
Converts a Saka date (an instance of
sakaDate) to its equivalent Gregorian date, respecting the current configuration. This method Will returnJulianDateobject for any date before 1st January 1583 AD and Date objects for later dates.Parameters:
Name Type Description sakaDatesakaDate The Saka date to be converted to Gregorian
Returns:
Converted date
- Type
- Date | JulianDate