original_string: public static function getMinMaxDateAcrossWebsites($siteIds)
      {
          $siteIds = self::getIdSitesFromIdSitesString($siteIds);
          $now = Date::now();
  
          $minDate = null;
          $maxDate = $now->subDay(1)->getTimestamp();
          foreach ($siteIds as $idsite) {
              // look for 'now' in the website's timezone
              $timezone = Site::getTimezoneFor($idsite);
              $date = Date::adjustForTimezone($now->getTimestamp(), $timezone);
              if ($date > $maxDate) {
                  $maxDate = $date;
              }
  
              // look for the absolute minimum date
              $creationDate = Site::getCreationDateFor($idsite);
              $date = Date::adjustForTimezone(strtotime($creationDate), $timezone);
              if (is_null($minDate) || $date < $minDate) {
                  $minDate = $date;
              }
          }
  
          return array(Date::factory($minDate), Date::factory($maxDate));
      }
code: public static function getMinMaxDateAcrossWebsites($siteIds)
      {
          $siteIds = self::getIdSitesFromIdSitesString($siteIds);
          $now = Date::now();
  
          $minDate = null;
          $maxDate = $now->subDay(1)->getTimestamp();
          foreach ($siteIds as $idsite) {
              // look for 'now' in the website's timezone
              $timezone = Site::getTimezoneFor($idsite);
              $date = Date::adjustForTimezone($now->getTimestamp(), $timezone);
              if ($date > $maxDate) {
                  $maxDate = $date;
              }
  
              // look for the absolute minimum date
              $creationDate = Site::getCreationDateFor($idsite);
              $date = Date::adjustForTimezone(strtotime($creationDate), $timezone);
              if (is_null($minDate) || $date < $minDate) {
                  $minDate = $date;
              }
          }
  
          return array(Date::factory($minDate), Date::factory($maxDate));
      }
code_tokens: public static function getMinMaxDateAcrossWebsites ( $ siteIds ) { $ siteIds = self :: getIdSitesFromIdSitesString ( $ siteIds ) ; $ now = Date :: now ( ) ; $ minDate = null ; $ maxDate = $ now -> subDay ( 1 ) -> getTimestamp ( ) ; foreach ( $ siteIds as $ idsite ) { // look for 'now' in the website's timezone $ timezone = Site :: getTimezoneFor ( $ idsite ) ; $ date = Date :: adjustForTimezone ( $ now -> getTimestamp ( ) , $ timezone ) ; if ( $ date > $ maxDate ) { $ maxDate = $ date ; } // look for the absolute minimum date $ creationDate = Site :: getCreationDateFor ( $ idsite ) ; $ date = Date :: adjustForTimezone ( strtotime ( $ creationDate ) , $ timezone ) ; if ( is_null ( $ minDate ) || $ date < $ minDate ) { $ minDate = $ date ; } } return array ( Date :: factory ( $ minDate ) , Date :: factory ( $ maxDate ) ) ; }
docstring: The Multisites reports displays the first calendar date as the earliest day available for all websites.
  Also, today is the later "today" available across all timezones.
  @param array $siteIds Array of IDs for each site being displayed.
  @return Date[] of two Date instances. First is the min-date & the second
  is the max date.
  @ignore
docstring_tokens: The Multisites reports displays the first calendar date as the earliest day available for all websites . Also today is the later today available across all timezones .