Show current day and date on blogger - blogger widget
Posted by Nitesh Kothari on 16 December 2008
Share this post:
|
2 Comments
Wolverine hacks has new magazine style look. Many readers were happy with the current date section at the top left. It is very easy to show current day and date on Blogger using Current date and dat blogger widget. Copy and paste the following code to a new HTML/Javascript box in the page element section.
<script>
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("<p>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</p>")
</script>
<p align="right"><font face="arial, helvetica" size="-2"><a href="http://clwolvi.blogspot.com">Grab this widget</a></font></p>
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("<p>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</p>")
</script>
<p align="right"><font face="arial, helvetica" size="-2"><a href="http://clwolvi.blogspot.com">Grab this widget</a></font></p>
Leave a comment, if you have any problem or query.