Index: /trunk/grails-app/domain/InventoryMovement.groovy
===================================================================
--- /trunk/grails-app/domain/InventoryMovement.groovy	(revision 209)
+++ /trunk/grails-app/domain/InventoryMovement.groovy	(revision 210)
@@ -1,4 +1,2 @@
-import java.text.SimpleDateFormat
-
 class InventoryMovement {
     InventoryItem inventoryItem
@@ -19,6 +17,5 @@
 
     String toString() {
-        def date = new SimpleDateFormat("EEE, dd-MMM-yyyy").format(this.date)
-        "${this.quantity} ${inventoryMovementType.name} on ${date}"
+        "${this.quantity} ${inventoryMovementType.name} on ${date.format('EEE, dd-MMM-yyyy')}"
     }
 }
Index: /trunk/grails-app/domain/TaskModification.groovy
===================================================================
--- /trunk/grails-app/domain/TaskModification.groovy	(revision 209)
+++ /trunk/grails-app/domain/TaskModification.groovy	(revision 210)
@@ -1,4 +1,2 @@
-import java.text.SimpleDateFormat
-
 class TaskModification {
     Person person
@@ -19,6 +17,5 @@
 
     String toString() {
-        def date = new SimpleDateFormat("EEE, dd-MMM-yyyy").format(this.date)
-        "${taskModificationType} on ${date} by ${person}."
+        "${taskModificationType} on ${date.format('EEE, dd-MMM-yyyy')} by ${person}."
     }
 }
Index: /trunk/grails-app/domain/TaskRecurringSchedule.groovy
===================================================================
--- /trunk/grails-app/domain/TaskRecurringSchedule.groovy	(revision 209)
+++ /trunk/grails-app/domain/TaskRecurringSchedule.groovy	(revision 210)
@@ -1,3 +1,4 @@
 import org.codehaus.groovy.runtime.TimeCategory
