expanded_date 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -55,8 +55,7 @@ class Date
55
55
  end
56
56
 
57
57
  def end_of_month
58
- d = next_month
59
- self::class.civil(d.year, d.month, 1)-1
58
+ self.beginning_of_next_month-1
60
59
  end
61
60
 
62
61
  def beginning_of_month
@@ -40,6 +40,10 @@ class Datetest < Test::Unit::TestCase
40
40
  def test_end_of_month
41
41
  assert_equal("2000-02-29", Date.parse("2000-02-13").end_of_month.to_s)
42
42
  assert_equal("2001-02-28", Date.parse("2001-02-13").end_of_month.to_s)
43
+ assert_equal("2006-09-30", Date.parse("2006-09-01").end_of_month.to_s)
44
+ assert_equal("2006-09-30", Date.parse("2006-09-30").end_of_month.to_s)
45
+ assert_equal("2006-10-31", Date.parse("2006-10-01").end_of_month.to_s)
46
+ assert_equal("2006-10-31", Date.parse("2006-10-31").end_of_month.to_s)
43
47
  end
44
48
 
45
49
  def test_beginning_of_month
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: expanded_date
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
7
- date: 2006-07-20 00:00:00 +02:00
6
+ version: 0.2.1
7
+ date: 2006-11-07 00:00:00 +01:00
8
8
  summary: Adds extra functionality to date, such as .yesterday, .next_week, .end_of_next_month, .beginning_of_prev_month ... and the like
9
9
  require_paths:
10
10
  - lib
@@ -32,7 +32,7 @@ files:
32
32
  - lib/expanded_date.rb
33
33
  - license.txt
34
34
  test_files:
35
- - test/datetest.rb
35
+ - test/expanded_date_test.rb
36
36
  rdoc_options: []
37
37
 
38
38
  extra_rdoc_files: