# HG changeset patch # User Ingo Weinzierl # Date 1328107430 0 # Node ID 2e6f0ef36352b35fbb6feef8e9cea208c10863f8 # Parent 53d954973610ce61031ce4ca089ec75fdfbd0618 Added a new constructor to Timerange that takes Date objects for start and end. flys-artifacts/trunk@3867 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 53d954973610 -r 2e6f0ef36352 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Wed Feb 01 14:07:38 2012 +0000 +++ b/flys-artifacts/ChangeLog Wed Feb 01 14:43:50 2012 +0000 @@ -1,3 +1,8 @@ +2012-02-01 Ingo Weinzierl + + * src/main/java/de/intevation/flys/artifacts/model/Timerange.java: Added a + new constructor that takes Date objects for start and end time. + 2012-02-01 Sascha L. Teichmann * src/main/java/de/intevation/flys/artifacts/model/W.java: diff -r 53d954973610 -r 2e6f0ef36352 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Timerange.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Timerange.java Wed Feb 01 14:07:38 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Timerange.java Wed Feb 01 14:43:50 2012 +0000 @@ -2,6 +2,8 @@ import java.io.Serializable; +import java.util.Date; + /** * This class represents time ranges specified by start and end time. Start and @@ -21,6 +23,12 @@ } + public Timerange(Date start, Date stop) { + this.start = start.getTime(); + this.end = stop != null ? stop.getTime() : System.currentTimeMillis(); + } + + public long getStart() { return start; }