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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a16c63017d3800b68445b86d217e1d65c0f79c30a954b684475685f57cf675e
4
- data.tar.gz: 1fa1b6e9839b47b5c1d235914d5abdf704d2abc18af3931dd3f15b9751f957f1
3
+ metadata.gz: 8a4b9b87997817f14b8956daafa1db89fefeb156908acc9d1a049fdfb340c8de
4
+ data.tar.gz: 3dec3e4ce5a11dc3d178cd144ed8e14718562bdbbc6de16a7d097b6447848534
5
5
  SHA512:
6
- metadata.gz: 876a90cf79e4b21f2395356e8cc66cde1dca7f94d6380da67f32e0a329b7dbbeb79391b660030d592602106bde549e870c16ae4b146ef4c1785320752d1eceb3
7
- data.tar.gz: 0b8967a44f0293285928414f3531d8ba2ef90059c23d8c088592390b89d4805312431dfdb30fc0ed19952b1adbc8ca254735081671c06ee17516b2f528bc493e
6
+ metadata.gz: 67285f1557bc0af5d67921f81c57a3c390318805499bbc91d71869f32f8e305284b2e6fd7cc319c00f9e9038d25314ae26ab09e77b18f030f243f3a98211f416
7
+ data.tar.gz: 60900964a7462ee2a6fb025cad136f269cc81f59d84fb7077ca1713c806507c5ecd213d0ab6ef7350b27c8f125b96ceea0d58fb79fac4e95b1d771807c1dc215
@@ -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
- month_names:
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
@@ -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
- month_names:
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
@@ -1,3 +1,3 @@
1
1
  class Nanakshahi
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-10 00:00:00.000000000 Z
11
+ date: 2019-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler