<commit_before><?php

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

/**
 * Papi - Property Date
 *
 * @package Papi
 * @version 1.0.0
 */
class PropertyDate extends Papi_Property {

	/**
	 * Generate the HTML for the property.
	 *
	 * @since 1.0.0
	 */

	public function html() {
		// Property options.
		$options = $this->get_options();

		// Database value.
		$value = $this->get_value();
		$value = date( 'Y-m-d', $value );

		?>
		<input type="text" name="<?php echo $options->slug; ?>" value="<?php echo $value; ?>"<commit_msg>Fixed issue with property date if the saved value are a string (For old stuff).<commit_after><?php

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

/**
 * Papi - Property Date
 *
 * @package Papi
 * @version 1.0.0
 */
class PropertyDate extends Papi_Property {

	/**
	 * Generate the HTML for the property.
	 *
	 * @since 1.0.0
	 */

	public function html() {
		// Property options.
		$options = $this->get_options();

		// Database value.
		$value = $this->get_value();

		if (is_integer($value)) {
			$value = date( 'Y-m-d', $value );
		}

		?>
		<input type="text" name="<?php echo $options->slug; ?>" value="<?php echo $value; ?>"
{'fraction_non_alphanumeric': 0.1828665568369028, 'fraction_numerical': 0.009884678747940691, 'mean_word_length': 2.9967105263157894, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1679762', 'n_tokens_mistral': 453, 'n_tokens_neox': 420, 'n_words': 118}