| 1441 |
ariadna |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel;
|
|
|
4 |
|
|
|
5 |
class Constants
|
|
|
6 |
{
|
|
|
7 |
// Constants currently used by WeekNum; will eventually be used by WEEKDAY
|
|
|
8 |
const STARTWEEK_SUNDAY = 1;
|
|
|
9 |
const STARTWEEK_MONDAY = 2;
|
|
|
10 |
const STARTWEEK_MONDAY_ALT = 11;
|
|
|
11 |
const STARTWEEK_TUESDAY = 12;
|
|
|
12 |
const STARTWEEK_WEDNESDAY = 13;
|
|
|
13 |
const STARTWEEK_THURSDAY = 14;
|
|
|
14 |
const STARTWEEK_FRIDAY = 15;
|
|
|
15 |
const STARTWEEK_SATURDAY = 16;
|
|
|
16 |
const STARTWEEK_SUNDAY_ALT = 17;
|
|
|
17 |
const DOW_SUNDAY = 1;
|
|
|
18 |
const DOW_MONDAY = 2;
|
|
|
19 |
const DOW_TUESDAY = 3;
|
|
|
20 |
const DOW_WEDNESDAY = 4;
|
|
|
21 |
const DOW_THURSDAY = 5;
|
|
|
22 |
const DOW_FRIDAY = 6;
|
|
|
23 |
const DOW_SATURDAY = 7;
|
|
|
24 |
const STARTWEEK_MONDAY_ISO = 21;
|
|
|
25 |
|
|
|
26 |
const METHODARR = [
|
|
|
27 |
self::STARTWEEK_SUNDAY => self::DOW_SUNDAY,
|
|
|
28 |
self::DOW_MONDAY,
|
|
|
29 |
self::STARTWEEK_MONDAY_ALT => self::DOW_MONDAY,
|
|
|
30 |
self::DOW_TUESDAY,
|
|
|
31 |
self::DOW_WEDNESDAY,
|
|
|
32 |
self::DOW_THURSDAY,
|
|
|
33 |
self::DOW_FRIDAY,
|
|
|
34 |
self::DOW_SATURDAY,
|
|
|
35 |
self::DOW_SUNDAY,
|
|
|
36 |
self::STARTWEEK_MONDAY_ISO => self::STARTWEEK_MONDAY_ISO,
|
|
|
37 |
];
|
|
|
38 |
}
|