[ZCM] [ZC] 234/ 5 Resolve "Additions to DateTime.py"
Collector: Zope Bugs and Patches ...
zope-coders@zope.org
Mon, 04 Mar 2002 10:59:50 -0500
Issue #234 Update (Resolve) "Additions to DateTime.py"
Status Resolved, Zope/feature+solution medium
To followup, visit:
http://collector.zope.org/Zope/234
==============================================================
= Resolve - Entry #5 by ajung on Mar 4, 2002 10:59 am
Status: Accepted => Resolved
The patch plus a new unittest is in the CVS trunk.
- aj
________________________________________
= Comment - Entry #4 by stevea on Feb 20, 2002 12:34 pm
FYI:
I submitted a (probably) equivalent patch to zope several months ago. I think it got lost with the demise of the old collector :-(
To test it for correctness, I compared the output of my method with that from the mxDateTime package for ISO week.
Here's the test script, and the data, that I used for this.
http://www.cat-box.net/steve/zope_iso_week.tar
Here's a PythonScript version of my iso_week method:
http://lists.zope.org/pipermail/zope-dev/2001-March/010070.html
I've also got an iso_week_to_datetime method somewhere, that I could dig up.
________________________________________
= Assign - Entry #3 by ajung on Feb 20, 2002 7:09 am
Status: Pending => Accepted
Supporters added: ajung
________________________________________
= Comment - Entry #2 by ajung on Feb 20, 2002 7:05 am
I volunteer to include it to Zope but I would like to see a
unittest for both functions and an updated documentation.
Writing unittests for both functions should be straight
forward. Please check testDateTime.py for examples. If you
have problems, contact me directly (andreas@zope.com).
- aj
________________________________________
= Request - Entry #1 by lucas on Feb 20, 2002 4:12 am
Uploaded: "addToDateTime.py"
- http://collector.zope.org/Zope/234/addToDateTime.py/view
I needed to compute the week number from a DateTime. This turns out to use the Julian Day. The algoritms implented result in week number and Julian Day according to ISO.
Wrote methods for both and added these to DateTime.py. Could you include these in the next release?
I did not write unittests because my inability to get the unittest.py to run. Probably something with environment variables. If you have a tip (or a script) to run one unittest please say so.
Regards, Lucas
==============================================================