@sbmdkl/nepali-date-converter
Version:
A javascript package to convert nepali date BS (Bikram Sambat) to AD and vice-versa, calcuate age from nepali date (BS)
13 lines (10 loc) • 367 B
text/typescript
import { formattedDate } from './date';
function evaluateEnglishDate(date: string, days: number): string {
const result = new Date(date);
result.setDate(result.getDate() + days);
const year = result.getFullYear();
const month = result.getMonth() + 1;
const day = result.getDate();
return formattedDate(year, month, day);
}
export default evaluateEnglishDate;