/*================================= Blog Date ======================================*/ Monday, Tuesday... - {{ content.publish_date_local_time.strftime('%A') }} January, February ... - {{ content.publish_date_local_time.strftime('%B') }} Jan, Feb…. - {{ content.publish_date_local_time.strftime('%b') }} MM (e.g. 01 for Jan) - {{ content.publish_date_local_time.strftime('%m') }} Date (dd) 04 - {{ content.publish_date_local_time.strftime('%d') }} Date (d) 4 - {{ content.publish_date_local_time.strftime('%e') }} YYYY - {{ content.publish_date_local_time.strftime('%Y') }} Time {{ content.publish_date_local_time.strftime('%I') }}:{{ content.publish_date_local_time.strftime('%M') }} HH (Hours)- {{ content.publish_date_local_time.strftime('%I') }}:{{ content.publish_date_local_time.strftime('%M') }} MM (Minutes) - {{ content.publish_date_local_time.strftime('%M') }} AM/PM - {{ content.publish_date_local_time.strftime('%p') }} /*================================= Blog Date ======================================*/ {{ group.absolute_url }}/archive/{{ content.publish_date_local_time.strftime('%Y') }}/{{ content.publish_date_local_time.strftime('%m') }}/{{ content.publish_date_local_time.strftime('%d') }} /*================================= Blog Date ======================================*/ {% set day = content.publish_date_local_time.strftime('%e') %} {% if day >= 4 and day <= 20 %} {% set day = day + "th" %} {% elif day >= 24 and day <= 30 %} {% set day = day + "th" %} {% elif day == 1 or day == 21 or day == 31 %} {% set day = day + "st" %} {% elif day == 2 or day == 22 %} {% set day = day + "nd" %} {% elif day == 3 or day == 23 %} {% set day = day + "rd" %} {% endif %} {{ day }}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter