ActionScheduler_WPCLI_Command::get_schedule_display_string
Get the scheduled date in a human friendly format.
Method of the class: ActionScheduler_WPCLI_Command{}
No Hooks.
Returns
String.
Usage
// protected - for code of main (parent) or child class $result = $this->get_schedule_display_string( $schedule );
- $schedule(ActionScheduler_Schedule) (required)
- Schedule.
Notes
ActionScheduler_WPCLI_Command::get_schedule_display_string() ActionScheduler WPCLI Command::get schedule display string code WC 10.6.2
protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) {
$schedule_display_string = '';
if ( ! $schedule->get_date() ) {
return '0000-00-00 00:00:00';
}
$next_timestamp = $schedule->get_date()->getTimestamp();
$schedule_display_string .= $schedule->get_date()->format( static::DATE_FORMAT );
return $schedule_display_string;
}