Changeset 219


Ignore:
Timestamp:
Dec 4, 2009, 8:52:26 PM (10 years ago)
Author:
gav
Message:

Make some dates more groovy.

Location:
trunk/grails-app/services
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/TaskRecurringScheduleService.groovy

    r213 r219  
    1515        taskRecurringScheduleList.each() {
    1616
    17             if ( dateUtilService.getTomorrow() > it.nextGenerationDate) {
     17            if ( dateUtilService.tomorrow > it.nextGenerationDate) {
    1818                    def p = [:]
    1919                    p.targetStartDate = it.nextTargetStartDate
     
    7373                return fail('task', "task.operationNotPermittedOnTaskInTrash")
    7474
    75             if(result.taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.getToday())
     75            if(result.taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.today)
    7676                return fail("nextTargetStartDate", "taskRecurringSchedule.nextTargetStartDate.mayNotBePast")
    7777
     
    117117            result.taskRecurringScheduleInstance.properties = params
    118118
    119             if(result.taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.getToday())
     119            if(result.taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.today)
    120120                return fail("nextTargetStartDate", "taskRecurringSchedule.nextTargetStartDate.mayNotBePast")
    121121
  • trunk/grails-app/services/TaskSearchService.groovy

    r181 r219  
    1717            sort: params.sort,
    1818            order: params.order) {
    19                 ge("targetStartDate", dateUtilService.getToday())
     19                ge("targetStartDate", dateUtilService.today)
    2020                lt("targetStartDate", dateUtilService.getTomorrow())
    2121                eq("trash", false)
     
    3535            order: params.order) {
    3636                eq("leadPerson", Person.get(authenticateService.userDomain().id))
    37                 ge("targetStartDate", dateUtilService.getToday())
     37                ge("targetStartDate", dateUtilService.today)
    3838                lt("targetStartDate", dateUtilService.getTomorrow())
    3939                eq("trash", false)
     
    5252            sort: params.sort,
    5353            order: params.order) {
    54                 ge("targetStartDate", dateUtilService.getToday()-7)
     54                ge("targetStartDate", dateUtilService.oneWeekAgo)
    5555                lt("targetStartDate", dateUtilService.getTomorrow())
    5656                eq("trash", false)
     
    7070            order: params.order) {
    7171                eq("leadPerson", Person.get(authenticateService.userDomain().id))
    72                 ge("targetStartDate", dateUtilService.getToday()-7)
     72                ge("targetStartDate", dateUtilService.oneWeekAgo)
    7373                lt("targetStartDate", dateUtilService.getTomorrow())
    7474                eq("trash", false)
     
    8888            order: params.order) {
    8989                ne("taskType", TaskType.findByName("Unscheduled Breakin"))
    90                 ge("targetStartDate", dateUtilService.getToday()-7)
     90                ge("targetStartDate", dateUtilService.oneWeekAgo)
    9191                lt("targetStartDate", dateUtilService.getTomorrow())
    9292                eq("trash", false)
     
    106106            order: params.order) {
    107107                eq("taskType", TaskType.findByName("Unscheduled Breakin"))
    108                 ge("targetStartDate", dateUtilService.getToday()-7)
     108                ge("targetStartDate", dateUtilService.oneWeekAgo)
    109109                lt("targetStartDate", dateUtilService.getTomorrow())
    110110                eq("trash", false)
Note: See TracChangeset for help on using the changeset viewer.