dabo Commit
Revision 3899
Date: 2008-01-29 07:04:34 -0800 (Tue, 29 Jan 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/3899

Changed:
U   trunk/dabo/lib/dates.py

Log:
Added comments to explain why we don't use datetime.strftime(). Thanks Uwe 
Grauer
for the suggestion.


Diff:
Modified: trunk/dabo/lib/dates.py
===================================================================
--- trunk/dabo/lib/dates.py     2008-01-29 14:58:02 UTC (rev 3898)
+++ trunk/dabo/lib/dates.py     2008-01-29 15:04:34 UTC (rev 3899)
@@ -93,6 +93,7 @@
                # Delegate formatting to the time module, which will take the
                # user's locale into account.
                fmt = "%x"
+       ## note: don't use d.strftime(), as it doesn't handle < 1900
        return time.strftime(fmt, (d.year, d.month, d.day, 0, 0, 0, 0, 0, 0))
 
 
@@ -157,6 +158,7 @@
                # Delegate formatting to the time module, which will take the
                # user's locale into account.
                fmt = "%x %X"
+       ## note: don't use dt.strftime(), as it doesn't handle < 1900
        return time.strftime(fmt, (dt.year, dt.month, dt.day, dt.hour, 
dt.minute, dt.second, dt.microsecond, 0, 0))
 
 




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to