how to add data | month| year and day in blogger
Live Demo
How to Add add data | month| year and day in blogger
Go to Blogger >> template
Step 1 Copy the following code and paste inside an Template (script)
<div id='mydate'>
<script type='text/javascript'>
/*<![CDATA[*/
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write(""+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"")
/*]]>*/
</script>
Step 2 Copy the following code and paste inside an Template (CSS)
#mydate {
color: #ffffff;
display: inline-block;
float: right;
font-size: 14px;
padding: 4px 10px;
font-family: 'Bree Serif', serif;
}
#mydate a {
background: none repeat scroll 0 0 #333333;
color: #ffffff;
font-family: sans-serif;
font-weight: bolder;
padding: 13px 16px 16px;
}
Step 3 Check blog
0 comments :