[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:
parent
1343dbe97a
commit
46b9879c08
1 changed files with 2 additions and 0 deletions
|
@ -374,6 +374,8 @@ class VkBridge extends BridgeAbstract
|
||||||
} elseif (strstr($strdate, 'yesterday ') !== false) {
|
} elseif (strstr($strdate, 'yesterday ') !== false) {
|
||||||
$time = time() - 60 * 60 * 24;
|
$time = time() - 60 * 60 * 24;
|
||||||
$strdate = date('d-m-Y', $time) . ' ' . $strdate;
|
$strdate = date('d-m-Y', $time) . ' ' . $strdate;
|
||||||
|
} elseif ($date['month'] && intval(date('m')) < $date['month']) {
|
||||||
|
$strdate = $strdate . ' ' . (date('Y') - 1);
|
||||||
} else {
|
} else {
|
||||||
$strdate = $strdate . ' ' . date('Y');
|
$strdate = $strdate . ' ' . date('Y');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue