Lines Matching refs:format
15 public const FORMAT_ATTRIBUTE = "format";
26 * @param string $format
31 public static function formatDateString(string $date, string $format = DateTag::DEFAULT_FORMAT, string $lang = null): string
34 // To format dates in other languages, you should use the setlocale() and strftime() functions instead of date().
66 // throw new ExceptionBadSyntax("The language ($lang) / locale ($derivedLocale) is not available as locale on the server. You can't then format the value ($date) in this language.");
72 $formatted = strftime($format, $timeStamp);
77 throw new ExceptionBadSyntax("Unable to format the date ($date) with the format ($format) and lang ($lang)");
102 * The format
104 $format = $tagAttributes->getValue(DateTag::FORMAT_ATTRIBUTE, DateTag::DEFAULT_FORMAT);
111 return DateTag::formatDateString($date, $format, $lang);