Ezio Melotti added the comment:

> Also, using %4Y seems to consistently produce zero-padded values across
> different platforms.

Actually I was wrong.  Based on some more testing I did on Linux and Windows 8 
and the previous comments in this thread, it seems that, with 1 as year:
* '%4Y' does produces '0001' on Linux but gives a value error on Windows and 
'4Y' on OS X;
* '%Y' produces '1' on Linux and '0001' on Windows and OS X;

So the problem is only on Linux and only with years <1000, where to have a 
zero-padded value %4Y can be used instead.
I don't know if these results are true for all versions of Linux/Win/OSX, so 
the note could just say that:
1) some platforms (e.g. Linux) don't zero-pad years <1000;
2) some platforms (e.g. Linux) support %4Y to add padding, but this doesn't 
work on other platforms.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13305>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to