Articles Tutorials Work at Home Entrepreneurs, Webmasters, Small Business Owners
Articles Tutorials Work at Home Entrepreneurs, Webmasters, Small Business Owners
Articles & Tutorials for Work at Home Entrepreneurs
Webmasters and Small Business Owners
Get More >

Newest Articles 
CSS
Web Design
Graphic Design
Color Theory
Promotional
Make More Money
Timesavers
Business Ethics
Glossary of Terms
Reviews
Marketing
Business Resources




Name
Email

Link to Us!

Web Design
Email this article  :  Printer friendly page


What Is The Current Date?

Have you ever wondered how you can display the current date to your web site visitors? Do you really need to and why would you want to? Don't your site visitors already know the date? We are often asked these questions and this is the topic of this week's article. We will also give you some free code to use should you decide it is a feature you want to use on your web site.

If you take a look at many of the leading, big-boy web sites (as we like to call them), you will notice that many of them are certainly displaying the current date. It seems to be the trendy thing to do these days and many of our web site templates include this feature. Do not take it for granted that your site visitors already know the date. The WWW is global and time zones are a big factor to consider. Also, many people work with dates far ahead in their everyday jobs, so it is often not something they are quick to know.

3 Reasons Why You May Want to Include the Current Date on Your Web Site:

1. Do you own an ecommerce site and offer limited time specials that ends on a specific date? You certainly may want to consider displaying the 'current date' feature.

2. Does your site offer information that changes on certain dates or days of the week? If so, your visitors would find it beneficial to know that today is Friday and you will be publishing new content on Monday. Don't take it for granted that people are quickly aware of the day of the week either.

3. Do you want to offer easy, trendy features to your site visitors like the big boy sites? After all, the big boy sites set the tone for what's hip and what's out of date. Offering outdated features on your site, may give your visitors the impression that your site is stagnant and not updated regularly.

There are many, many ways to display the current date. We will be using a JavaScript code snippet that is easy for you to place into your web page. The code is shown below. Simply copy/paste it into the area of your page where you want the current date to appear. An example of how it will appear on your web page is shown above.

<script language="JavaScript">
myvar = new Date();
Month = (myvar.getMonth() + 1)
Year = (myvar.getYear())
if (Month == 1) {TheMonth = "January";}
if (Month == 2) {TheMonth = "February";}
if (Month == 3) {TheMonth = "March";}
if (Month == 4) {TheMonth = "April";}
if (Month == 5) {TheMonth = "May";}
if (Month == 6) {TheMonth = "June";}
if (Month == 7) {TheMonth = "July";}
if (Month == 8) {TheMonth = "August";}
if (Month == 9) {TheMonth = "September";}
if (Month == 10) {TheMonth = "October";}
if (Month == 11) {TheMonth = "November";}
if (Month == 12) {TheMonth = "December";}
document.write(TheMonth+" " +myvar.getDate()+", "+Year);
</script>

If you want to change cosmetic characteristics of the current date option such as the font face, size, color and alignment, check out our CSS (cascading style sheets) tip, "Cosmetic Customizations to the "Current Date" Feature".


Copyright © 1994-2006 by BasicTips.com, a division of BasicTemplates.com, CSS HTML Web Site Templates with Exernal CSS and Removable Graphics. If you found our articles helpful, subscribe to our newsletter and get articles like this delivered to your inbox - FREE.

Newest Articles in
Web Design
How to Choose Website Templates
HTML Slideshow: 5 Easy Steps
Intro to SSI (Server Side Includes)
Is Your Site Designed to Make Money?
I Want the Meat. Not the Meat Wrapper!

 

Page copy protected against web site content infringement by Copyscape
All articles are originally authored by BasicTemplates.com. Reprints in whole or in part are not permitted. See Copyright Notice

Copyright © 1994-2006 BasicTips.com, a division of BasicTemplates.com, Web Site Templates with External CSS
The Internet's #1 Choice for HTML CSS Web Templates via a Membership. Designed using External CSS and Removable, Swap-Out Graphics.
Basic Web Templates | Website Templates | HTML CSS Templates | Web Design Templates | Web Site Templates