unionco / calendarize

Calendar Field Type for CraftCMS
MIT License
18 stars 15 forks source link

calendarizeHandle.next: backward compatibility issue #12

Closed robarov closed 5 years ago

robarov commented 5 years ago

Using the latest version 1.2.3

Bug

{{ event.calendarizeHandle.next|date('D. j F Y') }} now returns error
Object of class unionco\calendarize\models\Occurrence could not be converted to string

Expected

In previous version, this returned Fr. 15 februari 2019

Workaround

Use {{ event.calendarizeHandle.next.format('D. j F Y') }} or {{ event.calendarizeHandle|date('D. j F Y') }}

fvaldes33 commented 5 years ago

Missed this in my last commit. I added the toString method to the Occurrence model now. As I mentioned in issue #13, using the date twig filter would work better than the format method to ensure localization.

Fixed in ae68f56