Skip to content

Commit

Permalink
Merge pull request #772 from helsingborg-stad/fix/post_dates
Browse files Browse the repository at this point in the history
fix: Setting `_formatted` appendix to formatted dates in the post hel…
  • Loading branch information
Anna authored Nov 23, 2023
2 parents e1ef5f4 + 892a3e2 commit 9af40ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/Helper/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ public static function complementObject($postObject, $appendFields = [], $data =
}

//Set time formats
$postObject->post_time = wp_date(
$postObject->post_time_formatted = wp_date(
\Municipio\Helper\DateFormat::getDateFormat('time'), strtotime($postObject->post_date)
);
$postObject->post_date_time = wp_date(
$postObject->post_date_time_formatted = wp_date(
\Municipio\Helper\DateFormat::getDateFormat('date-time'), strtotime($postObject->post_date)
);
$postObject->post_date = wp_date(
$postObject->post_date_formatted = wp_date(
\Municipio\Helper\DateFormat::getDateFormat('date'), strtotime($postObject->post_date)
);

Expand Down

0 comments on commit 9af40ca

Please sign in to comment.