[issue3173] external strftime for Python?

2014-06-29 Thread Alexander Belopolsky

Changes by Alexander Belopolsky alexander.belopol...@gmail.com:


--
assignee: belopolsky - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2013-09-16 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2012-10-02 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2012-06-18 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

IANA is now distributing Olson's timezone database software which includes an 
implementation of strftime():

http://www.iana.org/time-zones/repository/releases/tzcode2012b.tar.gz

The code was designated as public domain by Arthur David Olson, but it seems to 
be based on code copyrighted by UCB and distributed under the BSD license.  The 
code does seem to include some locale support.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-11-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Maybe rather than spending the effort maintaining a legacy API such as 
 strftime, someone could
 look into implementing localized date formatting as defined by recent Unicode 
 standards:
 http://unicode.org/reports/tr35/#Date_Format_Patterns

This scheme is very elegant.  I’d love to have built-in/stdlib support for it.  
Would it need to be implemented in C?

 Apparently there is a free implementation for Python out there:
 http://babel.edgewall.org/wiki/Documentation/dates.html#pattern-syntax

Babel just rocks :)

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-10-31 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-01-06 Thread Eric Smith

Changes by Eric Smith e...@trueblade.com:


--
nosy: +eric.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-01-06 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Maybe rather than spending the effort maintaining a legacy API such as 
strftime, someone could look into implementing localized date formatting as 
defined by recent Unicode standards:

http://unicode.org/reports/tr35/#Date_Format_Patterns

Apparently there is a free implementation for Python out there:

http://babel.edgewall.org/wiki/Documentation/dates.html#pattern-syntax

See also msg107236 on issue #8913.

--
versions: +Python 3.3 -Python 3.0

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-01-06 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

I think we're stuck with strftime for quite a while, no matter how ugly it is. 
datetime.__format__ uses it, for example. Although maybe it's possible to write 
an strftime-format to new-format translator.

If we're going to take this on (re-writing strftime), I think the way to do it 
is to have it take the locale info as a parameter, and if that parameter is 
NULL then look up the info in the current locale. It looks like it's still a 
problem to find all of the info in the locale on all platforms, though. Finding 
the locale info is no doubt the tricky part, as someone said.

I agree it would be easier to write this from scratch rather than track down 
the licensing on the existing patch. As it is, there's just not much code there.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-01-06 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Thu, Jan 6, 2011 at 2:56 PM, Eric Smith rep...@bugs.python.org wrote:
..
 If we're going to take this on (re-writing strftime), I think the way to do 
 it is to have it take the locale info as a
 parameter, and if that parameter is NULL then look up the info in the current 
 locale.

You may want to take a look at BSD-ish strftime_l function which is
defined by POSIX.1-2008:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-01-06 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

On Thu, Jan 6, 2011 at 11:56 AM, Eric Smith rep...@bugs.python.org wrote:
 If we're going to take this on (re-writing strftime), I think the way to do 
 it is to have it take the locale info as a parameter, and if that parameter 
 is NULL then look up the info in the current locale. It looks like it's still 
 a problem to find all of the info in the locale on all platforms, though. 
 Finding the locale info is no doubt the tricky part, as someone said.

Hm, shouldn't the libc locale support offer the same set of locales
and locale info that the libc strftime uses, on any platform? Or are
there platforms whose libc strftime has better locale support than the
libc getlocale implementation???

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-01-06 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

The Qt library has its own strftime() implementation. The QLocale object has 
methods providing localized day and month names. For example, day names are 
implemented using a big ushort array (~20.000 bytes) which contains something 
like 
'Sun;Mon;Tue;Wed;Thu;Fri;Sat;Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;S;M;T;W;T;F;S;7;1;2;3;4;5;6Dil;Wix;Qib;Rob;Kam;Jim;San;Dilbata;Wiixata;Qibxata;Roobii;Kamiisa;Jimaata;Sanbata;A;E;T;A;K;G;S;Aca;Etl;Tal;Arb;Kam;Gum;Sab;Acaada;Etleeni;Talaata;Arbaqa;Kamiisi;Gumqata;Sabti;1;2;3;4;5;6;7;So;Ma;Di;Wo;Do;Vr;Sa;Sondag;Maandag;Dinsdag;Woensdag;Donderdag;Vrydag;Saterdag;D;H;M;M;E;P;S;Die;H\xebn;Mar;M\xebr;(...)'.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2011-01-06 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Is nl_langinfo() function reliable? On any OS? Can we use it to get day name, 
abbreviated day name, month name and abbreviated month name?

