Nepali Calendar (Bikram Sambat)
Nepali Calendar ie, Vikram Sambat Calendar is a historical hindu calendar used in Indian SubContinent and is the official calendar of Nepal. The calendar is almost 57 years older then English Calendar.
This extension will help you to convert date in AD to BS and vice-versa , as well the extension is connected with an api to fetch Tithi, Events of the day, Holiday and vice-versa.
Blocks & Documentation
This method converts AD date to BS date. Remeber date must be from 1913 AD to 2043AD. ‘month’ accepts value 1 to 12 , ‘dayOfMonth’ accepts value from 1 to 31 and year accepts value from 1913 to 2043. When date is converted , an event is fired.
This event is fired when AD date is converted into BS date. It will give you day, month , year and dayOfWeek value in integer.
This method converts BS date to AD date. ‘nepaliMonth’ accepts integer value from 1 to 12 , ‘nepaliDayOfMonth’ accepts value from 1 to 31 and ‘nepaliYear’ accepts value from 1970 to 2100.
This method will help you to fetch json data and to find tithi,holidays etc… ‘year’ accepts BS year value. You can also use web component alternatively . You can use https://raw.githubusercontent.com/oseamiya/NepaliCalendar/main/api/year.json alternatively. Remeber year accepts value from 1970 to 2074 BS.
An event is triggered when the method got json
This event will be fired from GetJson method.
This method helps you to get tithi, holiday, special day , event of the day . It formats the json string that we got earlier using GetJson method. ‘json’ accepts json String, ‘month’ accepts integer from 1 to 12 and ‘day’ accepts integer from 1 to 31. An event will be triggered.
This event will be triggered from FormatJson method. ‘tithi’ will give tithi of the day in devangari. ‘event’ will give event of that day . If none event then it will give blank string. ‘isHoliday’ and ‘isSpecialDay’ will give true or false.
This will create a Nepali calendar view in a HVArrangement.
You can download extension from my Github Repo
Aia download : NepaliCalendar.aia (120.6 KB)