week_of_month 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/week_of_month.rb +25 -22
  2. metadata +2 -2
data/lib/week_of_month.rb CHANGED
@@ -1,23 +1,26 @@
1
+ #!/bin/env ruby
2
+ # encoding: utf-8
3
+
1
4
  require 'active_support'
2
5
  require 'active_support/core_ext/date/calculations.rb'
3
6
 
4
7
  class Date
5
8
 
6
- WEEK_IN_ENG = {1 => "First", 2 => "Second",
7
- 3 => "Third", 4 => "Fourth",
8
- 5 => "Fifth", 6 => "Sixth"}
9
+ WEEK_IN_ENG = { 1 => 'First', 2 => 'Second',
10
+ 3 => 'Third', 4 => 'Fourth',
11
+ 5 => 'Fifth', 6 => 'Sixth' }
9
12
 
10
- # WEEK_IN_FR = {1 => "First", 2 => "Second",
11
- # 3 => "Third", 4 => "Quatrième",
12
- # 5 => "Cinquième", 6 => "sixième"}
13
- #
14
- # WEEK_IN_GER = {1 => "First", 2 => "Second",
15
- # 3 => "Dritten", 4 => "Vierte",
16
- # 5 => "Fünfte", 6 => "Sechste"}
13
+ WEEK_IN_FR = { 1 => 'First', 2 => 'Second',
14
+ 3 => 'Third', 4 => 'Quatrième',
15
+ 5 => 'Cinquième', 6 => 'sixième'}
16
+
17
+ WEEK_IN_GER = { 1 => 'First', 2 => 'Second',
18
+ 3 => 'Dritten', 4 => 'Vierte',
19
+ 5 => 'Fünfte', 6 => 'Sechste'}
17
20
 
18
- # WEEK_IN_JAP = {1=>"最初",2 =>"",
19
- # 3 =>"サード",4=> "第4回",
20
- # 5 =>"第五",6=> "シックス"}
21
+ WEEK_IN_JAP = { 1=>'最初', 2 =>'',
22
+ 3 =>'サード', 4=> '第4回',
23
+ 5 =>'第五',6=> 'シックス' }
21
24
 
22
25
  def days_array
23
26
  day = self.beginning_of_month.wday
@@ -57,16 +60,16 @@ class Date
57
60
  WEEK_IN_ENG[week_of_month]
58
61
  end
59
62
 
60
- #def week_of_month_in_fr
61
- # WEEK_IN_FR[week_of_month]
62
- #end
63
+ def week_of_month_in_fr
64
+ WEEK_IN_FR[week_of_month]
65
+ end
63
66
 
64
- #def week_of_month_in_ger
65
- # WEEK_IN_GER[week_of_month]
66
- #end
67
+ def week_of_month_in_ger
68
+ WEEK_IN_GER[week_of_month]
69
+ end
67
70
 
68
- # def week_of_month_in_jap
69
- # WEEK_IN_JAP[week_of_month]
70
- # end
71
+ def week_of_month_in_jap
72
+ WEEK_IN_JAP[week_of_month]
73
+ end
71
74
 
72
75
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: week_of_month
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-25 00:00:00.000000000 Z
12
+ date: 2012-09-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport