[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2019-05-22 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2019-01-17 Thread Sergey Bon.
Change by Sergey Bon. : -- keywords: +patch, patch, patch pull_requests: +11294, 11295, 11296 stage: -> patch review ___ Python tracker ___

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2019-01-17 Thread Sergey Bon.
Change by Sergey Bon. : -- keywords: +patch, patch pull_requests: +11294, 11295 stage: -> patch review ___ Python tracker ___ ___

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2019-01-17 Thread Sergey Bon.
Change by Sergey Bon. : -- keywords: +patch pull_requests: +11294 stage: -> patch review ___ Python tracker ___ ___

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2018-12-24 Thread Sergey Bon.
Sergey Bon. added the comment: If %W and %U are allowed to be used without specifying the weekday by assuming it to be the first day of the week, then the same rule should apply to %V (ISO 8601 week) for consistency. -- ___ Python tracker

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2018-12-23 Thread Sergey Bon.
Sergey Bon. added the comment: Not following msg332388 would lead to this: # Sunday of the week 53 >>> datetime.strptime ('2017 Sun 53', '%Y %a %U') datetime.datetime(2017, 12, 31, 0, 0) # First day of the week 53 # oops! assumed Monday is the first day of the week but 2017 ends on Sunday

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2018-12-23 Thread Sergey Bon.
Sergey Bon. added the comment: Documentation says: %U - Week number of the year (Sunday as the first day of the week) %W - Week number of the year (Monday as the first day of the week) It wouldn't be intuitive if %U assumed Sunday when weekday provided and Monday otherwise. There are two

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2018-12-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-07-28 Thread Matheus Vieira Portela
Matheus Vieira Portela added the comment: Agreed that we should attain to ISO 8601, as it solves two questions that occurred in this thread: - According to the specification, it is clear that a week must start on Monday and end on Sunday. Hence datetime.strptime('201726', '%Y%U') could be

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-07-25 Thread Matthew Barnett
Matthew Barnett added the comment: I think the relevant standard is ISO 8601: https://en.wikipedia.org/wiki/ISO_8601 The first day of the week is Monday. Note particularly the examples it gives: Monday 29 December 2008 is written "2009-W01-1" Sunday 3 January 2010 is written

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-07-25 Thread Utkarsh Upadhyay
Utkarsh Upadhyay added the comment: @Matheus: What other languages support this? Is this (i.e. defaulting to Sunday, or Monday?) the default behavior there? -- ___ Python tracker

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-07-22 Thread Matheus Vieira Portela
Matheus Vieira Portela added the comment: Therefore, should we implement the behavior of assuming the first day of the week if none is provided or not? -- nosy: +matheus.v.portela ___ Python tracker

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-07-05 Thread Utkarsh Upadhyay
Utkarsh Upadhyay added the comment: This case is explicitly mentioned in the documentation: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior > 7. When used with the strptime() method, %U and %W are only used in > calculations when the day of the week and the

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-06-29 Thread Matthew Barnett
Matthew Barnett added the comment: Expected result is datetime.datetime(2017, 6, 25, 0, 0). -- nosy: +mrabarnett ___ Python tracker ___

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-06-29 Thread winton Wang
winton Wang added the comment: the output: datetime.datetime(2017, 1, 1, 0, 0) I question about the week format if without the week of the weekday, the datetime should be the fist day of week as the default? -- ___ Python tracker

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-06-29 Thread winton Wang
New submission from winton Wang: datetime stiptime error according to "%U" format. Python version: 3.4.3, 2.7.13 ,3.6.0, 3.5.2 from datetime import datetime input: datetime.strptime('201726', '%Y%U') output: datetime.datetime(2007, 1, 1, 0, 0) -- components: Library (Lib)