From 4641b5c66b78717d789fdfaf2d9c51c85d668d1b Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Tue, 2 Dec 2014 18:46:47 +0100 Subject: [PATCH] strftime workaround for php on windows The %e and %k modifiers are not supported in the Windows implementation of the strftime function. The workaround is from the strftime documention (Example #3). --- lib/Translator.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Translator.php b/lib/Translator.php index 5674cb9..77c35ed 100644 --- a/lib/Translator.php +++ b/lib/Translator.php @@ -72,6 +72,11 @@ namespace Translator { function datetime($format, $timestamp) { + if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { + $format = preg_replace('#(?