Thanks to Colin Bartlett's awesome contribution to the taco_tuesday
gem version 0.2.0
has been released!
In 0.2.0
you can now run ๐ฎ? on Date and Time classes to know if it's a Taco Tuesday.
require 'taco_tuesday' # May 26th 2020 is a Tuesday tuesday = Date.new(2020, 5, 26) tuesday.taco_tuesday? #=> true tuesday.๐ฎ? #=> true # May 25th 2020 is a Monday monday = Date.new(2020, 5, 25) monday.taco_tuesday? #=> false monday.๐ฎ? #=> false # Check if today is Taco Tuesday Date.today.taco_tuesday? #=> Same result as Date.today.tuesday? Date.today.๐ฎ? #=> Same result as Date.today.taco_tuesday?
Or with the Time class:
require 'taco_tuesday' # May 26th 2020 is a Tuesday tuesday = Time.new(2020, 5, 26) tuesday.taco_tuesday? #=> true tuesday.๐ฎ? #=> true # May 25th 2020 is a Monday monday = Time.new(2020, 5, 25) monday.taco_tuesday? #=> false monday.๐ฎ? #=> false # Check if today is Taco Tuesday Time.now.taco_tuesday? #=> Same result as Time.now.tuesday? Time.now.๐ฎ? #=> Same result as Time.now.taco_tuesday?
With the power of both taco_tuesday?
AND ๐ฎ?
you and your ruby apps are sure to never miss another Taco Tuesday!
Top comments (0)