Calendar
[ class tree: Calendar ] [ index: Calendar ] [ all elements ]

Source for file 19.php

Documentation is available at 19.php

  1. <?php
  2. /**
  3. * Description: demonstrates using the Weekday decorator
  4. */
  5. if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php'{
  6.     define('CALENDAR_ROOT''../../');
  7. }
  8. require_once CALENDAR_ROOT.'Day.php';
  9. require_once CALENDAR_ROOT.'Decorator/Weekday.php';
  10.  
  11. $Day = new Calendar_Day(date('Y')date('n'),date('d'));
  12. $WeekDay new Calendar_Decorator_Weekday($Day);
  13. // $WeekDay->setFirstDay(0); // Make Sunday first Day
  14.  
  15. echo 'Yesterday: '.$WeekDay->prevWeekDay().'<br>';
  16. echo 'Today: '.$WeekDay->thisWeekDay().'<br>';
  17. echo 'Tomorrow: '.$WeekDay->nextWeekDay().'<br>';
  18.  
  19. $WeekDay->build();
  20. echo 'Hours today:<br>';
  21. while $Hour $WeekDay->fetch() ) {
  22.     echo $Hour->thisHour().'<br>';
  23. }
  24. ?>

Documentation generated on Mon, 11 Mar 2019 15:37:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.