Lightweight JavaScript library to convert Nepali and English dates.
- Lightweight
- Zero dependencies
- Supports date conversion from
1975
BS to2100
BS - Easy to use
- Beginner friendly
$ npm install datenp
import DateNP from "https://deno.land/x/datenp/mod.ts";
<script type="module">
import DateNP from "https://cdn.jsdelivr.net/npm/datenp@latest/dist/mod.mjs";
</script>
const { DateNP } = require("datenp");
import DateNP from "datenp"
const np = new DateNP(new Date("2022-01-06"));
console.log(np.toBS()); // { year: 2078, month: 9, day: 22 }
import DateNP from "datenp"
const np = new DateNP("2078-09-22");
console.log(np.toAD()); // { year: 2022, month: 1, day: 6 }
console.log(np.getMonthName()); // "Poush"
Created and maintained by DevAndromeda
Under MIT License