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

bangla-date-utils

v2.0.1

Published

A utility package for converting and formatting dates in the Bangla calendar system with support for Bangla numerals.

Readme

Bangla Date Utils

A comprehensive utility package for working with the Bangla (Bengali) calendar system and displaying Gregorian dates in Bangla language. This package provides accurate conversion between Gregorian and Bangla dates, supports Bangla numerals, month names, seasons, and offers various formatting options.

Features

  • Complete Bangla Calendar System: Full support for Bangla months, seasons, and weekdays
  • Gregorian Dates in Bangla: Display Gregorian dates using Bangla numerals and month names
  • Accurate Date Conversion: Convert dates between Gregorian and Bangla calendars
  • Bangla Numerals: Convert numbers to Bangla numerals (০, ১, ২, ৩, etc.)
  • Rich Formatting Options: Format dates in various styles (full, medium, short)
  • Cultural Context: Access to Bangla seasons (ঋতু) and other cultural elements
  • TypeScript Support: Full TypeScript definitions included

Installation

npm install bangla-date-utils

Basic Usage

Format Gregorian Date in Bangla Language

import { formatGregorianToBangla } from 'bangla-date-utils';

// Medium format (default)
formatGregorianToBangla("2025-05-13T19:51:52.917Z"); 
// Output: "১৩ মে, ২০২৫" (13 May, 2025 in Bangla)

// Full format (includes weekday)
formatGregorianToBangla("2025-05-13T19:51:52.917Z", "full"); 
// Output: "মঙ্গলবার, ১৩ মে, ২০২৫" (Tuesday, 13 May, 2025 in Bangla)

// Short format
formatGregorianToBangla("2025-05-13T19:51:52.917Z", "short"); 
// Output: "১৩/৫/২০২৫" (13/5/2025 in Bangla numerals)

Convert to Bangla Calendar Date

import { convertToBanglaDate } from 'bangla-date-utils';

// Medium format (default)
convertToBanglaDate("2025-05-13T19:51:52.917Z"); 
// Output: "৩০ বৈশাখ ১৪৩২" (30 Boishakh 1432 in Bengali calendar)

// Full format (includes season)
convertToBanglaDate("2025-05-13T19:51:52.917Z", "full"); 
// Output: "৩০ বৈশাখ ১৪৩২ (গ্রীষ্ম)" (30 Boishakh 1432 (Summer) in Bengali calendar)

// Short format
convertToBanglaDate("2025-05-13T19:51:52.917Z", "short"); 
// Output: "৩০/১/১৪৩২" (30/1/1432 in Bengali calendar with Bangla numerals)

Get Detailed Bengali Calendar Information

import { getBanglaDateDetails } from 'bangla-date-utils';

const result = getBanglaDateDetails("2025-05-13T19:51:52.917Z");
console.log(result.formatted); // "৩০ বৈশাখ ১৪৩২"
console.log(result.details); 
// {
//   year: 1432,
//   month: 1,
//   date: 30,
//   monthName: "বৈশাখ",
//   season: "গ্রীষ্ম"
// }

Available Constants

The package provides access to Bangla calendar constants:

import { BANGLA_MONTHS, BANGLA_SEASONS, BANGLA_WEEKDAYS } from 'bangla-date-utils';

console.log(BANGLA_MONTHS);
// Output: ['বৈশাখ', 'জ্যৈষ্ঠ', 'আষাঢ়', 'শ্রাবণ', 'ভাদ্র', 'আশ্বিন', 'কার্তিক', 'অগ্রহায়ণ', 'পৌষ', 'মাঘ', 'ফাল্গুন', 'চৈত্র']

console.log(BANGLA_SEASONS);
// Output: ['গ্রীষ্ম', 'বর্ষা', 'শরৎ', 'হেমন্ত', 'শীত', 'বসন্ত']

console.log(BANGLA_WEEKDAYS);
// Output: ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার']

API Reference

Main Functions

| Function | Description | |----------|-------------| | formatGregorianToBangla(dateString: string, format?: BanglaDateFormat) | Formats a Gregorian date in Bangla language | | convertToBanglaDate(dateString: string, format?: BanglaDateFormat) | Converts a date string to Bangla calendar date | | getBanglaDateDetails(dateString: string, format?: BanglaDateFormat) | Gets detailed Bangla calendar information from a date string |

Format Options

| Format | Description | |--------|-------------| | "full" | Includes weekday for Gregorian dates or season for Bangla dates | | "medium" | Standard format (default) | | "short" | Numeric format with Bangla numerals |

Constants

| Constant | Description | |----------|-------------| | BANGLA_MONTHS | Array of Bangla month names | | BANGLA_SEASONS | Array of Bangla season names | | BANGLA_WEEKDAYS | Array of Bangla weekday names |

Types

| Type | Description | |------|-------------| | BanglaDate | Interface for Bangla date object with year, month, date, monthName, and season | | BanglaDateFormat | Type for format options: "full" | "medium" | "short" | "custom" |

Contributing

If you would like to contribute, please fork the repository and create a pull request. All contributions are welcome!

License

MIT