Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

date-convert-ad-bs

Ulleri-Tech125ISC1.2.0TypeScript support: included

Convert AD to BS and vice versa

Convert Date, AD to BS, BS to AD

readme

Date-convert-AD-BS

Lightweight JS Module to convert AD to BS and vice-versa.

Install

npm install date-convert-ad-bs

pnpm install date-convert-ad-bs

yarn add date-convert-ad-bs

Usage

How to Use

ES6 Syntax

  // ES6 import 
  import {ADTOBS, BSTOAD} from 'date-convert-ad-bs';

  console.log(ADTOBS(2023,5,29)); // ~ 2080-03-14
  console.log(BSTOAD(2080,2,15)); // ~ 2023-06-30

CommonJS Syntax

  const converter = require('date-convert-ad-bs');  

  console.log(converter.ADTOBS(2023,5,29)); // ~ 2080-03-14
  console.log(converter.BSTOAD(2080,2,15)); // ~ 2023-06-30