Carbon not displaying the year correctly.

Carbon not displaying the year correctly.

gonziis -
10 months ago

I tried using post.publish_at.date|date("d/m/Y") and also {{ carbon(post.publish_at.date, "Europe/Riga").format("d/m/Y") }} but both always show the incorrect year. One of the posts has publish year 2017, but it still displays 2018. post.publish_at.date|raw shows 2017

Answer

ryanthompson -
10 months ago

That is incorrect usage I do believe - treat the field like carbon itself: