Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow date filters to output ordinal days #6773
It is normal to write things like _posted on 12th February 2018" in the blog post. Currently to achieve this, a code similar to this one is needed:
I think the case is common enough to introduce it in Jekyll, by adding some parameters to the
It supports both UK and US styles. UK is the default.
I also changed @sample_date in one of the tests to cover more cases.
In the Time Ruby class there is nothing. We could suggest them to add it, but it won't happen soon.
I think it is a bad idea to support dates in other languages in Jekyll, but what about extending this methods in your Date plugin? I would be up to help.
So my suggestion is add the ordinal dates in English as it is quite general and used case, and the rest in the plugin. What do you think?
@Ana06 OK, I guess it makes sense to implement ordinal dates like Rails does:
what do you exactly mean? isn't it already done like that?
The tests look great! Thanks for making sure everything is covered well.
There's a few other changes I'd like to see and once those are done, I think this can
Some minor corrections needed.. and a couple of opinions..