കൊല്ലവർഷം - JavaScript API (v1.3.16)
Show:

SakaDate Class

Extends BaseDate
Module: sakaDate

Represents an Saka date's year, month and paksa and tithi

Constructor

SakaDate

(
  • [year=1]
  • [month=1]
  • [tithi=1]
  • [paksa='Suklapaksa']
)

Parameters:

  • [year=1] Number optional

    Saka Year

  • [month=1] Number optional

    Saka Month

  • [tithi=1] Number optional

    Lunar Day

  • [paksa='Suklapaksa'] String optional

    Lunar Phase - Valid values are Suklapaksa (default) or 'Krsnapaksa`

Methods

generateKollavarshamDate

() KollavarshamDate

Generates an instance of KollavarshamDate from this instance of SakaDate

Returns:

getMasaName

(
  • masaNumber
)
Saka : string

Returns the month names object that has Saka, Saura and Kollavarsham (English & Malayalam) month names for the specified index masaNumber

Parameters:

  • masaNumber Number

Returns:

Saka : string:

, saura : {string}, enMalayalam : {string}, mlMalayalam : {string} } }

toString

()

Converts the Date to a nicely formatted string with year, month and date

Properties

adhimasa

String

The Adhimasa (Adhika Masa) prefix corresponding to this instance of the date. Set separately after an instance is created

ahargana

Number

The Ahargana corresponding to this instance of the date. Set separately after an instance is created

In Sanskrit ahoratra means one full day and gana means count. Hence, the Ahargana on any given day stands for the number of lunar days that have elapsed starting from an epoch.

Source: http://cs.annauniv.edu/insight/Reading Materials/astro/sharptime/ahargana.htm

date

Number

The date corresponding to this instance of the date.

fractionalTithi

Number

The fractional Tithicorresponding to this instance of the date. Set separately after an instance is created

gregorianDate

Date

The gregorian date corresponding to this instance of the date. Set separately after an instance is created

julianDay

Number

The Julian Day corresponding to this instance of the date. Set separately after an instance is created Julian day is the continuous count of days since the beginning of the Julian Period used primarily by astronomers.

Source: https://en.wikipedia.org/wiki/Julian_day

kaliYear

Number

The Kali year corresponding to this instance of the date. Set separately after an instance is created

masaName

String

Returns the month name for this instance of SakaDate

mlWeekdayName

String

Returns the weekday (in Malayalam) for the current instance of date.

month

Number

The month corresponding to this instance of the date.

naksatra

saka: String, enMalayalam: string, mlMalayalam: string

The Naksatra (Star) for this instance of the date. Set separately after an instance is created

naksatraName

String

Returns the Saka Naksatra name for this instance of SakaDate

paksa

String

The Paksha/Paksa corresponding to this instance of the date.

Paksha (or pakṣa: Sanskrit: पक्ष), refers to a fortnight or a lunar phase in a month of the Hindu lunar calendar.

Source: https://en.wikipedia.org/wiki/Paksha

sakaYear

Number

Returns the Saka year on this instance of SakaDate (same as the underlyiung year property from the BaseDate class)

sauraDivasa

Number

The Saura Divasa (Solar Calendar Day) for this instance of the date. Set separately after an instance is created

sauraMasa

Number

The Saura Masa (Solar Calendar Month) for this instance of the date. Set separately after an instance is created

sauraMasaName

String

Returns the Saura Masa name for the current instance of date.

sunriseHour

Number

The hour part from the sunrise time for this date. Set separately after an instance is created

sunriseMinute

Number

The minute part from the sunrise time for this date. Set separately after an instance is created

tithi

Number

Returns the Tithi on this instance of SakaDate (same as the underlyiung date property from the BaseDate class)

In Vedic timekeeping, a tithi (also spelled thithi) is a lunar day, or the time it takes for the longitudinal angle between the Moon and the Sun to increase by 12°. Tithis begin at varying times of day and vary in duration from approximately 19 to approximately 26 hours.

Source: https://en.wikipedia.org/wiki/Tithi

vikramaYear

Number

Returns the Vikrama year corresponding to the Saka year of this instance.

weekdayName

String

Returns the weekday (in English) for the current instance of date.

year

Number

The year corresponding to this instance of the date.