You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/08/16 16:48:52 UTC

svn commit: r1514741 - /incubator/climate/branches/RefactorInput/ocw/dataset.py

Author: joyce
Date: Fri Aug 16 14:48:52 2013
New Revision: 1514741

URL: http://svn.apache.org/r1514741
Log:
CLIMATE-254 - Add end property

Modified:
    incubator/climate/branches/RefactorInput/ocw/dataset.py

Modified: incubator/climate/branches/RefactorInput/ocw/dataset.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/dataset.py?rev=1514741&r1=1514740&r2=1514741&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/dataset.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/dataset.py Fri Aug 16 14:48:52 2013
@@ -231,3 +231,14 @@ class Bounds(object):
             raise ValueError("Attempted to set start to invalid value")
 
         self._start = value
+
+    @property
+    def end(self):
+        return self._end
+
+    @end.setter
+    def end(self, value):
+        if not (type(value) is dt.datetime and value > self._start):
+            raise ValueError("Attempted to set end to invalid value")
+
+        self._end = value