nepali_calendar 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/Gemfile +2 -0
- data/README.md +18 -2
- data/Rakefile +2 -2
- data/lib/nepali_calendar.rb +60 -136
- data/lib/nepali_calendar/bs.rb +9 -0
- data/lib/nepali_calendar/bs.txt +91 -0
- data/lib/nepali_calendar/version.rb +1 -1
- data/nepali_calendar.gemspec +12 -12
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69d2328f8ae5b83b15b63a2ea4b76c5224576b0c
|
4
|
+
data.tar.gz: 3ff4e53a9c48c0a36b3b463ff62d47af78af16b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9c4c75018e4401e12a054ef5646001262611a181c07ee3f9b8bc52d93f87a61fe5367b2f4c9859f72d35efcbd9b719fbc170878794132a6aec973079fbd4719
|
7
|
+
data.tar.gz: ea6a3a10245b3d7a34b112c9dda281a406d348c8d1368ba9c298b23f27ad30f1ce3c5b2840b1ada6df2922facf8dfe6c78b579a2cf4c530d6fdd179950647452
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# Nepali Calendar
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/lalusaud/nepali_calendar.svg)](https://travis-ci.org/lalusaud/nepali_calendar)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/nepali_calendar.svg)](http://badge.fury.io/rb/nepali_calendar)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/lalusaud/nepali_calendar/badges/gpa.svg)](https://codeclimate.com/github/lalusaud/nepali_calendar)
|
6
|
+
[![Test Coverage](https://codeclimate.com/github/lalusaud/nepali_calendar/badges/coverage.svg)](https://codeclimate.com/github/lalusaud/nepali_calendar/coverage)
|
4
7
|
|
5
|
-
A Ruby gem for generating Nepali Calendar (Bikram Sambat Calendar). You can also convert dates between BS and AD.
|
8
|
+
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](http://sourceforge.net/projects/nepalidateconve/).
|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
@@ -22,7 +25,20 @@ Or install it yourself as:
|
|
22
25
|
|
23
26
|
## Usage
|
24
27
|
|
25
|
-
|
28
|
+
##### Rails 3/4
|
29
|
+
Initialize Calendar Object in controller with:
|
30
|
+
```sh
|
31
|
+
@cal = NepaliCalendar::Calendar.new
|
32
|
+
```
|
33
|
+
To convert date from AD to BS, copy the following code in the view file:
|
34
|
+
```sh
|
35
|
+
<%= @cal.ad_to_bs('2015', '09', '10') %>
|
36
|
+
```
|
37
|
+
|
38
|
+
To convert date from BS to AD, copy the following code:
|
39
|
+
```sh
|
40
|
+
<%= @cal.bs_to_ad('2072', '05', '24') %>
|
41
|
+
```
|
26
42
|
|
27
43
|
## Contributing
|
28
44
|
|
data/Rakefile
CHANGED
data/lib/nepali_calendar.rb
CHANGED
@@ -1,120 +1,44 @@
|
|
1
|
-
require
|
1
|
+
require 'nepali_calendar/version'
|
2
|
+
require 'nepali_calendar/bs'
|
2
3
|
require 'date'
|
3
4
|
|
4
5
|
module NepaliCalendar
|
5
|
-
|
6
6
|
class Calendar
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
'2013' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
23
|
-
'2014' => [31,31,32,32,31,30,30,29,30,29,30,30],
|
24
|
-
'2015' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
25
|
-
'2016' => [31,31,31,32,31,31,29,30,30,29,30,30],
|
26
|
-
'2017' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
27
|
-
'2018' => [31,32,31,32,31,30,30,29,30,29,30,30],
|
28
|
-
'2019' => [31,32,31,32,31,30,30,30,29,30,29,31],
|
29
|
-
'2020' => [31,31,31,32,31,31,30,29,30,29,30,30],
|
30
|
-
'2021' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
31
|
-
'2022' => [31,32,31,32,31,30,30,30,29,29,30,30],
|
32
|
-
'2023' => [31,32,31,32,31,30,30,30,29,30,29,31],
|
33
|
-
'2024' => [31,31,31,32,31,31,30,29,30,29,30,30],
|
34
|
-
'2025' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
35
|
-
'2026' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
36
|
-
'2027' => [30,32,31,32,31,30,30,30,29,30,29,31],
|
37
|
-
'2028' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
38
|
-
'2029' => [31,31,32,31,32,30,30,29,30,29,30,30],
|
39
|
-
'2030' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
40
|
-
'2031' => [30,32,31,32,31,30,30,30,29,30,29,31],
|
41
|
-
'2032' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
42
|
-
'2033' => [31,31,32,32,31,30,30,29,30,29,30,30],
|
43
|
-
'2034' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
44
|
-
'2035' => [30,32,31,32,31,31,29,30,30,29,29,31],
|
45
|
-
'2036' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
46
|
-
'2037' => [31,31,32,32,31,30,30,29,30,29,30,30],
|
47
|
-
'2038' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
48
|
-
'2039' => [31,31,31,32,31,31,29,30,30,29,30,30],
|
49
|
-
'2040' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
50
|
-
'2041' => [31,31,32,32,31,30,30,29,30,29,30,30],
|
51
|
-
'2042' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
52
|
-
'2043' => [31,31,31,32,31,31,29,30,30,29,30,30],
|
53
|
-
'2044' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
54
|
-
'2045' => [31,32,31,32,31,30,30,29,30,29,30,30],
|
55
|
-
'2046' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
56
|
-
'2047' => [31,31,31,32,31,31,30,29,30,29,30,30],
|
57
|
-
'2048' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
58
|
-
'2049' => [31,32,31,32,31,30,30,30,29,29,30,30],
|
59
|
-
'2050' => [31,32,31,32,31,30,30,30,29,30,29,31],
|
60
|
-
'2051' => [31,31,31,32,31,31,30,29,30,29,30,30],
|
61
|
-
'2052' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
62
|
-
'2053' => [31,32,31,32,31,30,30,30,29,29,30,30],
|
63
|
-
'2054' => [31,32,31,32,31,30,30,30,29,30,29,31],
|
64
|
-
'2055' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
65
|
-
'2056' => [31,31,32,31,32,30,30,29,30,29,30,30],
|
66
|
-
'2057' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
67
|
-
'2058' => [30,32,31,32,31,30,30,30,29,30,29,31],
|
68
|
-
'2059' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
69
|
-
'2060' => [31,31,32,32,31,30,30,29,30,29,30,30],
|
70
|
-
'2061' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
71
|
-
'2062' => [30,32,31,32,31,31,29,30,29,30,29,31],
|
72
|
-
'2063' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
73
|
-
'2064' => [31,31,32,32,31,30,30,29,30,29,30,30],
|
74
|
-
'2065' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
75
|
-
'2066' => [31,31,31,32,31,31,29,30,30,29,29,31],
|
76
|
-
'2067' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
77
|
-
'2068' => [31,31,32,32,31,30,30,29,30,29,30,30],
|
78
|
-
'2069' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
79
|
-
'2070' => [31,31,31,32,31,31,29,30,30,29,30,30],
|
80
|
-
'2071' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
81
|
-
'2072' => [31,32,31,32,31,30,30,29,30,29,30,30],
|
82
|
-
'2073' => [31,32,31,32,31,30,30,30,29,29,30,31],
|
83
|
-
'2074' => [31,31,31,32,31,31,30,29,30,29,30,30],
|
84
|
-
'2075' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
85
|
-
'2076' => [31,32,31,32,31,30,30,30,29,29,30,30],
|
86
|
-
'2077' => [31,32,31,32,31,30,30,30,29,30,29,31],
|
87
|
-
'2078' => [31,31,31,32,31,31,30,29,30,29,30,30],
|
88
|
-
'2079' => [31,31,32,31,31,31,30,29,30,29,30,30],
|
89
|
-
'2080' => [31,32,31,32,31,30,30,30,29,29,30,30],
|
90
|
-
'2081' => [31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
91
|
-
'2082' => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
92
|
-
'2083' => [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],
|
93
|
-
'2084' => [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],
|
94
|
-
'2085' => [31, 32, 31, 32, 30, 31, 30, 30, 29, 30, 30, 30],
|
95
|
-
'2086' => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
96
|
-
'2087' => [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30],
|
97
|
-
'2088' => [30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30],
|
98
|
-
'2089' => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
99
|
-
'2090' => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30]
|
100
|
-
}
|
7
|
+
|
8
|
+
MONTHS = %w{Baisakh Jestha Ashad Shrawn Bhadra Ashwin Kartik Mangshir Poush Magh Falgun Chaitra}
|
9
|
+
DAYS = %w{Aitabar Sombar Mangalbar Budhbar Bihibar Sukrabar Sanibar}
|
10
|
+
|
11
|
+
def initialize(y = Date.today.year, m = Date.today.month, d = Date.today.day)
|
12
|
+
@year = y
|
13
|
+
@month = m
|
14
|
+
@day = d
|
15
|
+
end
|
16
|
+
|
17
|
+
class << self
|
18
|
+
def today
|
19
|
+
today = Date.today
|
20
|
+
date = Calendar.new.ad_to_bs(today.year, today.month, today.day)
|
21
|
+
end
|
101
22
|
end
|
102
23
|
|
103
|
-
def
|
104
|
-
|
105
|
-
return unless date_in_range?(date_ad, 'ad')
|
24
|
+
def ad_to_bs(year, month, day)
|
25
|
+
fail 'Invalid date!' unless valid_date?(year, month, day)
|
106
26
|
|
107
|
-
|
108
|
-
|
27
|
+
ref_day_eng = Date.parse(ref_date['ad_to_bs']['ad'])
|
28
|
+
date_ad = Date.parse("#{year}/#{month}/#{day}")
|
29
|
+
return unless date_in_range?(date_ad, ref_day_eng)
|
109
30
|
|
110
31
|
days = total_days(date_ad, ref_day_eng)
|
32
|
+
get_bs_date(days, ref_date['ad_to_bs']['bs'])
|
33
|
+
end
|
111
34
|
|
35
|
+
def get_bs_date(days, ref_day_nep)
|
112
36
|
year, month, day = ref_day_nep.split('/').map(&:to_i)
|
113
37
|
i = year
|
114
38
|
j = month
|
115
39
|
|
116
|
-
while
|
117
|
-
bs_month_days =
|
40
|
+
while days != 0
|
41
|
+
bs_month_days = NepaliCalendar::BS[i][j - 1]
|
118
42
|
day += 1
|
119
43
|
|
120
44
|
if day > bs_month_days
|
@@ -132,20 +56,24 @@ module NepaliCalendar
|
|
132
56
|
j = 1
|
133
57
|
i += 1
|
134
58
|
end
|
135
|
-
|
136
59
|
days -= 1
|
137
60
|
end
|
138
61
|
|
139
62
|
Date.parse("#{year}/#{month}/#{day}")
|
140
63
|
end
|
141
64
|
|
142
|
-
def
|
143
|
-
|
144
|
-
return unless date_in_range?(date_bs, 'bs')
|
65
|
+
def bs_to_ad(year, month, day)
|
66
|
+
fail 'Invalid date!' unless valid_date?(year, month, day)
|
145
67
|
|
146
68
|
ref_day_nep = ref_date['bs_to_ad']['bs']
|
147
|
-
ref_day_eng = ref_date['bs_to_ad']['ad']
|
148
69
|
|
70
|
+
date_bs = Date.parse("#{year}/#{month}/#{day}")
|
71
|
+
return unless date_in_range?(date_bs, Date.parse(ref_day_nep))
|
72
|
+
|
73
|
+
get_ad_date(year, month, day, ref_day_nep)
|
74
|
+
end
|
75
|
+
|
76
|
+
def get_ad_date(year, month, day, ref_day_nep)
|
149
77
|
ref_year, ref_month, ref_day = ref_day_nep.split('/').map(&:to_i)
|
150
78
|
k = ref_year
|
151
79
|
|
@@ -153,10 +81,10 @@ module NepaliCalendar
|
|
153
81
|
i = 0
|
154
82
|
days = 0
|
155
83
|
j = 0
|
156
|
-
while
|
84
|
+
while i < (year.to_i - ref_year)
|
157
85
|
i += 1
|
158
|
-
while
|
159
|
-
days +=
|
86
|
+
while j < 12
|
87
|
+
days += NepaliCalendar::BS[k][j]
|
160
88
|
j += 1
|
161
89
|
end
|
162
90
|
j = 0
|
@@ -165,39 +93,35 @@ module NepaliCalendar
|
|
165
93
|
|
166
94
|
# No. of Days from month
|
167
95
|
j = 0
|
168
|
-
while
|
169
|
-
days +=
|
96
|
+
while j < (month.to_i - ref_month)
|
97
|
+
days += NepaliCalendar::BS[k][j]
|
170
98
|
j += 1
|
171
99
|
end
|
172
100
|
|
173
101
|
days += (day.to_i - ref_day)
|
174
|
-
Date.parse(
|
102
|
+
Date.parse(ref_date['bs_to_ad']['ad']) + days
|
175
103
|
end
|
176
104
|
|
177
|
-
|
178
|
-
(Date.parse(date_eng) - Date.parse(reference_date)).to_i
|
179
|
-
end
|
105
|
+
private
|
180
106
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
case type
|
186
|
-
when 'ad'
|
187
|
-
Date.parse(date) > Date.parse(ref_date['ad_to_bs']['ad'])
|
188
|
-
when 'bs'
|
189
|
-
Date.parse(date) > Date.parse(ref_date['ad_to_bs']['bs'])
|
190
|
-
else
|
191
|
-
raise Exception.new("Invalid date type!")
|
107
|
+
def total_days(date_eng, reference_date)
|
108
|
+
days = date_eng - reference_date
|
109
|
+
days.to_i
|
192
110
|
end
|
193
|
-
end
|
194
111
|
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
112
|
+
def date_in_range?(date, reference_date)
|
113
|
+
date > reference_date
|
114
|
+
end
|
115
|
+
|
116
|
+
def valid_date?(year, month, day)
|
117
|
+
Date.valid_date?(year.to_i, month.to_i, day.to_i)
|
118
|
+
end
|
202
119
|
|
120
|
+
def ref_date
|
121
|
+
{
|
122
|
+
'bs_to_ad' => { 'bs' => '2000/01/01', 'ad' => '1943/04/14' },
|
123
|
+
'ad_to_bs' => { 'bs' => '2000/09/17', 'ad' => '1944/01/01' }
|
124
|
+
}
|
125
|
+
end
|
126
|
+
end
|
203
127
|
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
2000 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
2
|
+
2001 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
3
|
+
2002 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
4
|
+
2003 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
5
|
+
2004 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
6
|
+
2005 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
7
|
+
2006 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
8
|
+
2007 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
9
|
+
2008 => [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31]
|
10
|
+
2009 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
11
|
+
2010 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
12
|
+
2011 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
13
|
+
2012 => [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30]
|
14
|
+
2013 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
15
|
+
2014 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
16
|
+
2015 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
17
|
+
2016 => [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30]
|
18
|
+
2017 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
19
|
+
2018 => [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
20
|
+
2019 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
21
|
+
2020 => [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30]
|
22
|
+
2021 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
23
|
+
2022 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30]
|
24
|
+
2023 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
25
|
+
2024 => [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30]
|
26
|
+
2025 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
27
|
+
2026 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
28
|
+
2027 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
29
|
+
2028 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
30
|
+
2029 => [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30]
|
31
|
+
2030 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
32
|
+
2031 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
33
|
+
2032 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
34
|
+
2033 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
35
|
+
2034 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
36
|
+
2035 => [30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31]
|
37
|
+
2036 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
38
|
+
2037 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
39
|
+
2038 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
40
|
+
2039 => [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30]
|
41
|
+
2040 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
42
|
+
2041 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
43
|
+
2042 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
44
|
+
2043 => [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30]
|
45
|
+
2044 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
46
|
+
2045 => [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
47
|
+
2046 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
48
|
+
2047 => [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30]
|
49
|
+
2048 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
50
|
+
2049 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30]
|
51
|
+
2050 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
52
|
+
2051 => [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30]
|
53
|
+
2052 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
54
|
+
2053 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30]
|
55
|
+
2054 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
56
|
+
2055 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
57
|
+
2056 => [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30]
|
58
|
+
2057 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
59
|
+
2058 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
60
|
+
2059 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
61
|
+
2060 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
62
|
+
2061 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
63
|
+
2062 => [30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31]
|
64
|
+
2063 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
65
|
+
2064 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
66
|
+
2065 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
67
|
+
2066 => [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31]
|
68
|
+
2067 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
69
|
+
2068 => [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
70
|
+
2069 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
71
|
+
2070 => [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30]
|
72
|
+
2071 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
73
|
+
2072 => [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30]
|
74
|
+
2073 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31]
|
75
|
+
2074 => [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30]
|
76
|
+
2075 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
77
|
+
2076 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30]
|
78
|
+
2077 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31]
|
79
|
+
2078 => [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30]
|
80
|
+
2079 => [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30]
|
81
|
+
2080 => [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30]
|
82
|
+
2081 => [31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30]
|
83
|
+
2082 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30]
|
84
|
+
2083 => [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30]
|
85
|
+
2084 => [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30]
|
86
|
+
2085 => [31, 32, 31, 32, 30, 31, 30, 30, 29, 30, 30, 30]
|
87
|
+
2086 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30]
|
88
|
+
2087 => [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30]
|
89
|
+
2088 => [30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30]
|
90
|
+
2089 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30]
|
91
|
+
2090 => [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30]
|
data/nepali_calendar.gemspec
CHANGED
@@ -4,22 +4,22 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'nepali_calendar/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'nepali_calendar'
|
8
8
|
spec.version = NepaliCalendar::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
9
|
+
spec.authors = ['Lal B. Saud']
|
10
|
+
spec.email = ['lalusaud@gmail.com']
|
11
|
+
spec.summary = 'Get dates for BS & AD Calendars'
|
12
|
+
spec.description = 'Generate Nepali Calendar (Bikram Sambat) and convert dates between BS & AD.'
|
13
|
+
spec.homepage = 'https://github.com/lalusaud/nepali_calendar'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
-
spec.bindir =
|
17
|
+
spec.bindir = 'exe'
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
spec.required_ruby_version = '>= 1.9.3'
|
21
21
|
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.2'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nepali_calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lal B. Saud
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.10
|
19
|
+
version: '1.10'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.10
|
26
|
+
version: '1.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,8 +52,8 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.2'
|
55
|
-
description: Nepali Calendar
|
56
|
-
|
55
|
+
description: Generate Nepali Calendar (Bikram Sambat) and convert dates between BS
|
56
|
+
& AD.
|
57
57
|
email:
|
58
58
|
- lalusaud@gmail.com
|
59
59
|
executables: []
|
@@ -67,6 +67,8 @@ files:
|
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
69
|
- lib/nepali_calendar.rb
|
70
|
+
- lib/nepali_calendar/bs.rb
|
71
|
+
- lib/nepali_calendar/bs.txt
|
70
72
|
- lib/nepali_calendar/version.rb
|
71
73
|
- nepali_calendar.gemspec
|
72
74
|
homepage: https://github.com/lalusaud/nepali_calendar
|
@@ -92,6 +94,5 @@ rubyforge_project:
|
|
92
94
|
rubygems_version: 2.4.8
|
93
95
|
signing_key:
|
94
96
|
specification_version: 4
|
95
|
-
summary:
|
96
|
-
BS & AD
|
97
|
+
summary: Get dates for BS & AD Calendars
|
97
98
|
test_files: []
|