npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bn-calendar

v1.3.3

Published

Comprehensive Bengali calendar system library built for any JavaScript and TypeScript environment.

Readme

Bangla Calendar

Comprehensive Bengali calendar system library built for any JavaScript and TypeScript environment.

Bangla Calendar

bn-calendar is a comprehensive Bengali calendar system library built for any JavaScript and TypeScript environment. It supports creation, manipulation, and conversion between Bengali and Gregorian calendars with full support for both 'revised-2019' (default) and 'revised-1966' variants.

Install

NPM

npm i bn-calendar

PNPM

pnpm add bn-calendar

YARN

yarn add bn-calendar

Import

import { BanglaCalendar } from 'bn-calendar';

Quick Examples

BanglaCalendar - The class to create, manipulate, and convert dates between the Bangla and Gregorian calendar systems.

It supports two calendar variants: 'revised-2019' (default) and 'revised-1966'.

import { BanglaCalendar } from 'bn-calendar';

// 1. Current date in Bangla calendar
const today = new BanglaCalendar();
console.log(today.toString()); 
// Output: "শুক্রবার, ৯ ফাল্গুন, ১৪৩২ [বসন্ত]"

// 2. From Gregorian date string
const date1 = new BanglaCalendar('2023-04-14');
console.log(date1.toJSON()); 
// Output: "১৪৩০-০১-০১"

// 3. From JavaScript Date object
const date2 = new BanglaCalendar(new Date(2023, 3, 14));
console.log(date2.getMonthName()); 
// Output: "বৈশাখ"

// 4. From specific Bangla components (Year, Month, Date)
const date3 = new BanglaCalendar(1430, 1, 1);
console.log(date3.toDate()); 
// Output: Fri Apr 14 2023 00:00:00 GMT+0000

// 5. Using Bangla digits directly
const date4 = new BanglaCalendar('১৪৩০', '১', '১');
console.log(date4.toStringEn()); 
// Output: "Shukrobar (Friday), 1 Boishakh, 1430 [Grisma (Summer)]"

Read full documentation: bn-calendar.vercel.app


Features

  • Bidirectional Conversion: Seamlessly convert dates between Gregorian and Bengali calendar systems.
  • Multiple Variants: Full support for both 'revised-2019' (official Bangladesh calendar) and 'revised-1966' leap year rules.
  • Immutable by Design: BanglaCalendar objects are strictly immutable. All date manipulation methods (addDays, addMonths, etc.) and toDate() return fresh instances/objects without side effects.
  • Rich API: Extensive methods for date manipulation, formatting, and calculations.
  • Universal Utilities: Handy functions to handle conversion between Bangla (০-৯) and Latin (0-9) digits.
  • Lightweight & Fast: Zero dependencies, fully tree-shakable, and optimized for performance.
  • Universal Compatibility: Works seamlessly in Node.js, browsers, and any JS/TS environment.
  • Type-Safe: Written in TypeScript with comprehensive type definitions.

🔗 Related Packages


License

This project is licensed under the Apache License 2.0 with the following additional requirement:

Additional Requirement:

Any fork, derivative work, or redistribution of this project must include clear attribution to Nazmul Hassan in both the source code and any publicly available documentation.

You are free to use, modify, and distribute this project under the terms of the Apache 2.0 License, provided that appropriate credit is given.


Built with ❤️ by Nazmul Hassan