Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techgaun/ad-bs-converter
A javascript implementation to convert bikram samvat to anno domini and vice-versa
https://github.com/techgaun/ad-bs-converter
anno-domini bs-converter date-converter hacktoberfest javascript node node-module
Last synced: about 1 month ago
JSON representation
A javascript implementation to convert bikram samvat to anno domini and vice-versa
- Host: GitHub
- URL: https://github.com/techgaun/ad-bs-converter
- Owner: techgaun
- Created: 2015-07-18T19:53:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-20T14:40:59.000Z (10 months ago)
- Last Synced: 2024-10-03T00:48:43.764Z (2 months ago)
- Topics: anno-domini, bs-converter, date-converter, hacktoberfest, javascript, node, node-module
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 29
- Watchers: 4
- Forks: 18
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nepal - AD BS Converter
README
# ad-bs-converter [![npm version](https://badge.fury.io/js/ad-bs-converter.svg)](http://badge.fury.io/js/ad-bs-converter) [![Build Status](https://travis-ci.org/techgaun/ad-bs-converter.svg?branch=master)](https://travis-ci.org/techgaun/ad-bs-converter)
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](https://github.com/techgaun/ad-bs-converter.py)._
### Installation
```bash
npm install ad-bs-converter --save
```### Example
```javascript
var adbs = require("ad-bs-converter");console.log(adbs.ad2bs("1990/8/10"))
console.log(adbs.bs2ad("2047/4/26"))
```outputs
```javascript
{ 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' }
```