<?php
/**
 * Template part for displaying Date Format
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Nevo
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

$date_format = Nevo()->get_setting( 'footer_date_format' );

if(strtotime(wp_date($date_format))) {
	$current_date = wp_date($date_format);
} else {
	$current_date = wp_date('l, F j Y');
}
echo '<div class="footer-date-format item-date-format builder-item-focus" data-section="footer_date_format">';
	echo '<div class="date-inner">';
		echo '<div class="date-format">'. esc_html( $current_date ) .'</div>';
	echo '</div>';
	if ( is_customize_preview() ) {
		echo '<span class="customize-partial-edit">'. esc_html__( 'Date Format', 'nevo' ) .'</span>';
	}
echo '</div>';