Class Bikram

Constructors

Properties

Day: number
Month: number
PlanetApogee_sun: number
PlanetCircumm_sun: number
rad: number
Year: number
YugaCivilDays: number
YugaRotation_star: number
YugaRotation_sun: number

Methods

  • Get the number of days in a given Bikram Sambat month.

    Parameters

    • bsYear: number

      Bikram Sambat year

    • bsMonth: number

      Bikram Sambat month (1-12)

    Returns number

    Number of days in the month

  • Convert a Gregorian date to a Bikram Sambat date.

    Parameters

    • y: number

      Gregorian year

    • m: number

      Gregorian month (1-12)

    • d: number

      Gregorian day (1-31)

    Returns void

  • Convert a Julian date to a Gregorian date.

    Parameters

    • julian_date: number

      Julian date

    Returns { day: number; month: number; year: number }

    Object containing year, month, and day

  • Convert a Bikram Sambat date to a Gregorian date and store it in the instance.

    Parameters

    • bsYear: number

      Bikram Sambat year

    • bsMonth: number

      Bikram Sambat month (1-12)

    • bsDay: number

      Bikram Sambat day (1-32)

      Example Usage: // Create an instance of the Bikram class const bikram = new Bikram();

      // Bikram Sambat date to convert const bsYear = 2080; const bsMonth = 5; const bsDay = 15;

      // Convert to Gregorian date and store in the instance bikram.fromNepali(bsYear, bsMonth, bsDay);

      // Access the stored Gregorian date console.log(Gregorian Year: ${bikram.Year}); console.log(Gregorian Month: ${bikram.Month + 1}); // Adjust back to 1-based month console.log(Gregorian Day: ${bikram.Day});

    Returns void

  • Get the Bikram Sambat day.

    Returns number

    Bikram Sambat day (1-31)

  • Calculate the Julian date for a given Gregorian date.

    Parameters

    • year: number

      Gregorian year

    • month: number

      Gregorian month (1-12)

    • day: number

      Gregorian day (1-31)

    Returns number

    Julian date

  • Get the Bikram Sambat month.

    Returns number

    Bikram Sambat month (1-12)

  • Get the name of the Nepali month.

    Parameters

    • month: number

      Bikram Sambat month (1-12)

    Returns string

    Name of the Nepali month

  • Get the Saura Masa month and day for a given Ahargana.

    Parameters

    • ahar: number

      Ahargana (days since epoch)

    Returns { day: number; month: number }

    Object containing month and day

  • Get the true solar longitude for a given Ahargana.

    Parameters

    • ahar: number

      Ahargana (days since epoch)

    Returns number

    True solar longitude

  • Get the name of the weekday for a given date in Nepali.

    Parameters

    • year: number

      Gregorian year

    • month: number

      Gregorian month (1-12)

    • day: number

      Gregorian day (1-31)

    Returns string

    Name of the weekday in Nepali

  • Get the Bikram Sambat year.

    Returns number

    Bikram Sambat year

  • Check if today is the first day of the Saura Masa month.

    Parameters

    • ahar: number

      Ahargana (days since epoch)

    Returns number

    1 if true, 0 otherwise

  • Convert a Bikram Sambat date to a Gregorian date.

    Parameters

    • bsYear: number

      Bikram Sambat year

    • bsMonth: number

      Bikram Sambat month (1-12)

    • bsDay: number

      Bikram Sambat day (1-31)

    Returns { day: number; month: number; year: number }

    Object containing year, month, and day