Found a bug with this recipe: {{ 'DAYS_OF_THE_WEEK'|ta(post.date|date('w') - 1) }} when the day is Sunday. post.date|date('w') is equal 0 and minus 1 becomes -1 and I see this on my page: DAYS_OF_THE_WEEK[-1]
How to fix it?
Found a bug with this recipe: {{ 'DAYS_OF_THE_WEEK'|ta(post.date|date('w') - 1) }} when the day is Sunday. post.date|date('w') is equal 0 and minus 1 becomes -1 and I see this on my page: DAYS_OF_THE_WEEK[-1]
How to fix it?
Solved by: {{ 'DAYS_OF_THE_WEEK'|ta(post.date|date('N') - 1) }}
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 1 | 76 | 10 hours ago | ||
| 6 | 161 | 2 days ago | ||
| 2 | 121 | 4 days ago | ||
| 2 | 103 | 4 days ago | ||
| 1 | 155 | 5 days ago |