1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00
phorge-phorge/scripts/calendar/import_us_holidays.php
vrana ef85f49adc Delete license headers from files
Summary:
This commit doesn't change license of any file. It just makes the license implicit (inherited from LICENSE file in the root directory).

We are removing the headers for these reasons:

- It wastes space in editors, less code is visible in editor upon opening a file.
- It brings noise to diff of the first change of any file every year.
- It confuses Git file copy detection when creating small files.
- We don't have an explicit license header in other files (JS, CSS, images, documentation).
- Using license header in every file is not obligatory: http://www.apache.org/dev/apply-license.html#new.

This change is approved by Alma Chao (Lead Open Source and IP Counsel at Facebook).

Test Plan: Verified that the license survived only in LICENSE file and that it didn't modify externals.

Reviewers: epriestley, davidrecordon

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2035

Differential Revision: https://secure.phabricator.com/D3886
2012-11-05 11:16:51 -08:00

62 lines
2 KiB
PHP
Executable file

#!/usr/bin/env php
<?php
$root = dirname(dirname(dirname(__FILE__)));
require_once $root.'/scripts/__init_script__.php';
// http://www.opm.gov/operating_status_schedules/fedhol/
$holidays = array(
'2012-01-02' => "New Year's Day",
'2012-01-16' => "Birthday of Martin Luther King, Jr.",
'2012-02-20' => "Washington's Birthday",
'2012-05-28' => "Memorial Day",
'2012-07-04' => "Independence Day",
'2012-09-03' => "Labor Day",
'2012-10-08' => "Columbus Day",
'2012-11-12' => "Veterans Day",
'2012-11-22' => "Thanksgiving Day",
'2012-12-25' => "Christmas Day",
'2013-01-01' => "New Year's Day",
'2013-01-21' => "Birthday of Martin Luther King, Jr.",
'2013-02-18' => "Washington's Birthday",
'2013-05-27' => "Memorial Day",
'2013-07-04' => "Independence Day",
'2013-09-02' => "Labor Day",
'2013-10-14' => "Columbus Day",
'2013-11-11' => "Veterans Day",
'2013-11-28' => "Thanksgiving Day",
'2013-12-25' => "Christmas Day",
'2014-01-01' => "New Year's Day",
'2014-01-20' => "Birthday of Martin Luther King, Jr.",
'2014-02-17' => "Washington's Birthday",
'2014-05-26' => "Memorial Day",
'2014-07-04' => "Independence Day",
'2014-09-01' => "Labor Day",
'2014-10-13' => "Columbus Day",
'2014-11-11' => "Veterans Day",
'2014-11-27' => "Thanksgiving Day",
'2014-12-25' => "Christmas Day",
'2015-01-01' => "New Year's Day",
'2015-01-19' => "Birthday of Martin Luther King, Jr.",
'2015-02-16' => "Washington's Birthday",
'2015-05-25' => "Memorial Day",
'2015-07-03' => "Independence Day",
'2015-09-07' => "Labor Day",
'2015-10-12' => "Columbus Day",
'2015-11-11' => "Veterans Day",
'2015-11-26' => "Thanksgiving Day",
'2015-12-25' => "Christmas Day",
);
$table = new PhabricatorCalendarHoliday();
$conn_w = $table->establishConnection('w');
$table_name = $table->getTableName();
foreach ($holidays as $day => $name) {
queryfx(
$conn_w,
'INSERT IGNORE INTO %T (day, name) VALUES (%s, %s)',
$table_name,
$day,
$name);
}