Module: kollavarsham

Source:

Classes

Kollavarsham

Methods


<inner> fromGregorianDate(date)

Converts a Gregorian date to the equivalent Kollavarsham date, respecting the current configuration

Parameters:
Name Type Description
date Date

The Gregorian date to be converted to Kollavarsham

Source:
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 return JulianDate object 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
date kollavarshamDate

The Kollavarsham date to be converted to Gregorian

Source:
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 return JulianDate object for any date before 1st January 1583 AD and Date objects for later dates.

Parameters:
Name Type Description
sakaDate sakaDate

The Saka date to be converted to Gregorian

Source:
Returns:

Converted date

Type
Date | JulianDate