Sha256: 84701d31d4b74c82088bcba0faa5892d4dc8d35652d443a411ae2870f632c97f

Contents?: true

Size: 243 Bytes

Versions: 12

Compression:

Stored size: 243 Bytes

Contents

class Date
  def first_of_month
    self - self.day + 1
  end
end

module Date::Etest
  def test_first_of_month
    date = Date.parse("2010/02/28")
    assert_equal Date.parse("2010/02/01"), date.first_of_month
  end
end if VEX_TEST == "base"

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vex-0.6.2 lib/vex/base/time/date_ext.rb
vex-0.4.4 lib/vex/base/time/date_ext.rb
vex-0.4.2 lib/vex/base/time/date_ext.rb
vex-0.3.3 lib/vex/base/time/date_ext.rb
vex-0.2.9 lib/vex/base/time/date_ext.rb
vex-0.2.8 lib/vex/base/time/date_ext.rb
vex-0.2.7 lib/vex/base/time/date_ext.rb
vex-0.2.6 lib/vex/base/time/date_ext.rb
vex-0.2.5 lib/vex/base/time/date_ext.rb
vex-0.2.2 lib/vex/base/time/date_ext.rb
vex-0.2.1 lib/vex/base/time/date_ext.rb
vex-0.2 lib/vex/base/time/date_ext.rb