[Scipy-svn] r2868 - trunk/Lib/sandbox/timeseries

scipy-svn@scip... scipy-svn@scip...
Fri Mar 23 10:00:27 CDT 2007


Author: mattknox_ca
Date: 2007-03-23 10:00:24 -0500 (Fri, 23 Mar 2007)
New Revision: 2868

Modified:
   trunk/Lib/sandbox/timeseries/tdates.py
Log:
added qyear property to DateArray

Modified: trunk/Lib/sandbox/timeseries/tdates.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tdates.py	2007-03-23 14:59:50 UTC (rev 2867)
+++ trunk/Lib/sandbox/timeseries/tdates.py	2007-03-23 15:00:24 UTC (rev 2868)
@@ -269,6 +269,15 @@
         "Returns the year."
         return self.__getdateinfo__('Y')
     @property
+    def qyear(self):
+        """For quarterly frequency dates, returns the year corresponding to the
+year end (start) month. When using QTR or QTR-E based quarterly
+frequencies, this is the fiscal year in a financial context.
+
+For non-quarterly dates, this simply returns the year of the date."""
+
+        return self.__getdateinfo__('F')
+    @property
     def second(self):
         "Returns the seconds."
         return self.__getdateinfo__('S')



More information about the Scipy-svn mailing list