number2words (enter_number) // Assign the font as Preeti.BsAddDays ("bs_date", no_of_days") // Add or Subtract number of days from a BS Date.BsDatesDiff ("start_date", "end_date") // Date count between 2 BS Dates.ConvertDateFormat ("date", "source_format", "target_format").BS2AD ("enter_bs_date") // BS date format (YYYY/MM/DD).AD2BS ("enter_ad_date") // AD date format (MM/DD/YYYY).The list of available functions are listed below:
Returns Javascript Date converted from nepali date.Nepali Functions Addin for Excel consists of various functions that help nepali excel users to perform tasks easily. Get Nepali date for the month getDay(): number This constructor takes year, monthIndex i.e 0-11, and date.Įxample: new NepaliDate( 2051, 0, 1) // This date represents BaisgetYear(): number
new NepaliDate()Ĭonstructor(year: number, monthIndex: number, date: number) If no values are provided, the current day date will be converted to Nepali date. The number value represents the UTC timestamp that will be converted to Nepali date.Įxample: new NepaliDate( new Date( 2020, 10, 10)) The current supported formats are: YYYY/MM/DDĮxample: new NepaliDate( '1') // YYYY/MM/DD new NepaliDate( '')
Javascript Date object new NepaliDate( 2051, 5, 24).toJsDate()ĭate1.format( 'ddd, DD MMMM YYYY') // 'Monday, 24 Aswin 2051' // update dateĪPI Constructors constructor(value?: string | number | Date) Import NepaliDate from 'nepali-date-converter' // or const NepaliDate = require( 'nepali-date-converter') ĭeno: import NepaliDate from '' Basic Usage // NepaliDate (year,month,date) let date1 = new NepaliDate( 2054, 5, 24) A small Javascript/Typescript Library to convert English Date to Nepali and Vice Versa.