MagicNumbers
Dependency :
compile ":magic-numbers:0.2.3"
Summary
Installation
grails install-plugin magic-numbers
Description
MagicNumbers Plugin
Author: Bjoern Wilmsmann, MetaSieveThis plugin adds numerous time calculation convenience methods to both the Integer and Long classes.Usage
This 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:2.minutes 1.hour 4.weeks 2.months.fromNow 6.years.ago 3.fortnights.ago.toDate() 640.kilobytes
- seconds
- minutes
- hours
- days
- weeks
- fortnights
- months
- fromNow
- ago
- kilobytes
- megabytes
- gigabytes
- terabytes
- petabytes
- exabytes
- toDate()
- toSeconds()
- ordinalize()
- '1st' for 1.ordinalize()
- '2nd' for 2.ordinalize()
- '105th' for 105.ordinalize()