Created
March 13, 2013 21:27
-
-
Save gterrill/5156454 to your computer and use it in GitHub Desktop.
Displaying pickup date and time. Time is 12 hour clock.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for attribute in attributes %}{{ attribute | first | replace: 'booking-time', 'Time' | replace: 'booking', 'Pickup' }}: {% if attribute.first == 'booking-time' %}{% assign t = attribute.last | split: ':' %}{% assign hour = t[0] | minus:0 %}{% if hour > 12 %}{{ t[0] | minus:12 }}:{{ t[1] }} pm{% else %}{{ t[0] }}:{{ t[1] }} am{% endif %}{% else %}{{ attribute | last }}{% endif %}{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment