ljsdev-ssg

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 314a154e8f16ce427a975d4bee491e3cb8f26ad1
parent ac8bec32f53f73f81f608d6d77223d74ca6e9cdb
Author: Leon <leon@wp2static.com>
Date:   Mon, 19 Aug 2019 07:56:06 +0200

fix date syntax

Diffstat:
Mextract-title-body-date.php | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/extract-title-body-date.php b/extract-title-body-date.php @@ -45,8 +45,8 @@ if (isset($h1[0])) { $dateel = $finder->query("/html/body/div/div/div/section[4]/div/div/div/div/div/div/div/ul/li[1]/a/span[2]"); if (isset($dateel[0])) { - $date = DOMinnerHTML($dateel[0]); - echo "<time datetime={$date}>" . PHP_EOL; + $date = trim(DOMinnerHTML($dateel[0])); + echo "<time datetime=\"{$date}\">" . PHP_EOL; } } else { # get title (essays)