Sha256: 8168e1082d2e42b21ad9092d0cb1dbb6335fa4aa58c3af8b38aaf3176881fe8a

Contents?: true

Size: 357 Bytes

Versions: 45

Compression:

Stored size: 357 Bytes

Contents

module Rubicure
  module Concerns
    module Gengou
      refine Date do
        # Whether current date is Heisei
        def heisei?
          Date.new(1989, 1, 8) <= self && self <= Date.new(2019, 4, 30)
        end

        # Whether current date is Reiwa
        def reiwa?
          Date.new(2019, 5, 1) <= self
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
rubicure-4.0.1 lib/rubicure/concerns/gengou.rb
rubicure-4.0.0 lib/rubicure/concerns/gengou.rb
rubicure-3.3.4 lib/rubicure/concerns/gengou.rb
rubicure-3.3.3 lib/rubicure/concerns/gengou.rb
rubicure-3.3.2 lib/rubicure/concerns/gengou.rb
rubicure-3.3.1 lib/rubicure/concerns/gengou.rb
rubicure-3.3.0 lib/rubicure/concerns/gengou.rb
rubicure-3.3.0.rc2 lib/rubicure/concerns/gengou.rb
rubicure-3.3.0.rc1 lib/rubicure/concerns/gengou.rb
rubicure-3.2.6 lib/rubicure/concerns/gengou.rb
rubicure-3.2.5 lib/rubicure/concerns/gengou.rb
rubicure-3.2.4 lib/rubicure/concerns/gengou.rb
rubicure-3.2.3 lib/rubicure/concerns/gengou.rb
rubicure-3.2.2 lib/rubicure/concerns/gengou.rb
rubicure-3.2.1 lib/rubicure/concerns/gengou.rb
rubicure-3.2.0 lib/rubicure/concerns/gengou.rb
rubicure-3.2.0.rc1 lib/rubicure/concerns/gengou.rb
rubicure-3.1.5 lib/rubicure/concerns/gengou.rb
rubicure-3.1.4 lib/rubicure/concerns/gengou.rb
rubicure-3.1.3 lib/rubicure/concerns/gengou.rb