concrete/src/Page/Collection/Version/Version.php
public function isApprovedNow($when = null)
    {
        if (!$this->isApproved()) {
            return false;
        }
        $start = $this->getPublishDate();
        $end = $this->getPublishEndDate();
        if (!$start && !$end) {
            return true;
        }
        $dh = Facade::getFacadeApplication()->make('date');
        if ($when) {
            $when = $dh->toDB($when);
        }
        if (!$when) {
            $when = $dh->getOverridableNow();
        }
        if ($start && $start > $when) {
            return false;
        }
        if ($end && $end < $when) {
            return false;
        }

        return true;
    }
public function isApprovedNow($when = null)
    {
        if (!$this->isApproved()) {
            return false;
        }
        $start = $this->getPublishDate();
        $end = $this->getPublishEndDate();
        if (!$start && !$end) {
            return true;
        }
        $dh = Facade::getFacadeApplication()->make('date');
        if ($when) {
            $when = $dh->toDB($when);
        }
        if (!$when) {
            $when = $dh->getOverridableNow();
        }
        if ($start && $start > $when) {
            return false;
        }
        if ($end && $end < $when) {
            return false;
        }

        return true;
    }
public function isApprovedNow ( $ when = null ) { if ( ! $ this -> isApproved ( ) ) { return false ; } $ start = $ this -> getPublishDate ( ) ; $ end = $ this -> getPublishEndDate ( ) ; if ( ! $ start && ! $ end ) { return true ; } $ dh = Facade :: getFacadeApplication ( ) -> make ( 'date' ) ; if ( $ when ) { $ when = $ dh -> toDB ( $ when ) ; } if ( ! $ when ) { $ when = $ dh -> getOverridableNow ( ) ; } if ( $ start && $ start > $ when ) { return false ; } if ( $ end && $ end < $ when ) { return false ; } return true ; }
Is this version approved and in the publish interval?

@var string|int|\DateTime|null $when a date/time representation (empty: now)
@return bool
Is this version approved and in the publish interval?