datetime-nepali-fe
v1.0.4
Published
Fork of a nepali-datetime converter for internal use only with fixex
Downloads
299
Maintainers
Readme
Nepali DateTime Converter
This is a fork of nepali-datetime converter with fixes on particular date and added fuctionality
A javascript package to convert nepali date BS (Bikram Sambat) to AD and vice-versa. Also include a feature to calculate age in nepali date.
Installation
npm install datetime-nepali-fe
Usage
const { adToBs, bsToAd, calculateAge } = require('datetime-nepali-fe');
try {
const bsDate = adToBs('2078-03-05');
console.log(bsDate);
// to calculate age
const myAge = calculateAge('2070-10-10');
console.log(myAge);
} catch (e) {
console.log(e.message);
}
Available Methods
dateFormat
Format the date to provide various output based on format string
Date Range
Date convert will works between these Date Range:
Date Range for English Date : 1921 AD to 2040 AD
Date Range for Nepali Date : 1978 BS to 2099 BS
License
MIT © [Hukum Gosain]