Tribe__Date_Utils::unescape_date_format( mixed $date_format )

Unescapes date format strings to be used in functions like date.

Double escaping happens when storing a date format in the database.


Parameters

$date_format

(mixed) (Required) A date format string.


Top ↑

Return

(mixed) Either the original input or an unescaped date format string.


Top ↑

Source

File: src/Tribe/Date_Utils.php

		public static function unescape_date_format( $date_format ) {
			if ( ! is_string( $date_format ) ) {
				return $date_format;
			}

			// Why so simple? Let's handle other cases as those come up. We have tests in place!
			return str_replace( '\\\\', '\\', $date_format );
		}