Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bikram-sambat-js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bikram-sambat-js

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

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Bikram Sambat

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

Version Twitter Follow

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()

Keywords

FAQs

Package last updated on 14 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc