How To Show Date,Month,Year on Blogger

Posted by Lasantha Bandara on December 20th, 2009 File Under : gadget, java script2 Comments

1.Log in to your dashboard--> layout- ->Page Elements

2.Click on 'Add a Gadget'.

3.Select 'HTML/Javascript' and add the code given below and click save.

Select HTML/JavaScript

<script type='text/javascript'>

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
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>")


You are done.Now you can see it as picture below.

Show Date,Month,Year on Blogger

File Under : gadget, java script

2 Responses to “How To Show Date,Month,Year on Blogger”

  1. Isman says:

    Hello Boss! success always ... I'm new on the Internet. I'm sorry if my language less you understand, because I use google translate. You people are truly amazing ... Many of your template quite well and have an attractive appearance. I'm just learning to create a blog and want to use the template yours, but failed because I do not understand HTML with explanations in English. I was forced to use the template default 'Blogger'

    Sorry, this blog what I mean:

  2. Jeff says:


    Can't you create this widget in french like this ?(Jeudi le 2 août 2012)

    Thanks !

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.