|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66125 IntlCalendar::isWeekend with ar_SA
Submitted: 2013-11-20 09:55 UTC Modified: 2016-04-09 19:23 UTC
From: php at kriegt dot es Assigned:
Status: Not a bug Package: intl (PECL)
PHP Version: 5.5.6 OS: wheezy
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php at kriegt dot es
New email:
PHP Version: OS:


 [2013-11-20 09:55 UTC] php at kriegt dot es
Hi, I expected some problem with Locale ar_SA (since this was one of the examples on

I wanted to check since sunday is not a weekend day for Saudi Arabia, which day is. So I started with monday and finished with saturday, everytime I got false.

So actually, I checked on google what days are weekends for Saudi Arabia and I found the following:

There you can see, that Saudi Arabia should return true on "friday" and "saturday".

Test script:
$cal = IntlCalendar::createInstance('Asia/Riyadh', 'ar_SA');
$cal->set(2013,11,22); // friday

var_dump( $cal->isWeekend() );

$cal->set(2013,11,23); // saturday
var_dump( $cal->isWeekend() );

$cal->set(2013,11,24); // sunday
var_dump( $cal->isWeekend() );

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-20 10:07 UTC] php at kriegt dot es
I am using libicu48 and libicu-dev from debian wheezy repository and PECL intl version 3.0.0.
 [2016-04-09 19:23 UTC]
-Status: Open +Status: Not a bug
 [2016-04-09 19:23 UTC]

i've repeated your snipped today as follows (the fun thing is that the day of month is the same :))

$cal = IntlCalendar::createInstance('Asia/Riyadh', 'ar_SA');

$cal->set(2016,4,22); // friday
var_dump( $cal->isWeekend() );

$cal->set(2016,4,23); // saturday
var_dump( $cal->isWeekend() );

$cal->set(2016,4,24); // sunday
var_dump( $cal->isWeekend() );

The output is as follows:


This is produced with ICU 57.1. It still doesn't look correct as it shows not the correct days for the weekend. But, for sure is - it is something coming from ICU. PHP doesn't interpret these data, it just wraps the corresponding ICU functionality and a boolean in this case. Certanly, it needs to be reported mainstream and you should do that, i currently don't see this as an issue in PHP.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 09:01:28 2024 UTC