[issue17659] no way to determine First weekday (based on locale)

2021-10-07 Thread Cédric Krier

Cédric Krier  added the comment:

I have updated the PR to be included in 3.11

--
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2021-04-27 Thread Éric Araujo

Éric Araujo  added the comment:

A core dev review is needed to get this feature into 3.10 before the freeze.

--
nosy: +methane
stage: patch review -> commit review
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2021-04-20 Thread Cédric Krier

Cédric Krier  added the comment:

ping

--

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2020-02-03 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +17700
pull_request: https://github.com/python/cpython/pull/18327

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2020-01-23 Thread Cédric Krier

Cédric Krier  added the comment:

I submitted https://github.com/python/cpython/pull/18142 which implements 
(based on the initial patch) a function locale.getfirstweekday(). The 
implementation supports glibc (if _NL_TIME_FIRST_WEEKDAY is defined) and 
Windows (not yet tested).
I did not keep the nl_langinfo because I do not think it is good to have 
platform dependent definition.

--
nosy: +ced
versions: +Python 3.9 -Python 3.4

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2020-01-23 Thread Cédric Krier

Change by Cédric Krier :


--
pull_requests: +17529
pull_request: https://github.com/python/cpython/pull/18142

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2013-04-28 Thread R. David Murray

R. David Murray added the comment:

Thanks for the patch.  We'll be interested in the results of your research, 
certainly.  Windows support would also be a question we'd probably want to 
consider before deciding whether or not to add this.

I've added MAL as nosy since I suspect he'll have thoughts about the API, as 
well as the appropriateness of the feature.

--
nosy: +lemburg
stage: needs patch - patch review

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



[issue17659] no way to determine First weekday (based on locale)

2013-04-28 Thread Éric Araujo

Éric Araujo added the comment:

If I read the patch correctly, the code can return 0 if Monday is the first 
weekday as indicated by glibc, or as a fallback.  I think there should be a 
difference.

--

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



[issue17659] no way to determine First weekday (based on locale)

2013-04-13 Thread Izidor Matušov

Izidor Matušov added the comment:

Yes, I need to find out calendar-week-start-day information based on the 
current locale.

Or in the other words, I need to find out what the correct parameter for 
calendar.Calendar([firstweekday]) object is. With locale en_US it should be 
Sunday, with locale sk_SK it should be Monday, and so on.

I guess it could be find out from LC_TIME locale.

There is already API for such small bits of information:

documentation
locale.localeconv()
Returns the database of the local conventions as a dictionary. This dictionary 
has the following strings as keys:
/documentation

However, there is no category for LC_TIME so far.

--

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



[issue17659] no way to determine First weekday (based on locale)

2013-04-13 Thread Kyle McMartin

Kyle McMartin added the comment:

Hacky patch at adding support for querying these values from nl_langinfo, and a 
new exported function from the locale module to return a guess at the first day 
of the week appropriate for Calendar.firstdayofweek

After writing this, I think it might be better to implement this as another 
hash, so keys can be queried and objects directly returned. I'll take a look at 
that approach soon.

Of course, all this is contingent on having support from libc, and it seems 
only Linux currently has this, and the *BSDs (and hence OS X via FreeBSD) do 
not. I'll look into that as well.

--
keywords: +patch
nosy: +jkkm
Added file: http://bugs.python.org/file29819/cpython-add-first-day-of-week.diff

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



[issue17659] no way to determine First weekday (based on locale)

2013-04-12 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
title: First weekday - no way to determine First weekday (based on locale)

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



[issue17659] no way to determine First weekday (based on locale)

2013-04-12 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
nosy: +tshepang

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