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

nanakshahi

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanakshahi

A JavaScript Library to get Nanakshahi Dates and Gurpurabs

  • 1.0.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
decreased by-6.67%
Maintainers
1
Weekly downloads
 
Created
Source

nanakshahi-js

A JavaScript Library to get Nanakshahi Dates and Gurpurabs

Travis (.org) GitHub license

Contents

Usage

The library can be imported into Node as below:

const { getNanakshahiDate, getBikramiDate } = require('nanakshahi')

const date = new Date()

getNanakshahiDate( date )
getBikramiDate( date )

API

getBikramiDate(JavaScript) ⇒ Object

Converts given Gregorian Date to the corresponding date in the Bikrami Calendar

Returns: Object - Bikrami Solar and Lunar Date

ParamTypeDescription
JavaScriptObjectDate() Object

Example

getBikramiDate( new Date() )

getNanakshahiDate(JavaScript) ⇒ Object

Converts given Gregorian Date to the corresponding date in the Nanakshahi Calendar

Returns: Object - Nanakshahi Date in English and Punjabi

ParamTypeDescription
JavaScriptObjectDate() Object

Example

getNanakshahiDate( new Date() )

Contributing

We're happy to accept suggestions and pull requests!

To get started, clone this repo and run npm install inside this directory.

This repository follows the Airbnb's Javascript Style Guide, with a few minor modifications. Notably, spaces should be included inside parentheses and brackets (weird, right!). An ESLint file is provided, and your code will automatically be checked on-commit for style. It is recommended to install an ESLint plugin for your editor (VS Code's ESLint plugin works out of the box), so you can receive linter suggestions as you type.

When writing commit messages, please follow the seven rules. Markdown and HTML JSDoc documentation is generated automatically, on commit, however if you'd like to preview any changes to documentation, npm run build-docs will update README.md. README.md should not be edited, instead apply modifications to README.hbs.

The general workflow for contributing:

  • Fork/create a new branch.
  • Write or update existing tests with expected results
  • Implement functions/changes
  • Add JSDoc function documentation and examples.
  • Run tests with npm test and ensure they all pass. Testing is done with the mocha testing framework.
  • Create a pull request with the changes.

FAQs

Package last updated on 11 Nov 2018

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