I can't figure out a way (using class definitions) to get months ago. Seconds, days, and minutes are all fine because they're always constants. However since months isn't always constant, i need to know a way for ruby to know how many days are in the current month.
If your application uses ActiveSupport (e.g. a Rails application), you can use
3.months.ago
to get the current date less 3 months.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With