[GRASS-SVN] r57469 - grass/trunk/lib/python/temporal

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Aug 18 09:20:43 PDT 2013


Author: huhabla
Date: 2013-08-18 09:20:43 -0700 (Sun, 18 Aug 2013)
New Revision: 57469

Modified:
   grass/trunk/lib/python/temporal/temporal_extent.py
Log:
Added absolute time test


Modified: grass/trunk/lib/python/temporal/temporal_extent.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_extent.py	2013-08-18 16:17:31 UTC (rev 57468)
+++ grass/trunk/lib/python/temporal/temporal_extent.py	2013-08-18 16:20:43 UTC (rev 57469)
@@ -330,6 +330,22 @@
             | End time:................... 5
             | Relative time unit:......... years
 
+
+           >>> from datetime import datetime as dt
+           >>> A = AbsoluteTemporalExtent(start_time=dt(2001,1,10), end_time=dt(2003,1,1))
+           >>> B = AbsoluteTemporalExtent(start_time=dt(2005,1,10), end_time=dt(2008,1,1))
+           >>> inter = A.disjoint_union(B)
+           >>> inter.print_info()
+            +-------------------- Absolute time -----------------------------------------+
+            | Start time:................. 2001-01-10 00:00:00
+            | End time:................... 2008-01-01 00:00:00
+
+           >>> inter = B.disjoint_union(A)
+           >>> inter.print_info()
+            +-------------------- Absolute time -----------------------------------------+
+            | Start time:................. 2001-01-10 00:00:00
+            | End time:................... 2008-01-01 00:00:00
+
            @endcoe
         """
 



More information about the grass-commit mailing list