Socket
Book a DemoInstallSign in
Socket

nepali_calendar

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nepali_calendar

1.0.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Nepali Calendar

Build Status Gem Version Code Climate Test Coverage

A Ruby gem for generating Nepali Calendar (Bikram Sambat Calendar). You can also convert dates between BS and AD. Nepali Calendar is based on the API from codeartsnepal.

Installation

Add this line to your application's Gemfile:

gem 'nepali_calendar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install nepali_calendar

Usage

Rails 3/4

Initialize Calendar Object in controller with:

@cal = NepaliCalendar::Calendar.new

To convert date from AD to BS, copy the following code in the view file:

<%= @cal.ad_to_bs('2015', '09', '10') %>

To convert date from BS to AD, copy the following code:

<%= @cal.bs_to_ad('2072', '05', '24') %>

Contributing

  • Fork it ( https://github.com/lalusaud/nepali_calendar/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

FAQs

Package last updated on 16 Sep 2015

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.