Posted... (human time display)
-
Comments:
- here.
Following on from the previous post, I’ve also shamelessly poached another idea from Dunstan: human-readable timestamps. Just pop this into your post.html
file, where you want the ‘time’ to appear.
{capture name=hour}{the_time d="G"}{/capture}
{assign var=hour value=$smarty.capture.hour}
Posted
{if $hour eq "00" or $hour eq "01" or $hour eq "02"}
in the wee hours,
{elseif $hour eq "03" or $hour eq "04" or $hour eq "05" or $hour eq "06"}
terribly early in the morning,
{elseif $hour eq "07" or $hour eq "08" or $hour eq "09"}
early in the morning,
{elseif $hour eq "10"}
mid-morning,
{elseif $hour eq "11"}
late morning,
{elseif $hour eq "12" or $hour eq "13"}
mid-morning,
{elseif $hour eq "14"}
early afternoon,
{elseif $hour eq "15" or $hour eq "16"}
mid-afternoon,
{elseif $hour eq "17"}
late afternoon,
{elseif $hour eq "18" or $hour eq "19"}
early evening,
{elseif $hour eq "20" or $hour eq "21"}
evening,
{elseif $hour eq "22"}
late evening,
{elseif $hour eq "23"}
late at night,
{/if}