Giter Club home page Giter Club logo

ad-bs-converter's Introduction

ad-bs-converter npm version Build Status

A javascript implementation to convert bikram samvat to anno domini and vice-versa

If you are looking for ad-bs converter for python, check out ad-bs-converter.py.

Installation

npm install ad-bs-converter --save

Example

var adbs = require("ad-bs-converter");

console.log(adbs.ad2bs("1990/8/10"))
console.log(adbs.bs2ad("2047/4/26"))

outputs

{ ne: 
   { year: '२०४७',
     month: '४',
     day: '२६',
     strMonth: 'श्रावण',
     strShortMonth: 'श्रा',
     dayOfWeek: '५',
     strDayOfWeek: 'शुक्रवार',
     strShortDayOfWeek: 'शुक्र',
     strMinDayOfWeek: 'शु',
     totalDaysInMonth: '३२'},
  en: 
   { year: 2047,
     month: 4,
     day: 26,
     strMonth: 'Shrawan',
     strShortMonth: 'Shra',
     dayOfWeek: 5,
     strDayOfWeek: 'Shukrabaar',
     strShortDayOfWeek: 'Shukra',
     strMinDayOfWeek: 'Shu',
     totalDaysInMonth: '32' } }
{ year: 1990,
  month: 8,
  strMonth: 'August',
  strShortMonth: 'Aug',
  day: 10,
  dayOfWeek: 5,
  strDayOfWeek: 'Friday',
  strShortDayOfWeek: 'Fri' }

ad-bs-converter's People

Contributors

techgaun avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.