Why %e not in time.strftime directives?

T

Tim Chase

Any special reasons?

Because it is there (at least on my Debian box)?

tim@rubbish:~$ python
Python 2.5.2 (r252:60911, May 28 2008, 08:35:32)
[GCC 4.2.4 (Debian 4.2.4-1)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
'13'

Taken from[1]

The full set of format codes supported varies across
platforms, because Python calls the platform C library's
strftime() function, and platform variations are common.

So if your underlying C implementation of strftime() supports
"%e", then Python will. My guess is that the same applies to
time.strftime as it does to datetime.strftime

The docs list ones that are fairly cross-platform. However, it
would seem that not all platforms support "%e"


-tkc


[1]
http://docs.python.org/library/datetime.html#module-datetime
 
L

Leo Jay

Because it is there (at least on my Debian box)?


But not on windows :(

tim@rubbish:~$ python
Python 2.5.2 (r252:60911, May 28 2008, 08:35:32)
[GCC 4.2.4 (Debian 4.2.4-1)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
'13'

Taken from[1]

The full set of format codes supported varies across
platforms, because Python calls the platform C library's
strftime() function, and platform variations are common.

So if your underlying C implementation of strftime() supports "%e", then
Python will. My guess is that the same applies to time.strftime as it does
to datetime.strftime

The docs list ones that are fairly cross-platform. However, it would seem
that not all platforms support "%e"


-tkc


[1]
http://docs.python.org/library/datetime.html#module-datetime
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top