+// the above will be deprecated and replaced by: groovy.time.TimeCategory
 
 class TaskRecurringSchedule {
Index: /trunk/grails-app/services/CreateDataService.groovy
===================================================================
--- /trunk/grails-app/services/CreateDataService.groovy	(revision 209)
+++ /trunk/grails-app/services/CreateDataService.groovy	(revision 210)
@@ -11,4 +11,5 @@
     def personService
     def taskService
+    def dateUtilService
 
 /*******************************************
@@ -507,5 +508,5 @@
                 description:"Check specific level sensor",
                 comment:"Has been noted as problematic, try recalibrating.",
-                targetStartDate:new Date()]
+                targetStartDate: dateUtilService.today]
 
         taskResult = taskService.create(p)
@@ -518,5 +519,5 @@
                 description:"Some follow-up work",
                 comment:"Some help required",
-                targetStartDate:new Date()+1,
+                targetStartDate: dateUtilService.tomorrow,
                 parentTask: Task.get(1)]
 
@@ -530,5 +531,5 @@
                 description:"A Sub Task can be created by setting the Parent Task value",
                 comment:"Some help required",
-                targetStartDate:new Date()-1,
+                targetStartDate: dateUtilService.yesterday,
                 parentTask: Task.get(1)]
 
@@ -542,5 +543,5 @@
                  description:"Replace sensor at next opportunity.",
                  comment:"Nothing else has worked.",
-                targetStartDate:new Date()+7,
+                targetStartDate: dateUtilService.oneWeekFromNow,
                 parentTask: Task.get(1)]
 
@@ -554,5 +555,5 @@
                  description:"Production Report",
                  comment:"Production report for specific production run or shift",
-                targetStartDate:new Date()-6]
+                targetStartDate: dateUtilService.today - 6]
 
         taskResult = taskService.create(p)
@@ -565,5 +566,5 @@
                  description:"This is a recurring task",
                  comment:"If there is a parent task specified then this is a generated sub task, if there is a recurring schedule specified then this is a parent task.",
-                targetStartDate:new Date()]
+                targetStartDate: dateUtilService.today]
 
         taskResult = taskService.create(p)
@@ -647,5 +648,5 @@
                                                                                                     recurEvery: 1,
                                                                                                     recurPeriod: Period.get(2),
-                                                                                                    nextTargetStartDate: new Date(),
+                                                                                                    nextTargetStartDate: dateUtilService.today,
                                                                                                     generateAhead: 1,
                                                                                                     taskDuration: 2,
@@ -658,5 +659,5 @@
                                                                                                     recurEvery: 1,
                                                                                                     recurPeriod: Period.get(1),
-                                                                                                    nextTargetStartDate: new Date(),
+                                                                                                    nextTargetStartDate: dateUtilService.today,
                                                                                                     generateAhead: 1,
                                                                                                     taskDuration: 1,
Index: /trunk/grails-app/services/DateUtilService.groovy
===================================================================
--- /trunk/grails-app/services/DateUtilService.groovy	(revision 209)
+++ /trunk/grails-app/services/DateUtilService.groovy	(revision 210)
@@ -1,2 +1,11 @@
+import org.codehaus.groovy.runtime.TimeCategory
+// the above will be deprecated and replaced by: groovy.time.TimeCategory
+/// @todo: consider moving this to org.gnumims.DateUtil
+/// pros: easy to use in domain classes.
+/// cons: have to import so pulls in all referenced imports? Injection probably does that anyway.
+
+/**
+* Provides some convenience methods for working with dates.
+*/
 class DateUtilService {
 
@@ -4,20 +13,65 @@
     //static scope = "request"
 
+    /**
+    * Get the start of today.
+     * Can be call as dateUtilService.today or dateUtilService.getToday().
+     * @returns A Date object with today's date and all time fields set to 0.
+    */
     public static Date getToday() {
-        return setMidnight(new Date())
+        return getMidnight(new Date())
     }
 
+    /**
+    * Get the start of tomorrow.
+     * Can be call as dateUtilService.tomorrow or dateUtilService.getTomorrow().
+     * @returns A Date object with tomorrow's date and all time fields set to 0.
+    */
     public static Date getTomorrow() {
         return (getToday() + 1) as Date
     }
 
-    public static Date setMidnight(Date theDate) {
-        Calendar cal = Calendar.getInstance()
-        cal.setTime(theDate)
+    /**
+    * Get the start of yesterday.
+     * Can be call as dateUtilService.yesterday or dateUtilService.getYesterday().
+     * @returns A Date object with yesterday's date and all time fields set to 0.
+    */
+    public static Date getYesterday() {
+        return (getToday() - 1) as Date
+    }
+
+    /**
+    * Get the start of the day one week ago.
+     * Can be call as dateUtilService.oneWeekAgo or dateUtilService.getOneWeekAgo().
+     * @returns A Date object with the date one week ago and all time fields set to 0.
+    */
+    public static Date getOneWeekAgo() {
+        return (getToday() - 7) as Date
+    }
+
+    /**
+    * Get the start of the day one week ago.
+     * Can be call as dateUtilService.oneWeekAgo or dateUtilService.getOneWeekAgo().
+     * @returns A Date object with the date one week ago and all time fields set to 0.
+    */
+    public static Date getOneWeekFromNow() {
+        return (getToday() + 7) as Date
+    }
+
+    /**
+    * Get the start of a given date by setting all time fields to 0.
+    * The Calendar.getInstance() or Calendar.instance factory returns a new calendar instance, usually
+    * a Gregorian calendar but using Calendar we don't have to worry about those details.
+    * The time fields are then set to zero and cal.getTime() or cal.time returns a java.util.Date object.
+    * @param date The Date object to start with.
+    * @returns A Date object having the given date and all time fields set to 0, so the very start of the given day.
+    */
+    public static Date getMidnight(Date date) {
+        Calendar cal = Calendar.instance
+        cal.setTime(date)
         cal.set(Calendar.HOUR_OF_DAY, 0)
         cal.set(Calendar.MINUTE, 0)
         cal.set(Calendar.SECOND, 0)
         cal.set(Calendar.MILLISECOND, 0)
-        cal.getTime()
+        cal.time
     }
 
