nanakshahi 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/locales/en.yml +1 -15
- data/config/locales/pa.yml +1 -14
- data/lib/nanakshahi.rb +21 -0
- data/lib/nanakshahi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a4b9b87997817f14b8956daafa1db89fefeb156908acc9d1a049fdfb340c8de
|
4
|
+
data.tar.gz: 3dec3e4ce5a11dc3d178cd144ed8e14718562bdbbc6de16a7d097b6447848534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67285f1557bc0af5d67921f81c57a3c390318805499bbc91d71869f32f8e305284b2e6fd7cc319c00f9e9038d25314ae26ab09e77b18f030f243f3a98211f416
|
7
|
+
data.tar.gz: 60900964a7462ee2a6fb025cad136f269cc81f59d84fb7077ca1713c806507c5ecd213d0ab6ef7350b27c8f125b96ceea0d58fb79fac4e95b1d771807c1dc215
|
data/config/locales/en.yml
CHANGED
@@ -25,24 +25,10 @@ en:
|
|
25
25
|
- 8
|
26
26
|
- 9
|
27
27
|
day_names:
|
28
|
-
- Sunday
|
29
28
|
- Monday
|
30
29
|
- Tuesday
|
31
30
|
- Wednesday
|
32
31
|
- Thursday
|
33
32
|
- Friday
|
34
33
|
- Saturday
|
35
|
-
|
36
|
-
-
|
37
|
-
- January
|
38
|
-
- February
|
39
|
-
- March
|
40
|
-
- April
|
41
|
-
- May
|
42
|
-
- June
|
43
|
-
- July
|
44
|
-
- August
|
45
|
-
- September
|
46
|
-
- October
|
47
|
-
- November
|
48
|
-
- December
|
34
|
+
- Sunday
|
data/config/locales/pa.yml
CHANGED
@@ -25,23 +25,10 @@ pa:
|
|
25
25
|
- ੮
|
26
26
|
- ੯
|
27
27
|
day_names:
|
28
|
-
- ਐਤਵਾਰ
|
29
28
|
- ਸੋਮਵਾਰ
|
30
29
|
- ਮੰਗਲਵਾਰ
|
31
30
|
- ਬੁੱਧਵਾਰ
|
32
31
|
- ਵੀਰਵਾਰ
|
33
32
|
- ਸ਼ੁੱਕਰਵਾਰ
|
34
33
|
- ਸ਼ਨਿੱਚਰਵਾਰ
|
35
|
-
|
36
|
-
- ਜਨਵਰੀ
|
37
|
-
- ਫ਼ਰਵਰੀ
|
38
|
-
- ਮਾਰਚ
|
39
|
-
- ਅਪ੍ਰੈਲ
|
40
|
-
- ਮਈ
|
41
|
-
- ਜੂਨ
|
42
|
-
- ਜੁਲਾਈ
|
43
|
-
- ਅਗਸਤ
|
44
|
-
- ਸਤੰਬਰ
|
45
|
-
- ਅਕਤੂਬਰ
|
46
|
-
- ਨਵੰਬਰ
|
47
|
-
- ਦਸੰਬਰ
|
34
|
+
- ਐਤਵਾਰ
|
data/lib/nanakshahi.rb
CHANGED
@@ -76,6 +76,27 @@ class Nanakshahi
|
|
76
76
|
self.to_gregorian.leap?
|
77
77
|
end
|
78
78
|
|
79
|
+
# Return week of the day starting with Monday
|
80
|
+
#
|
81
|
+
# @return [Integer] The day index of the week
|
82
|
+
def wday
|
83
|
+
self.to_gregorian.wday
|
84
|
+
end
|
85
|
+
|
86
|
+
# Returns the day of the week in English
|
87
|
+
#
|
88
|
+
# @return [String] English representation of day of week
|
89
|
+
def wday_name
|
90
|
+
I18n.t(:day_names)[wday]
|
91
|
+
end
|
92
|
+
|
93
|
+
# Returns the day of the week in Gurmukhi
|
94
|
+
#
|
95
|
+
# @return [String] Gurmukhi representation of day of week
|
96
|
+
def vaar
|
97
|
+
I18n.t(:day_names, locale: :pa)[wday]
|
98
|
+
end
|
99
|
+
|
79
100
|
protected
|
80
101
|
|
81
102
|
# Implementation of spaceship operator to enable comparision
|
data/lib/nanakshahi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanakshahi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvinder Singh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|