aem_helper_date

The Woocommerce CSV Import aem helper date function.

Description

aem_helper_date( (constant) $timestamp = null ); 

Parameters (1)

0. $timestamp — Optional. (constant) => null
The timestamp.

Usage

  1. if ( !function_exists( 'aem_helper_date' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-csv-import/woocommerce-csvimport.php'; 
  3.  
  4. // The timestamp. 
  5. $timestamp = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = aem_helper_date($timestamp); 
  9.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-csvimport.php  
  1. function aem_helper_date($timestamp = null) 
  2.  
  3. if (!$timestamp) { 
  4. $new_date = ''; 
  5.  
  6. return $new_date; 
  7.  
  8. $temp_date = new DateTime(); 
  9. $temp_date->setTimestamp($timestamp); 
  10. $new_date = $temp_date->format('Y-m-d H:i'); 
  11.  
  12. return $new_date;