Skip to content

Instantly share code, notes, and snippets.

public function getDaysConst(){
return [
"Monday" => 1 << 0, // 00000001 (1)
"Tuesday" => 1 << 1, // 00000010 (2)
"Wednesday" => 1 << 2, // 00000100 (4)
"Thursday" => 1 << 3, // 00001000 (8)
"Friday" => 1 << 4, // 00010000 (16)
"Saturday" => 1 << 5, // 00100000 (32)
"Sunday" => 1 << 6, // 01000000 (64)
];