As JavaScript slows down the page, it is better to use pure XHTML data variable for date time stamp, available in Blogger. I searched a lot on web, and was able to find 6 types of date variables, associated with any post. However, there can be more. These are :
For datePublished schema property :
<data:post.date/>
2020-06-04
<data:post.dateHeader/>
2020-06-04
<data:post.timestampISO8601/>
2020-06-04T02:18:00+05:30
<data:post.date.iso8601/>
2020-06-04T02:18:00+05:30
<data:post.timestamp/>
June 04, 2020
For dateModified schema property :
<data:post.lastUpdatedISO8601/>
2020-06-05T20:40:40Z
Further, these dates can be formatted, as per decoration needs, using EVAL in Blogger :
<b:eval expr='format(data:post.date, "EEEE, d MMM YYYY")'/>
or
<b:eval expr='data:post.date format "MMM dd" ' />
However, This expression only works on <data:post.date/>
and not on other 5 date variables.
The date formats should be created with ISO 8601 by following these rules :
YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00) - Complete date plus hours, minutes, seconds and a decimal fraction of a second, where:
- YYYY = four-digit year
- MM = two-digit month (01=January, etc.)
- DD = two-digit day of month (01 through 31)
- hh = two digits of hour (00 through 23) (am/pm NOT allowed)
- mm = two digits of minute (00 through 59)
- ss = two digits of second (00 through 59)
- s = one or more digits representing a decimal fraction of a second
- TZD = time zone designator (Z or +hh:mm or -hh:mm)
https://www.w3.org/TR/NOTE-datetime
I have implemented both datePublished and dateModified as following :
<p>Published on: <time expr:datetime='data:post.timestampISO8601' property='datePublished'><data:post.dateHeader/></time> Updated on: <time expr:datetime='data:post.lastUpdatedISO8601' property='dateModified'><data:post.lastUpdatedISO8601/></time></p>