mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit 4eaee68fd47bb6d7ad4ba8e9805de379b5243388
parent 4e69b5ac18a7c72453b5e3492d23da0ceab2e096
Author: markseu <mark2011@mayberg.se>
Date:   Fri, 15 Mar 2024 13:38:41 +0100

Fixed getDateRelative() in API

Co-Authored-By: Robert <7520987+pftnhr@users.noreply.github.com>

Diffstat:
Msystem/extensions/core.php | 4++--
Msystem/extensions/update-current.ini | 4++--
Msystem/extensions/update-latest.ini | 4++--
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/system/extensions/core.php b/system/extensions/core.php @@ -2,7 +2,7 @@ // Core extension, https://github.com/annaesvensson/yellow-core class YellowCore { - const VERSION = "0.8.125"; + const VERSION = "0.8.126"; const RELEASE = "0.8.23"; public $content; // content files public $media; // media files @@ -876,7 +876,7 @@ class YellowLanguage { // Return Unix time as date, relative to today public function getDateRelative($timestamp, $format, $daysLimit, $language = "") { - $timeDifference = time() - $timestamp; + $timeDifference = mktime(0, 0, 0) - strtotime(date("Y-m-d", $timestamp)); $days = abs(intval($timeDifference/86400)); $key = $timeDifference>=0 ? "coreDatePast" : "coreDateFuture"; $tokens = preg_split("/\s*,\s*/", $this->getText($key, $language)); diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini @@ -1,12 +1,12 @@ # Datenstrom Yellow update settings Extension: Core -Version: 0.8.125 +Version: 0.8.126 Description: Core functionality of your website. DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip DocumentationUrl: https://github.com/annaesvensson/yellow-core DocumentationLanguage: en, de, sv -Published: 2023-10-27 17:02:46 +Published: 2024-03-15 13:36:26 Developer: Anna Svensson Tag: feature system/extensions/core.php: core.php, create, update diff --git a/system/extensions/update-latest.ini b/system/extensions/update-latest.ini @@ -126,12 +126,12 @@ system/themes/copenhagen.css: copenhagen.css, create, update, careful system/themes/copenhagen.png: copenhagen.png, create Extension: Core -Version: 0.8.125 +Version: 0.8.126 Description: Core functionality of your website. DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip DocumentationUrl: https://github.com/annaesvensson/yellow-core DocumentationLanguage: en, de, sv -Published: 2023-10-27 17:02:46 +Published: 2024-03-15 13:36:26 Developer: Anna Svensson Tag: feature system/extensions/core.php: core.php, create, update