private function getSpecialPricePeriod()

in 2.0.x-2.2.x/upload/catalog/controller/module/facebook_business.php [572:586]


    private function getSpecialPricePeriod($product_info) {
        if (!empty($product_info['special']) && $this->config->get('facebook_business_sync_specials_status') && !empty($product_info['special_date_start']) && !empty($product_info['special_date_end']) 
          && $product_info['special_date_start'] != '0000-00-00' && $product_info['special_date_end'] != '0000-00-00') {
            $datetime_start = new DateTime($product_info['special_date_start']);
            $datetime_end = new DateTime($product_info['special_date_end']);
            $special_date_start = $datetime_start->format('Y-m-d') . 'T00:00+00:00';
            $special_date_end = $datetime_end->format('Y-m-d') . 'T23:59+00:00';

            $special_price_period = $special_date_start . '/' . $special_date_end;

            return $this->formatAndTrimString($special_price_period);
        } else {
            return '""';
        }
    }