Bug #76513 [Opn->Fbk]: locale for day of week
| From: | danack@php.net | Date: | Thu, 21 Jun 2018 14:50:28 +0000 |
| Subject: | Bug #76513 [Opn->Fbk]: locale for day of week | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215836@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76513&edit=1
ID: 76513
Updated by: danack@php.net
Reported by: jluc at no-log dot org
Summary: locale for day of week
-Status: Open
+Status: Feedback
Type: Bug
Package: *General Issues
Operating System: linux
PHP Version: 7.2.6
Block user comment: N
Private report: N
New Comment:
I can't reproduce this issue. Please could you run on the command line:
```
locale -a | grep fr
```
and also run
```
$result = setlocale(LC_TIME, "fr_FR");
echo strftime(" in French %A and");
var_dump($result);
```
and give the output for both.
The simplest explanation would be that the fr_FR locale is not available on your system for whatever
reason.
Previous Comments:
------------------------------------------------------------------------
[2018-06-21 14:07:19] jluc at no-log dot org
Description:
------------
---
From manual page: http://www.php.net/function.strftime
---
"Format the time and/or date according to locale settings. Month and weekday names and other
language-dependent strings respect the current locale set with setlocale()."
BUT day of week are allways english, whatever the locale
The given example is :
setlocale(LC_TIME, "fr_FR");
echo strftime(" in French %A and");
but the output is not displayed in http://www.php.net/function.strftime
AMOF, output is
in French Thursday and Thu
Which is not the expected : "in French Jeudi and Jeu"
Expected result:
----------------
Either documentation is wrong and setlocale is not efficient with dayofweeks names
Either this is a bug
Anyway, the output for this example should be included in the documentation (not only the PHP
source) as it's done for other examples.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76513&edit=1