Changeset 731 for trunk/grails-app


Ignore:
Timestamp:
Nov 30, 2010, 9:56:00 AM (14 years ago)
Author:
gav
Message:

Auto swap date range in TaskSearchService.getWorkLoad().

File:
1 edited

Legend:

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

    r713 r731  
    527527            result.endDate = result.startDate
    528528
    529         // Normalise date range.
    530         if(result.endDate < result.startDate)
    531             result.endDate = result.startDate
     529        // Auto swap date range.
     530        if(result.startDate > result.endDate) {
     531            def tempStartDate = result.startDate
     532            result.startDate = result.endDate
     533            result.endDate = tempStartDate
     534        }
    532535
    533536        def formattedStartDate = g.formatDate(format: "EEE, dd-MMM-yyyy", date: result.startDate)
Note: See TracChangeset for help on using the changeset viewer.