How to define day is sunday and Normal day. using switch case by date?
<p>I have an error in this code. Please help me solve it.</p>

<pre><code>function holiday($today) {    

    $year = substr($today, 0, 4);     

    switch($today) {

      case $year.'-01-01':
          $holiday = 'New Year';
          break;

      case $today:
          $today11 = new DateTime($today);
          $R= $today11-&gt;format('l') . PHP_EOL;
          $Sunday='0';

          if($R == 0) {
              $holiday = 'Sunday';
          } else {
              $holiday = 'Normal Day';  
          }
      }

      return $holiday;
}

echo $tday= holiday($today); 
</code></pre>
