0.0
No commit activity in last 3 years
No release in over 3 years
You can simply check **what month, what year** it is by the name of the month and year. (Year is not implemented. coming soon...) This Gem was extend [Date, DateTime, Time, ActiveSupport::TimeWithZone] Show on GitHub↓ https://github.com/mah666hhh/ask_year_month
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 6.0.3, >= 6.0.3.4
 Project Readme

AskYearMonth

レシーバが何月なのか、

月名からスマートに確認できるようになります。

Date, DateTime, Time, ActiveSupport::TimeWithZoneクラスを拡張しています。


You can simply check what month, what year it is by the name of the month and year.
(Year is not implemented. coming soon...)

This Gem was extend [Date, DateTime, Time, ActiveSupport::TimeWithZone].

example

# Not beautiful...
DateTime.parse('2020-12-05').month == 12
#=> true

Time.parse('2020-03-05').month == 3
#=> true

# It's beautiful!
DateTime.parse('2020-12-05').december?
#=> true

Time.parse('2020-03-05').march?
#=> true

Methods

https://github.com/mah666hhh/ask_year_month/blob/main/lib/ask_year_month/month_name_helper.rb

Usage

How to use my plugin.

Installation

Add this line to your application's Gemfile:

gem 'ask_year_month'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ask_year_month

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.