<script>
/* ::::::::::::::::::::::::::::::::::::::::::::: */
var month=new Array(12); month[0]="01"; month[1]="02"; month[2]="03"; month[3]="04"; month[4]="05"; month[5]="06"; month[6]="07"; month[7]="08"; month[8]="09"; month[9]="10"; month[10]="11"; month[11]="12"; Y.use('node', 'node-load', function(Y) { Y.on('domready', function() {
/* ::::::::::::::::::::::::::::::::::::::::::::: ::: Reformat published date (Blog) */
Y.all('time.published').each( function() { var pdate = new Date(this.getAttribute('datetime')); this.setHTML(month[pdate.getMonth()] + " " + pdate.getDate() + " " + pdate.getFullYear()); } );
// .published /* ::::::::::::::::::::::::::::::::::::::::::::: ::: Reformat time since string */ Y.all('time.timestamp').each( function() { var tdate = new Date(this.getAttribute('datetime')); this.setHTML(tdate.getDate() + " " + month[tdate.getMonth()] + " " + tdate.getFullYear()); } );
// .timestamp (.timesince) }); //
Y.on });
</script>
-
Notifications
You must be signed in to change notification settings - Fork 0
rebeccagarciatech/squarespace-js-snippets
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published