Class: Miti::BsToAd
- Inherits:
-
Object
- Object
- Miti::BsToAd
- Defined in:
- lib/miti/bs_to_ad.rb
Overview
class to handle the algorithm for converting AD to BS
Instance Method Summary collapse
-
#convert ⇒ Object
Return equivalent english date for nepali date.
-
#initialize(nepali_date) ⇒ BsToAd
constructor
Creating an object of BsToAd requires a Miti::NepaliDate object.
Constructor Details
#initialize(nepali_date) ⇒ BsToAd
Creating an object of BsToAd requires a Miti::NepaliDate object
10 11 12 |
# File 'lib/miti/bs_to_ad.rb', line 10 def initialize(nepali_date) @nepali_date = nepali_date end |
Instance Method Details
#convert ⇒ Object
Return equivalent english date for nepali date
15 16 17 |
# File 'lib/miti/bs_to_ad.rb', line 15 def convert corresponding_ad_for_baisakh1 + days_to_be_added_from_baisakh1 end |