[issue14423] Getting the starting date of iso week from a week number and a year.

2015-10-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am rejecting this in favor of #12006. -- resolution: -> rejected status: open -> closed superseder: -> strptime should implement %G, %V and %u directives ___ Python tracker

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-06-15 Thread Erik Cederstrand
Erik Cederstrand added the comment: I would like to point out that http://bugs.python.org/issue12006 provides a solution (including patches) based on %G%, V and %u directives for use in strptime()/strftime(). These directives are defined in (FreeBSD) libc, and PHP has them, too. I think the

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-22 Thread Esben Agerbæk Black
Esben Agerbæk Black added the comment: I somehow re-uploaded an old patch, this one contains buggy c-code, but fixes the python implementation. Any pointers to how to get started on the c bi would be greatly appreciated. -- Added file: http://bugs.python.org/file25306/isodates.patch _

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Mark Dickinson wrote: > > By the way, I don't think the algorithm used in the current patch is correct. > For 'date.from_iso_week(2009, 1)' I get 2009/1/1, which was a Thursday. The > documentation seems to indicate that a Monday should be returned. Tr

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: By the way, I don't think the algorithm used in the current patch is correct. For 'date.from_iso_week(2009, 1)' I get 2009/1/1, which was a Thursday. The documentation seems to indicate that a Monday should be returned. -- _

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: > Ok so now i only get errors for "_Fast" tests > am I correct in assuming that this is because i lack a C implementation? If your errors look like the one below, then yes. == ERROR: test_fro

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-19 Thread Esben Agerbæk Black
Esben Agerbæk Black added the comment: >> 2) I get errors for all my test when I build "my" python and run >> "./python.exe -m test.datetimetester -j3" >> I asume this is because I have yet to implement the c version in >> Modules/_datetimemodule.c >> is this the correct assumption? >Yo

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 1) Yes I agree, your solution is somewhat more concise, I have corrected > the code accordingly. > 2) I get errors for all my test when I build "my" python and run > "./python.exe -m test.datetimetester -j3" > I asume this is because I have yet to implemen

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-10 Thread Esben Agerbæk Black
Esben Agerbæk Black added the comment: 1) Yes I agree, your solution is somewhat more concise, I have corrected the code accordingly. 2) I get errors for all my test when I build "my" python and run "./python.exe -m test.datetimetester -j3" I asume this is because I have yet to implement the

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Apr 10, 2012 at 6:44 AM, Antoine Pitrou wrote: > It's so easy that the patch isn't a one-liner and it seems to still have > bugs wrt. intended behaviour. Unless I miss something, the inverse to isocalendar() is simply from datetime import * def

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > No, but it is still a one-line function that those who need it can > easily implement. It's so easy that the patch isn't a one-liner and it seems to still have bugs wrt. intended behaviour. > I am on the fence here because we already have > date.isocalenda

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-10 Thread Esben Agerbæk Black
Esben Agerbæk Black added the comment: I believe that it is a good solution to have, for lack of a better term; bi-directional features so in my opinion .isocalendar() merits having a constructor that takes an ISO format. Sadly no :-( I looked it over once more and it seems there is an error w

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-10 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Apr 9, 2012 at 7:28 PM, Marc-Andre Lemburg wrote: > You don't really expect anyone to remember such rules, do you ? :-) No, but it is still a one-line function that those who need it can easily implement. I am on the fence here because we alread

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Mon, Apr 9, 2012 at 6:20 PM, Marc-Andre Lemburg > wrote: >> Which is wrong, since the start of the first ISO week of a year >> can in fact start in the preceeding year... > >

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Apr 9, 2012 at 6:56 PM, Antoine Pitrou wrote: > This is all a bit moot since we don't have a "relativedelta" in the > stdlib. It is still worthwhile to see how it is done elsewhere. So far, we have dateutil that does not have this function and m

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hmm, the dateutil documentation seems to imply that relativedelta > takes care of this: This is all a bit moot since we don't have a "relativedelta" in the stdlib. I think the two questions here are: - is this feature desirable? I think the answer is "yes" -

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Apr 9, 2012 at 6:20 PM, Marc-Andre Lemburg wrote: > Which is wrong, since the start of the first ISO week of a year > can in fact start in the preceeding year... Hmm, the dateutil documentation seems to imply that relativedelta takes care of this

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > Before you invest in a C version, let's discuss whether this feature is > desirable. The proposed function implements a very simple and not very > common calculation. Note tha

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Before you invest in a C version, let's discuss whether this feature is desirable. The proposed function implements a very simple and not very common calculation. Note that even dateutil does not provide direct support for this: you are instructed to

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some comments: - you also need to modify the C version in Modules/_datetimemodule.c (make sure the tests exercise both versions!) - the doc needs a "versionadded" tag - I don't understand this: +if self.isocalendar()[1] != 1: +if self.wee

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-08 Thread Esben Agerbæk Black
Changes by Esben Agerbæk Black : Added file: http://bugs.python.org/file25157/isodates.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-31 Thread Esben Agerbæk Black
Changes by Esben Agerbæk Black : Added file: http://bugs.python.org/file25079/isodates.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo, lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-28 Thread Esben Agerbæk Black
Esben Agerbæk Black added the comment: Patch updated with tests and documentation -- Added file: http://bugs.python.org/file25059/isodates.patch ___ Python tracker ___ _

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-28 Thread R. David Murray
Changes by R. David Murray : -- keywords: +needs review nosy: +belopolsky stage: -> patch review versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.4 ___ Python tracker __

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-28 Thread Esben Agerbæk Black
Esben Agerbæk Black added the comment: Patch updated with sanity checks. -- Added file: http://bugs.python.org/file25056/isodates.patch ___ Python tracker ___ __

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-27 Thread Esben Agerbæk Black
Changes by Esben Agerbæk Black : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-27 Thread Esben Agerbæk Black
Esben Agerbæk Black added the comment: I have made a patch as per the "Lifecycle of a patch" quick guide. (http://docs.python.org/devguide/patch.html#lifecycle-of-a-patch) -- keywords: +patch Added file: http://bugs.python.org/file25048/isodates.patch __

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-27 Thread Esben Agerbæk Black
Changes by Esben Agerbæk Black : Removed file: http://bugs.python.org/file25040/weekdate.py ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-27 Thread Esben Agerbæk Black
Changes by Esben Agerbæk Black : -- hgrepos: -117 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-03-27 Thread Esben Agerbæk Black
New submission from Esben Agerbæk Black : An enhancement request to make available the date of the first iso weekday of any week of any year. -- files: weekdate.py hgrepos: 117 messages: 156913 nosy: Esben.Agerbæk.Black priority: normal severity: normal status: open title: Getting the s