Skip to content

Instantly share code, notes, and snippets.

@kv109
Created October 13, 2010 14:30
Show Gist options
  • Save kv109/624131 to your computer and use it in GitHub Desktop.
Save kv109/624131 to your computer and use it in GitHub Desktop.
How to get the last day of the month
class Time
def last_month_day
Date.new(self.year, self.mon, -1).day
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment