Package groovy.time

Class TimeCategory


  • public class TimeCategory
    extends Object
    Apply a number of methods to allow convenient Date/Time manipulation,such as:
     use (groovy.time.TimeCategory) {
         // application on numbers:
         println 1.minute.from.now
         println 10.hours.ago
    
         // application on dates
         def someDate = new Date()
         println someDate - 3.months
     }
     
    See Also:
    BaseDuration
    • Constructor Detail

      • TimeCategory

        public TimeCategory()