[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.
This commit is contained in:
Eugene Molotov 2020-01-16 11:00:10 +00:00 committed by Lyra
parent 1343dbe97a
commit 46b9879c08

View file

@ -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');
}