Ignore:
Timestamp:
Jun 23, 2010, 11:21:17 AM (11 years ago)
Author:
jahn
Message:

Several minor changes and cleaning up related to date repsentations communicated with SAM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/Event.groovy

    r572 r602  
    5656        ]
    5757
    58         // TODO: Jahn, could you indicate in a comment why these different duration functions exist?
    59         def getDuration() {
    60                 return new RelTime(startTime, endTime);
     58
     59        /**
     60         * Get extended, human readable string representing the duration between startTime and endTime
     61     *
     62         * @return String
     63         */
     64        def getDurationString() {
     65                return new RelTime(startTime, endTime).toPrettyRoundedString();
    6166        }
    6267
     68
     69
    6370        /**
    64          * get a prettified duration
     71         * Get short, human readable string representing the duration between startTime and endTime
     72     *
    6573         * @return String
    6674         */
    67         static def getPrettyDuration(RelTime duration) {
    68                 return duration.toPrettyRoundedString();
     75        def getShortDuration() {
     76                return new RelTime(startTime, endTime).toPrettyRoundedString();
    6977        }
    7078
    71         def getPrettyDuration() {
    72                 getPrettyDuration(getDuration())
    73         }
    7479
    75         def getDurationString() {
    76                 def d = getDuration()
    77                 return getDuration().toPrettyString();
    78         }
    7980
    80         def getShortDuration() {
    81                 def d = getDuration()
    82                 return getDuration().toString();
    83         }
     81
     82
    8483
    8584        /**
Note: See TracChangeset for help on using the changeset viewer.