asanghi-fiscali 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
data/fiscali.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{fiscali}
5
- s.version = "1.2.1"
5
+ s.version = "1.2.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Aditya Sanghi"]
@@ -18,7 +18,7 @@ module RisingSun
18
18
  end
19
19
 
20
20
  def fy_start_month
21
- read_inheritable_attribute(:start_month)
21
+ read_inheritable_attribute(:start_month) || FY_START_MONTH
22
22
  end
23
23
 
24
24
  def fiscal_zone
@@ -33,6 +33,11 @@ module RisingSun
33
33
  def financial_year_start(year=Date.today.year)
34
34
  Date.new(year,fy_start_month,1)
35
35
  end
36
+
37
+ def financial_months
38
+ (1..12).map{|m| ((m - 1 + fy_start_month)%12.1).ceil }
39
+ end
40
+
36
41
  end
37
42
 
38
43
  module InstanceMethods
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asanghi-fiscali
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditya Sanghi