Skip to content

Instantly share code, notes, and snippets.

@mokolabs
Forked from notch8/snippet.rb
Created July 2, 2010 21:32
Show Gist options
  • Save mokolabs/461936 to your computer and use it in GitHub Desktop.
Save mokolabs/461936 to your computer and use it in GitHub Desktop.
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
@bensie
Copy link

bensie commented Jul 3, 2010

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