Skip to content
Browse files

adding financial months

  • Loading branch information...
1 parent c48d223 commit 8e446856e56af1760d16cb05c8fac2eb86715f52 asanghi committed Jul 25, 2009
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/rising_sun/fiscali.rb
View
7 lib/rising_sun/fiscali.rb
@@ -18,7 +18,7 @@ def fiscal_zone=(zone)
end
def fy_start_month
- read_inheritable_attribute(:start_month)
+ read_inheritable_attribute(:start_month) || FY_START_MONTH
end
def fiscal_zone
@@ -33,6 +33,11 @@ def fy_start_month=(month)
def financial_year_start(year=Date.today.year)
Date.new(year,fy_start_month,1)
end
+
+ def financial_months
+ (1..12).map{|m| ((m - 1 + fy_start_month)%12.1).ceil }
+ end
+
end
module InstanceMethods

0 comments on commit 8e44685

Please sign in to comment.
Something went wrong with that request. Please try again.