[Formed-commits] r299 - in trunk: . formed/formed/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Dec 4 11:39:23 CET 2008
Author: teichmann
Date: 2008-12-04 11:39:22 +0100 (Thu, 04 Dec 2008)
New Revision: 299
Modified:
trunk/ChangeLog
trunk/formed/formed/model/expr.py
Log:
Expr: Added 'today' which pushes the current date on the stack.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-12-03 11:43:43 UTC (rev 298)
+++ trunk/ChangeLog 2008-12-04 10:39:22 UTC (rev 299)
@@ -1,3 +1,8 @@
+2008-12-04 Sascha L. Teichmann <teichmann at intevation.de>
+
+ * formed/formed/model/expr.py: Added 'today' which pushes the current date
+ on the stack.
+
2008-12-03 Sascha L. Teichmann <teichmann at intevation.de>
* formed/formed/plugins/web/controllers.py: compute changeset more correctly in
Modified: trunk/formed/formed/model/expr.py
===================================================================
--- trunk/formed/formed/model/expr.py 2008-12-03 11:43:43 UTC (rev 298)
+++ trunk/formed/formed/model/expr.py 2008-12-04 10:39:22 UTC (rev 299)
@@ -131,6 +131,9 @@
day = stack.pop()
stack.append(date(year, month, day))
+ def _TODAY(self):
+ self.stack.append(date.today())
+
def _TYPE(self):
stack = self.stack
stack.append(type(stack.pop()))
@@ -153,7 +156,6 @@
stack = self.stack
stack.append(abs(stack.pop()))
-
def _QUESTION(self):
stack = self.stack
q = stack.pop()
@@ -199,6 +201,7 @@
'type': _TYPE,
'DUP': _DUP,
'date': _DATE,
+ 'today': _TODAY,
#'=': _ASSIGN,
'?': _QUESTION,
}
More information about the Formed-commits
mailing list