asanghi-fiscali 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.6
1
+ 1.1.7
data/fiscali.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{fiscali}
5
- s.version = "1.1.6"
5
+ s.version = "1.1.7"
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"]
9
- s.date = %q{2009-07-24}
9
+ s.date = %q{2009-07-25}
10
10
  s.email = %q{aditya.sanghi@risingsunbilling.com}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
@@ -29,6 +29,10 @@ module RisingSun
29
29
  write_inheritable_attribute(:zone, nil)
30
30
  write_inheritable_attribute(:start_month,month)
31
31
  end
32
+
33
+ def financial_year_start(year=Date.today.year)
34
+ Date.new(year,fy_start_month,1)
35
+ end
32
36
  end
33
37
 
34
38
  module InstanceMethods
data/test/fiscali_test.rb CHANGED
@@ -9,6 +9,10 @@ class FiscaliTest < ActiveSupport::TestCase
9
9
  assert_equal(Date.fy_start_month,2)
10
10
 
11
11
  Date.fiscal_zone = :india
12
+
13
+ d = Date.financial_year_start(2009)
14
+ assert_equal(d,Date.new(2009,4,1),'Financial Year start not correct')
15
+
12
16
  d = Date.new(2009,1,1)
13
17
  assert_equal(d.financial_year,2008,'Financial Year is not correct')
14
18
  assert_equal(d.beginning_of_financial_year,Date.new(2008,4,1),'Beginning of FY is not correct')
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.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditya Sanghi
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-24 00:00:00 -07:00
12
+ date: 2009-07-25 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency