Changeset 602 for trunk/grails-app/domain
- Timestamp:
- Jun 23, 2010, 11:21:17 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/dbnp/studycapturing/Event.groovy
r572 r602 56 56 ] 57 57 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(); 61 66 } 62 67 68 69 63 70 /** 64 * get a prettified duration 71 * Get short, human readable string representing the duration between startTime and endTime 72 * 65 73 * @return String 66 74 */ 67 static def getPrettyDuration(RelTime duration) {68 return duration.toPrettyRoundedString();75 def getShortDuration() { 76 return new RelTime(startTime, endTime).toPrettyRoundedString(); 69 77 } 70 78 71 def getPrettyDuration() {72 getPrettyDuration(getDuration())73 }74 79 75 def getDurationString() {76 def d = getDuration()77 return getDuration().toPrettyString();78 }79 80 80 def getShortDuration() { 81 def d = getDuration() 82 return getDuration().toString(); 83 } 81 82 84 83 85 84 /**
Note: See TracChangeset
for help on using the changeset viewer.