@saurab/nepali-date@0.1.3Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
SaurabPoudel/nepali-dateNepali date package that validates, format and compare nepali dates
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
7 months ago (0.1.3)
Nepali Date Library
A comprehensive Nepali date manipulation library for Deno. This library provides utilities for working with Nepali (Bikram Sambat) dates, including formatting, conversion, and date arithmetic.
Features
- Format Nepali dates with various patterns
- Convert between Nepali and Gregorian dates
- Date arithmetic operations
- Supports both English and Nepali languages
- Zero dependencies
- Tree-shakeable exports
- Type-safe with TypeScript
Usage
Format Nepali Date
import { formatNepaliDate } from "@saurab/nepali-date"; console.log(formatNepaliDate(2071, 1, 30)); // returns "२०७१-०१-३०"
Validate Nepali Date
import { validateNepaliDate } from "@saurab/nepali-date"; validateNepaliDate(2071, 1, 222); // throws error if date is invalid
Compare Nepali Dates
import { compareNepaliDates } from "@saurab/nepali-date"; compareNepaliDates(2071, 1, 20, 2071, 1, 30); // return -10
License
This project is licensed under the MIT License - see the LICENSE file for details.
Built and signed on
GitHub Actions
Add Package
deno add jsr:@saurab/nepali-date
Import symbol
import * as nepali_date from "@saurab/nepali-date";
Import directly with a jsr specifier
import * as nepali_date from "jsr:@saurab/nepali-date";
Add Package
pnpm i jsr:@saurab/nepali-date
pnpm dlx jsr add @saurab/nepali-date
Import symbol
import * as nepali_date from "@saurab/nepali-date";
Add Package
yarn add jsr:@saurab/nepali-date
yarn dlx jsr add @saurab/nepali-date
Import symbol
import * as nepali_date from "@saurab/nepali-date";
Add Package
vlt install jsr:@saurab/nepali-date
Import symbol
import * as nepali_date from "@saurab/nepali-date";
Add Package
npx jsr add @saurab/nepali-date
Import symbol
import * as nepali_date from "@saurab/nepali-date";
Add Package
bunx jsr add @saurab/nepali-date
Import symbol
import * as nepali_date from "@saurab/nepali-date";