From 46b9879c084ac0defff4308c40abf7661c3f94b0 Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Thu, 16 Jan 2020 11:00:10 +0000 Subject: [PATCH] [VkBridge] Correct post date calculating (#1417) * [VkBridge] Correct post date calculating Before this commit, post dates from december past year were calculated as december current year. --- bridges/VkBridge.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bridges/VkBridge.php b/bridges/VkBridge.php index 713b86f3..ea81a2b2 100644 --- a/bridges/VkBridge.php +++ b/bridges/VkBridge.php @@ -374,6 +374,8 @@ class VkBridge extends BridgeAbstract } elseif (strstr($strdate, 'yesterday ') !== false) { $time = time() - 60 * 60 * 24; $strdate = date('d-m-Y', $time) . ' ' . $strdate; + } elseif ($date['month'] && intval(date('m')) < $date['month']) { + $strdate = $strdate . ' ' . (date('Y') - 1); } else { $strdate = $strdate . ' ' . date('Y'); }