Sha256: 4cb7f1542c0ff50f9dede48f4b1173983ad10c437a08387d89b85bb6b67a784b

Contents?: true

Size: 355 Bytes

Versions: 8

Compression:

Stored size: 355 Bytes

Contents

module Hiccup
  module CoreExtensions
    module Date



      def get_nth_wday_of_month
        (day - 1) / 7 + 1
      end

      def get_nth_wday_string
        "#{get_nth_wday_of_month} #{::Date::DAYNAMES[wday]}"
      end



    end
  end
end

Date.send     :include, Hiccup::CoreExtensions::Date
DateTime.send :include, Hiccup::CoreExtensions::Date

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hiccup-0.6.1 lib/hiccup/core_ext/date.rb
hiccup-0.6.0 lib/hiccup/core_ext/date.rb
hiccup-0.5.20 lib/hiccup/core_ext/date.rb
hiccup-0.5.19 lib/hiccup/core_ext/date.rb
hiccup-0.5.18 lib/hiccup/core_ext/date.rb
hiccup-0.5.17 lib/hiccup/core_ext/date.rb
hiccup-0.5.16 lib/hiccup/core_ext/date.rb
hiccup-0.5.15 lib/hiccup/core_ext/date.rb