# bikram-sambat-js

> Utility library to convert date in AD to Nepali date BS (Bikram sambat) and vice versa.

Latest version **1.0.3** (published 2025-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install bikram-sambat-js
pnpm add bikram-sambat-js
yarn add bikram-sambat-js
bun add bikram-sambat-js
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2025-08-21 |
| First published | 2019-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 115.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Puncoz Nepal |
| Maintainers | puncoz |
| Keywords | nepali, bikram sambat, gregerion, calender, bs, ad |

## Links

- npm: https://www.npmjs.com/package/bikram-sambat-js
- Repository: https://github.com/puncoz-official/bikram-sambat-js
- Issues: https://github.com/puncoz-official/bikram-sambat-js/issues
- npm.io page: https://npm.io/package/bikram-sambat-js

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2025-08-21
- 1.0.2 — 2024-06-14
- 1.0.1 — 2019-08-25
- 1.0.0 — 2019-08-25

## README

# Bikram Sambat

Utility library to convert date in AD (Gregorian) to Nepali date format BS (Bikram sambat) and vice versa.

[![Version](https://img.shields.io/npm/v/bikram-sambat-js?logo=npm)](https://www.npmjs.com/package/bikram-sambat-js)
[![Twitter Follow](https://img.shields.io/twitter/follow/PuncozNepal?label=Follow&style=social)](https://twitter.com/PuncozNepal)

## Installation

Using NPM:
```
npm i bikram-sambat-js
```

or, using Yarn:

```
yarn add bikram-sambat-js
```

## Usage

### Import package
Using ES6 `import`:
```
import BikramSambat, {ADToBS, BSToAD}  from "bikram-sambat-js"
```

or, using commonJS `require`

```
const BS = require('bikram-sambat-js')

BS.ADToBS("2019-08-25")
```

#### 1. BS to AD conversion
Syntax: `BSToAD(date: string): string`

```
BSToAD("2076-05-08") // "2019-08-25"
```

or,

```
new BikramSambat('2076-05-08', 'BS').toAD()
```

#### 2. AD to BS conversion
Syntax: `ADToBS(date: Date | string): string`

```
ADToBS("2019-08-25") // "2076-05-08"
```

or,

```
new BikramSambat('2019-08-25').toBS()
```

---
_Source: https://npm.io/package/bikram-sambat-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
