Skip to content

Commit

Permalink
Merge pull request #95 from holiday-jp/follow-holiday-jp-yaml
Browse files Browse the repository at this point in the history
Follow holiday-jp/holiday_jp dataset
  • Loading branch information
k1LoW authored Dec 6, 2020
2 parents de799dd + c8d4eff commit 63bbaec
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Test
strategy:
matrix:
php-version: [ '5.4', '5.5', '5.6', '7.1', '7.2', '7.3', '7.4' ]
php-version: [ '5.6', '7.1', '7.2', '7.3', '7.4' ]
runs-on: ubuntu-latest
steps:
- name: Setup PHP
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use Symfony\Component\Yaml\Yaml;

$holidays = Yaml::parse(file_get_contents('holiday_jp/holidays_detailed.yml'));
$holidays = Yaml::parse(file_get_contents('https://raw.githubusercontent.com/holiday-jp/holiday_jp/master/holidays_detailed.yml'));

$timestamp = date('Y-m-d H:i:s');
echo <<<EOS
Expand Down
43 changes: 25 additions & 18 deletions src/HolidayJp/Holidays.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
// Generated from holidays_detailed.yml at 2018-06-30 21:55:23
// Generated from holidays_detailed.yml at 2020-12-06 18:59:20
namespace HolidayJp\HolidayJp;

/**
Expand Down Expand Up @@ -5638,20 +5638,34 @@ class Holidays
'name' => 'こどもの日',
'name_en' => "Children's Day",
),
'2021-07-19' => array(
'date' => '2021-07-19',
'week' => '',
'week_en' => 'Monday',
'2021-07-22' => array(
'date' => '2021-07-22',
'week' => '',
'week_en' => 'Thursday',
'name' => '海の日',
'name_en' => "Marine Day",
),
'2021-08-11' => array(
'date' => '2021-08-11',
'week' => '',
'week_en' => 'Wednesday',
'2021-07-23' => array(
'date' => '2021-07-23',
'week' => '',
'week_en' => 'Friday',
'name' => 'スポーツの日',
'name_en' => "Health and Sports Day",
),
'2021-08-08' => array(
'date' => '2021-08-08',
'week' => '',
'week_en' => 'Sunday',
'name' => '山の日',
'name_en' => "Mountain Day",
),
'2021-08-09' => array(
'date' => '2021-08-09',
'week' => '',
'week_en' => 'Monday',
'name' => '山の日 振替休日',
'name_en' => "Holiday in lieu",
),
'2021-09-20' => array(
'date' => '2021-09-20',
'week' => '',
Expand All @@ -5666,13 +5680,6 @@ class Holidays
'name' => '秋分の日',
'name_en' => "Autumnal Equinox Day",
),
'2021-10-11' => array(
'date' => '2021-10-11',
'week' => '',
'week_en' => 'Monday',
'name' => 'スポーツの日',
'name_en' => "Health and Sports Day",
),
'2021-11-03' => array(
'date' => '2021-11-03',
'week' => '',
Expand Down Expand Up @@ -9307,5 +9314,5 @@ class Holidays
'name_en' => "Labor Thanksgiving Day",
),
);

}
}
2 changes: 2 additions & 0 deletions tests/HolidayJp/Tests/HolidayJpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function test_MountainDayFrom2016(){
for ($year = 2016; $year <= 2050; $year++) {
if ($year == 2020) {
$date = new DateTime($year . '-08-10');
} else if ($year == 2021) {
$date = new DateTime($year . '-08-08');
} else {
$date = new DateTime($year . '-08-11');
}
Expand Down

0 comments on commit 63bbaec

Please sign in to comment.