grails install-plugin magic-numbers
MagicNumbers PluginAuthor: Bjoern Wilmsmann, MetaSieveThis plugin adds numerous time calculation convenience methods to both the Integer and Long classes.
UsageThis plugin is inspired by Ruby on Rails' ActiveSupport library.It adds several time and byte calculation methods that for example allow you to do cool things like:
The following fields have been added:
2.minutes 1.hour 4.weeks 2.months.fromNow 6.years.ago 3.fortnights.ago.toDate() 640.kilobytes
- '1st' for 1.ordinalize()
- '2nd' for 2.ordinalize()
- '105th' for 105.ordinalize()