Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feedRSS - Wrong date format with config intl date handler #72

Closed
batgithub opened this issue May 11, 2024 · 4 comments
Closed

feedRSS - Wrong date format with config intl date handler #72

batgithub opened this issue May 11, 2024 · 4 comments
Labels
bug Something isn't working released

Comments

@batgithub
Copy link

Thanks for your plugin, it's really great 🙂

I created a podcast in french, on my website. I did config kirby date.handler with intl to have date in french.
But it create wrong date in the RSS feed : 91, 31 3 2024 0:: instead of Sun, 31 Mar 2024 00:00:00 +0100.

@batgithub
Copy link
Author

I did a quick fix with :

<?=$feed->xmlTag('pubDate', $episode->date()->toDate(new \IntlDateFormatter('en', pattern: 'E, MMM YYYY HH:mm:ss zz')));?>
In snippets/itemp.php

and
<lastBuildDate><?= \Kirby\Toolkit\Str::date($page->modified(), new \IntlDateFormatter('en', pattern: 'E, MMM YYYY HH:mm:ss zz'), 'en');?></lastBuildDate>
in templates/podcasterfeed.php

I think it will be more resilient to precise the format in English on the rss feed.

@mauricerenck mauricerenck added the bug Something isn't working label May 13, 2024
@batgithub
Copy link
Author

After bugs with spotify I finally found the right format :

    <?=$feed->xmlTag('pubDate', $episode->date()->toDate(new \IntlDateFormatter('en_US',
    \IntlDateFormatter::FULL,
    \IntlDateFormatter::FULL,
    'UTC',
    \IntlDateFormatter::GREGORIAN,
    "EEE, dd MMM yyyy HH:mm:ss 'GMT'")));?>
    ```

@mauricerenck
Copy link
Owner

Thank you for the contribution and sorry for the very late reply, I was so busy my other plugins that I procrastinated around this issue. It'll be fixed in the upcoming release.

github-actions bot pushed a commit that referenced this issue Sep 26, 2024
## [3.2.8](v3.2.7...v3.2.8) (2024-09-26)

### Bug Fixes

* more resilient date format ([740cd75](740cd75)), closes [#72](#72)
@mauricerenck
Copy link
Owner

🎉 This issue has been resolved in version 3.2.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants