How to Display Date Using Javascript?

This JavaScript code will display today date. 

<SCRIPT LANGUAGE="JavaScript">
    var now = new Date();

    var days = new Array('Sunday','Monday','Tuesday',
        'Wednesday','Thursday','Friday','Saturday');

    var months = new Array('January','February','March','April',
        'May','June','July','August','September',
        'October','November','December');

    var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

    function yearName(number)  {
        return (number < 1000) ? number + 1900 : number;
    }
    today =  days[now.getDay()] + ", " +
        months[now.getMonth()] + " " +
        date + ", " +
        (yearName(now.getYear())) ;

    document.write(today);
</script>

Result:

Thursday, January 25, 2016

46 comments:

  1. great post. http://www.mahimegh.com/

    ReplyDelete
  2. It is better to engaged ourselves in activities we like. I liked the post. Thanks for sharing.
    Best Interior Designers
    home interiors in chennai
    Commercial interior designers in chennai

    ReplyDelete
  3. You blog post is just completely quality and informative. Many new facts and information which I have not heard about before. Keep sharing more blog posts.
    Office interior designers in chennai
    living room interior designers in chennai
    False ceiling interiors designers in chennai

    ReplyDelete
  4. I prefer to study this kind of material. Nicely written information in this post, the quality of content is fine and the conclusion is lovely. Things are very open and intensely clear explanation of issues
    Pooja room interior desingers in chennai
    Hotel Interior desingers in chennai
    Hospital interior designers in chennai

    ReplyDelete
  5. I am extremely intrigued with your article. I adore the manner in which you compose this article.
    Much obliged to you for imparting this awesome post to us. Brother Printer Sleep Mode Off

    ReplyDelete
  6. I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day!

    Math Tutors

    Private Tutor

    Online Tutors

    ReplyDelete
  7. Hello I am Isajain Pune Escorts you have shared magnificent article. I truly like and value your work. The focuses you have referenced in this article are useful,Excellent perused, Positive site, where did u thought of the data on this posting? I have perused a couple of the articles on your site now, and I truly like your style. Thank you so much obliged and please keep up the compelling work
    Visit my Website just click :

    Chennai Escorts
    Kolkata Escorts
    Indore Escorts
    Surat Escorts
    Morbi Escorts
    Hyderabad Escorts
    Ahmedabad Escorts

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Your post is really nice and informative! If you're searching for Internship in Indore then please check out our blog.

    ReplyDelete
  10. I’ve viewed some different blog posts with regards to this topic, and I must state that yours shows the most insight. Thanks a lot for expressing your opinions with everyone here!

    Home Tutors

    ReplyDelete
  11. Thanks for sharing this information. It is really helpful. Please visit our blog also.
    "Beauty Blog"

    ReplyDelete
  12. Forex Signals, MT4 and MT5 Indicators, Strategies, Expert Advisors, Forex News, Technical Analysis and Trade Updates in the FOREX IN WORLD

    Forex Signals Forex Strategies Forex Indicators Forex News Forex World

    ReplyDelete
  13. Thanks for sharing such information. This is really helpful for me. You can also visit our blog.
    "Mom Blog Names"

    ReplyDelete
  14. hey,
    your website has very useful information..
    Thnaks for sharing
    Please do visit our blog too..
    Blogs for Women

    ReplyDelete
  15. This website has very nice use ful information and do visit our blog

    ReplyDelete

  16. Thanks for such an informative guide. This will be so helpful when people purchase Microsoft Project Standard 2019 software.

    https://digitalsoftwarestore4u.com/product/microsoft-project-standard-2019/
    https://digitalsoftwarestore4u.com/product/microsoft-visio-standard-1-pc-2019/

    ReplyDelete
  17. Thank you so much for sharing this blog with us. It provides a collection of useful information. You obviously put a lot of effort into it!

    Online Tutoring Jobs UK

    ReplyDelete
  18. nice looking sites and great work. Pretty nice information. it has a better understanding. thanks for spending time on it.
    fournisseur de mobilier in cote d'ivoire

    ReplyDelete
  19. We are a well the renowned UK-based organisation aimed to help the students in online essay help editing, improving, proofreading, and providing tutorial services.

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. Quikads; a classified ads platform in Bangladesh. Where you will get so many ideas about second hand mobile phone prices in Bangladesh.

    ReplyDelete
  22. Super and nice blog thanks admin for sharing such a super and amazing blog

    Food Beginning With Z

    ReplyDelete
  23. Amazing post. Thanks for the share. Also, check this out if you are looking for professional website or logo design services:


    Buy Logo

    ReplyDelete

Labels

php (35) javascript (31) phpjavascript (30) jquery (23) html (20) mysql (14) database (9) codeigniter (4) json (4) bar chart (2) calendar (2) column chart (2) framework (2) google maps (2) query (2) tables (2) url (2) dropdown (1)

Popular Posts