Changeset 474 for trunk/grails-app/services/DateUtilService.groovy
- Timestamp:
- Mar 31, 2010, 1:42:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/DateUtilService.groovy
r214 r474 77 77 78 78 /** 79 * Get the date one month in the future. 80 * @param date The Date object to start with. 81 * @returns A Date object one month in the future. 82 */ 83 public static Date getNextMonth(Date date) { 84 use(TimeCategory) { 85 date + 1.months 86 } 87 } 88 89 /** 90 * Get the date one month ago. 91 * @param date The Date object to start with. 92 * @returns A Date object one month ago. 93 */ 94 public static Date getPreviousMonth(Date date) { 95 use(TimeCategory) { 96 date - 1.months 97 } 98 } 99 100 /** 79 101 * Make a date object from supplied year, month, day values. 80 102 * The Calendar.getInstance() or Calendar.instance factory returns a new calendar instance, usually
Note: See TracChangeset
for help on using the changeset viewer.