changeset 125:d8c372f57da9

nicer version of 5447fbf86c49 (two-digit lastweek string)
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 16 Jan 2012 10:00:49 +0100
parents 5447fbf86c49
children 8d533c1b6d23
files getan/contrib/zeiterfassung.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/getan/contrib/zeiterfassung.py	Mon Jan 16 09:50:43 2012 +0100
+++ b/getan/contrib/zeiterfassung.py	Mon Jan 16 10:00:49 2012 +0100
@@ -183,9 +183,7 @@
             lastweek = currentweek - 1
             if lastweek <= 0:
                 lastweek = 52
-            week = str(lastweek)
-            if lastweek < 10:
-                week = "0" + week
+            week = "%02d" % lastweek
         elif opt in ("--year", "-y"):
             year = val
         elif opt in ("--empty", "-m"):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)