We should maybe start with an implementation in Python? It's easier to write 
code in Python than in C, and because it can be reused on other Python 
implementations.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2010-07-29 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Wed, Jul 28, 2010 at 11:22 PM, Guido van Rossum
rep...@bugs.python.org wrote:
..
 What about the licensing? That look like the BSD license *with*
 advertising clause...


I am not a lawyer and I am not intimately familiar with PSF policies,
but this license does not look too dissimilar to the profile module
license:

# Permission to use, copy, modify, and distribute this Python software
# and its associated documentation for any purpose (subject to the
# restriction in the following sentence) without fee is hereby
granted,
# provided that the above copyright notice appears in all copies, and
# that both that copyright notice and this permission notice appear in
# supporting documentation, ...

Actually, I wonder if pydoc profile is technically in violation of the
InfoSeek license.  More likely, however, is that the license text in
the source file is not authoritative and PSF has a more permissive
license to this code.

Skip, can you clarify where the strftime code in your patch came from?
 In your first post you said that it came from Tcl, so it may have
ActiveState copyright on at least portions of it.

On the other hand, unless strftime code is already published under an
acceptable license, I think rewriting this code from scratch would be
easier than tracking down the owners and asking them to contribute it
to python.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2010-07-28 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

What about the licensing? That look like the BSD license *with* advertising 
clause...

--
nosy: +gvanrossum

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2010-06-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

PyPy also calls the platform's strftime().

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

What platforms have broken strftime and how badly is it broken there?

Is there a python version somewhere?  PyPy?

--
assignee:  - belopolsky
nosy: +belopolsky
type:  - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2010-05-20 Thread Skip Montanaro

Changes by Skip Montanaro s...@pobox.com:


--
nosy:  -skip.montanaro

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2008-11-10 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

The issue #1777412 has a working patch (for Python 2.6) which allows 
year  1900 in time.strftime() and datetime.datetime.strftime().

--
nosy: +haypo

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2008-07-02 Thread Skip Montanaro

Skip Montanaro [EMAIL PROTECTED] added the comment:

Good question.  I don't claim that the strftime.c I found is complete
for our needs, only that we can avoid the rewrite strftime from
scratch problem Guido indicated.

S

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2008-06-22 Thread Skip Montanaro

New submission from Skip Montanaro [EMAIL PROTECTED]:

Back in April we had a thread on xmlrpclib's problematic handling of dates
before 1900:

http://thread.gmane.org/gmane.comp.python.devel/93273/focus=93309

I'm still of the opinion that strftime() is the culprit and xmlrpclib is
just an innocent bystander.  Guido worried that to correct this we'd have 
to
implement strftime() from scratch.

I took a different approach and scouted around for an existing version of
strftime() which we could suck into the distribution.  I found a modified
version of the BSD 4.4 strftime which came with (I see to recall) Tcl.
The attached patch is against the py3k svn repo.  It passes all tests as
far as I can tell.

Also, see http://bugs.python.org/issue1777412 which appears to be related.

--
files: strftime.diff
keywords: patch, patch
messages: 68603
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: external strftime for Python?
versions: Python 3.0
Added file: http://bugs.python.org/file10704/strftime.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2008-06-22 Thread Skip Montanaro

Skip Montanaro [EMAIL PROTECTED] added the comment:

Ummm...  I think I only modified timemodule.c.  datetimemodule.c
probably needs a tweak as well.  I need to get this off my desk though.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2008-06-22 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

So how does it work for non-English locales?

--
nosy: +loewis

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com