-
-
Save mokolabs/461936 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def next_meeting(now=1.day.from_now) | |
if Chronic.parse("1st thursday of this month", :context => :past, :now => now) | |
return Chronic.parse('1st thursday of next month', :now => now) | |
else | |
return Chronic.parse("1st thursday of this month", :now => now) | |
end | |
end |
Just checked out that gem, never used it before. Very cool.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice, way better.