Closed echeran closed 12 months ago
Thanks for the fix @echeran!
I also notice that the framework is hard coding the ':' character for the time separator. However, the time separator varies by language, script, and region. It would be better to use an i18n library designed for localized time formating in many locales.
The idea behind this template is to be simple and to provide a user-friendly interface. Hence, at the time simply entering a time as "HH:MM" was most convenient.
Adding support for i18n just so you can format timestamps differently seems to me to be overkill. After all, nothing stop you from writing a script on your end translating the timestamps of your backend into the timestamp format as needed by this template. Of course, feel free to add a more through support for localization for the entire template via PR.
Thanks for creating a great theme! (our usage)
We noticed a bug when the number of minutes is a single digit. This is a hacky workaround that ought to fix the problem.
Of course, I feel required to say that the ideal solution would be to use ICU -- the industry standard i18n library -- to handle formatting datetimes and many other such operations. And if you're in an international context, it's indispensable. :-) I don't know too much about Ruby and Jekyll, and whether there is an ICU wrapper there.
FYI @sffc