The JavaScript Source - Cut and Paste JavaScript Library
Home
Latest Additions
Tutorials
Ajax Tutorials
Ajax
Buttons
Cookies
CSS
Forms
Games
Generators
Image Effects
Math Related
Misc/Libraries/Tools
Navigation
Page-Details
Pass. Prot.
Snippets
Text Effects
Time & Date
User-Details
JS Core Reference
Submit a Script
Web Video Universe
Script Count:  1,411
internet.com 
Navigation Menu

What's New?
Alphabetical Listing
Site Contents


Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements

Home } Time and Date } Index

These scripts all relate to time and dates. Some of them display only the month, others the entire year. Some highlight the current day or tell you when you entered the page. Other scripts display the current date or time according to the user's time zone, or another time zone some other place in the world. The source code is available for all the scripts.

Visit The JavaScript Forum for help coding scripts or general questions about the scripts themselves.


More on internet.com

Attention JavaScript Coders!
Want some recognition for your scripts? Submit them to us and they may be featured on JavaScript Source!


Title: 12/24 Hour Format Clock
Contributor: Sandeep Gangadharan
Contributor URL: http://www.sivamdesign.com/scripts/
Date Uploaded: May 26, 2006
Description: Display the local time in the 12 hour or 24 hour format. Selection is made by the visitor using the radio buttons displayed with the clock.

[ Get Source Code ]


Title: Add Time
Contributor: Sandeep Gangadharan (sandeep@sivamdesign.com)
Contributor URL: http://www.sivamdesign.com/home/
Details: 6.07 KB * Uploaded September 21 2005
Description: Use this script to add time - in the form of seconds, minutes, or hours - to the current time.

[ Get Source Code ]


Title: Age Finder
Contributor: Glub, Un-Inc.
Details: 6.01 KB * Uploaded June 15 1999
Description: Not only will this script tell you how many days, hours, minutes, and seconds old you are, it tells you how long until your next birthday!

[ Get Source Code ]


Title: Alarm Clock
Contributor: John Caranta (caranta@netzero.net)
Details: 5.28 KB * Uploaded December 7 2000
Description: Set an alarm that will play any sound from your computer. You can even select a snooze time after it sounds. Awesome!

[ Get Source Code ]


Title: Annual Calendar with Events
Contributor: Joar Vatnaland ( joar@accelrys.com )
Details: 5.48 KB * Uploaded November 11 2002
Description: Shows an overview of the whole year as a 3 x 4 grid of month calendars. Events are highlighted and generates tool-tip message.

[ Get Source Code ]


Title: Auto Expire
Contributor: Don Demrow
Contributor URL: http://www.euro-innova.com
Date Uploaded: August 11, 2008
Description: Set "go live" and "expire" dates for content, such as "Latest News" or various promotional content. Great for when you don't have time to remember to go back and take old content down, or when you want to create content and have it go live at a later date.


Title: Bar Clock
Contributor: Abraham I. (abraham_824@hotmail.com)
Details: 3.07 KB * Uploaded November 16 2000
Description: Display hours, minutes, and seconds in bars, also gives you hours, minutes, seconds, and complete time with AM, PM status. Great!

[ Get Source Code ]


Title: Basic Calendar
Contributor: Bryan Gamble (bryan_1978@yahoo.com)
Contributor URL: http://www.bmgamble.com
Details: 4.15 KB * Uploaded June 27 2001
Description: Nice calendar for Web page display. Highlights the date and the day of the week. Well-documented code to help you customize any font, color, or size you want. Internet Explorer.

[ Get Source Code ]


Title: Basic Clock
Contributor: Xavier R. (xav@lougaou.com)
Contributor URL: http://www.lougaou.com/
Details: 1.42 KB * Uploaded March 28 2001
Description: This clock continuously updates without the use of a text box. Easily position anywhere on your site. Cool!

[ Get Source Code ]


Title: Basic Date Display
Contributor: Andy Angrick/Mike Barone (contact@cgiscript.net)
Contributor URL: http://www.cgiscript.net/
Details: 1.30 KB * Uploaded January 5 2005
Description: Use this code snippet to display today's date on your Web page.

[ Get Source Code ]


Title: Basic Date Display 2
Contributor: Lee Underwood
Contributor URL: http://javascript.internet.com/
Date Uploaded: June 12, 2006
Description: This script will display the month, day, and year, without the day of the week. Clean and simple. The display can be changed with CSS.

[ Get Source Code ]


Title: Binary Clock
Contributor: Mark Lockwood (sy161e.net@namezero.com)
Contributor URL: http://www.sy161e.net
Details: 2.43 KB * Uploaded September 15 2000
Description: Ever seen binary code? You know, the series of 1's and 0's. This clock actually displays the time in the same binary format. Definitely something cool to put on your site if you are a programmer. ;-)

[ Get Source Code ]


Title: Born on This Day
Contributor: Doc JavaScript
Contributor URL: http://www.webreference.com/js/tips/991021.html
Date Uploaded: September 01, 2006
Description: Find out what day of the week you were born on. Can be customized to add other factors also.

[ Get Source Code ]


Title: Button Time
Contributor: Michael Tartaglia (stonedstan@hotmail.com)
Contributor URL: http://www.geocities.com/SiliconValley/Horizon/5235
Details: 1.72 KB * Uploaded April 16 1998
Description: Here is a pretty neat way to show what time it is - in a little button! When the page is loaded, JavaScript will show a little button with the time! Check it out!

[ Get Source Code ]


Title: Calendar
Contributor: Alexander Babichev (alex_babichev@yahoo.com)
Contributor URL: http://www.fortochka.com
Details: 5.13 KB * Uploaded March 9 2005
Description: This is a plain and simple monthly calendar. It's formatted with styles sheets so the appearance can easily be changed.

[ Get Source Code ]


Title: Check for Leap Year
Contributor: The JSLab Team, Tavs Dokkedahl
Contributor URL: http://www.jslab.dk/
Date Uploaded: April 21, 2008
Description: This snippet will check whether a date belongs to a leap year. Easy to add to an existing script.


Title: Clock Dash
Contributor: KK Chan
Details: 4.83 KB * Uploaded April 10 2002
Description: Uses JavaScript and DHTML to display an elegant clock dashboard with eight time zones.Looks good in the footer of a web page.Tested in MSIE.

[ Get Source Code ]


Title: Clock Type
Details: 1.56 KB * Uploaded June 12 1998
Description: This is a really neat little script that can display the current time in "Military Time" or "12 Hour Time" with the push of a button. Give it a try, it's neat!

[ Get Source Code ]


Title: Cookie Calendar
Contributor: Greg Quilop (web@queriousdesigns.com)
Contributor URL: http://www.queriousdesigns.com
Details: 9.18 KB * Uploaded February 16 2001
Description: This calendar, written entirely in JavaScript, uses cookies to allow users to save information on specific dates. Includes daily and monthly summaries and a complete help file. Cookie Calendar works as its own program as well. Great!

[ Get Source Code ]


Title: Countdown Timer
Contributor: Neill Broderick
Contributor URL: http://www.bespoke-software-solutions.co.uk/downloads/downjs.php
Date Uploaded: August 14, 2006
Description: This script displays a countdown timer and alerts the user when the timer reaches zero. It then redirects to another Web page. Particularly useful if you are writing an online test.

[ Get Source Code ]


Title: Countdown Timer 2
Contributor: Sandeep Gangadharan
Contributor URL: http://www.sivamdesign.com/
Date Uploaded: November 22, 2006
Description: This countdown script prints directly to the page, displaying the time left in minutes and seconds. The time duration can be set in the script. The timer will automatically stop when the time reaches 00 minutes and 00 seconds.


Title: Count Up & Down
Details: 2.72 KB * Uploaded June 30 1997
Description: Here, you can use stopwatch functions to count up and down - separately or together at once. Try it out! A neat JavaScript example.

[ Get Source Code ]


Title: Current Date
Details: 1.00 KB * Uploaded August 18 1998
Description: Use this script to write the current date to your web page. Looks very professional. Another very neat effect - some great JavaScripting!

[ Get Source Code ]


Title: Current Date & Time (Long)
Details: 2.21 KB * Uploaded September 1 1997
Description: This is the somewhat longer way to put the current date & time on your page. It writes in a longer date and time format than the previous date & time script. The script is also longer....

[ Get Source Code ]


Title: Current Date & Time (Short)
Details: 0.29 KB * Uploaded June 30 1997
Description: Put the current date & time on your page with this cool little JavaScript coding. All of 3 lines.....

[ Get Source Code ]


Title: Current Time
Details: 1.45 KB * Uploaded June 30 1997
Description: Use JavaScript to put the current time on your page. It even follows the time in A.M. and P.M.! A nice script.

[ Get Source Code ]


Title: Current Week
Contributor: Mark McCain (sub235k@worldnet.att.net)
Details: 1.75 KB * Uploaded November 3 1999
Description: Displays the date the current week starts on. Useful if you want a new link each week or just to show the first day of the current week.

[ Get Source Code ]


Title: Daily Greeting
Contributor: Peter Ghiringhelli (pg_webmaster@yahoo.com)
Details: 2.53 KB * Uploaded March 16 2001
Description: Display the date on a small calander together with an appropriate salutation based on the time of the day. Nice!

[ Get Source Code ]


Title: Date and Time of Last Visit
Contributor: Patrick Clinger
Contributor URL: http://www.freewebs.com/google_game/
Date Uploaded: July 31, 2006
Description: Display the date and time of the users last visit. Easy to implement.

[ Get Source Code ]


Title: Date-Clock Combination
Contributor: Lazaros Lazarou (lazaros@internet-painter.com )
Contributor URL: http://www.internet-painter.com
Details: 1.97 KB * Uploaded October 9 2001
Description: This is a simple input box that displays the date once the page is loaded. when the mouse goes over the box, the contents become the time!

[ Get Source Code ]


Title: Date-Clock-Internet Time
Contributor: Chris (javascript@crashedstar.com)
Contributor URL: http://www.crashedstar.com/
Details: 2.32 KB * Uploaded February 1 2002
Description: Reads your system time/date and displays it on the page, complete with Internet time. Neat! IE4+ and NS6+

[ Get Source Code ]


Title: Date Format
Contributor: Oded Arbel
Contributor URL: http://geek.co.il/wp/
Date Uploaded: September 27, 2006
Description: This JavaScript date library is an extension of the internal Date object, which enables various formatting of date/time values.

[ Get Source Code ]


Title: Date Images
Contributor: Jeff Harding (jbh@site-ations.com)
Contributor URL: http://www.site-ations.com
Details: 2.28 KB * Uploaded August 29 2000
Description: Displays the current date using images. This allows you to be more creative and use any images you want, such as images that match the color or theme of your site.

[ Get Source Code ]


Title: Date Menu
Contributor: Ben McFarlin (mcfarlin@netscape.net)
Details: 2.67 KB * Uploaded October 25 1999
Description: This JavaScript uses the Date function to dynamically generate accurate dates for the pull-down menus. Each time the user selects a year or month, JavaScript gets the correct number of days in that month and updates the pull down menu. The script is Y2K compliant and also works for leap years. Cool!

[ Get Source Code ]


Title: Date Picker
Contributor: James O'Connor (joconnor@nordenterprises.com)
Contributor URL: http://nordenterprises.com
Details: 22.17 KB * Uploaded October 18 2002
Description: Date Picker provides a pop-up calendar in a dynamically populated DIV. It combines the original date-picker script by Kedar R. Bhave and the overlib library by Erik Bosrup. This method is an improvement over using a pop-up window, since so many people are installing software to suppress the annoying pop-up windows generating for advertising.

[ Get Source Code ]


Title: Date Selector
Contributor: Warren Brown (warren@scully.xfiles.za.org)
Details: 3.87 KB * Uploaded January 7 2004
Description: Yet another handy little script that adds drop down boxes to your site so that you can select dates.

[ Get Source Code ]


Title: Datejs
Contributor: Coolite Inc.
Contributor URL: http://www.coolite.com/
Date Uploaded: June 13, 2008
Description: An open-source JavaScript date library. This library will simplify and enhance the creation of dates in your scripts.


Title: Day Counter
Contributor URL: http://www.manninc.com
Details: 1.70 KB * Uploaded April 24 2001
Description: If you've ever wondered how many wednesdays there are in the current month, this script will tell you that. It can be modified to work with any day of the week, if not all of them together!

[ Get Source Code ]


Title: Day of Week
Contributor: Alexei Kourbatov
Contributor URL: Linuxtopia
Date Uploaded: December 10, 2008
Description: Use this script to calculate what day of the week a given date occurred. Can be used for past or future dates.


Title: Days Between Two Dates
Contributor: JavaScript Demos
Contributor URL: http://www.javascript-demos.com/
Date Uploaded: January 9, 2006
Description: Use this script to figure out how many days there are between two given dates. Very easy to implement.

[ Get Source Code ]


Title: Days Left
Contributor: Justin Smith (jsmith@polbox.com)
Details: 0.90 KB * Uploaded February 18 2000
Description: Procrastinators everywhere, rejoice! If many of your projects end up being due on the first of the month, do you know how many days do you have left? This script calculates and displays the number of days (not weekdays) left in the current month in a snap. And, the script has no trouble with leap year or Y2K.

[ Get Source Code ]


Title: Days Old
Details: 0.99 KB * Uploaded March 31 1999
Description: How long have you had that job? How many days old are you? Find the answers to these questions and more!

[ Get Source Code ]


Title: Days Remaining
Contributor: Robin Jones
Contributor URL: http://www.robinjones1.freeuk.com/
Date Uploaded: December 16, 2005
Description: Display the days remaining until a specified date. Short and effective.

[ Get Source Code ]


Title: Days Remaining in Year
Contributor: Paul McFedries
Contributor URL: http://www.mcfedries.com/JavaScript/
Details: 1.88 KB * Uploaded January 24 2005
Description: Use this script to calculate the number of days between now and the end of the year.

[ Get Source Code ]


Title: Days Since
Contributor: Chris Hallberg
Contributor URL: http://kanoa.heavenfromhell.com
Date Uploaded: June 26, 2006
Description: This script displays the number of years, months, and days since a selected event. The output can easily be formatted using CSS.

[ Get Source Code ]


Title: Days till Date
Contributor:Alan Palmer
Contributor URL: http://www.jsr.communitech.net
Details: 1.16 KB * Uploaded July 24 1998
Description: This little JavaScript will take an event or date in the future and compare it to the current date, then display how many days until that date/event occurs. Pretty neat! Lots of uses... (Marriage countdown, till school's out countdown, etc)

[ Get Source Code ]


Title: Deluxe Calendar Generator
Contributor: Nikola Vrtis (nikki@vrtisworks.com )
Contributor URL: http://www.vrtisworks.com/kiki/
Details: 18.00 KB * Uploaded September 16 2002
Description: This calendar script allows the user to change titles, fonts, and colors, plus it adds links, gives instructions, and creates a new page to be saved. Based on an older script by Matthew D. Krieg.

[ Get Source Code ]


Title: DHTML StopWatch
Contributor: John Livingston (wavwizard_wavmaster@yahoo.com)
Contributor URL: http://wavsyntax.bravehost.com
Details: 2.29 KB * Uploaded September 09 2004
Description: Use this DHTML/JavaSctript stopwatch to track your times. It includes reset/start/stop buttons and each one has a rollover effect.

[ Get Source Code ]


Title: Digital Clock
Contributor: Ramandeep Singh (ramandeepji@yahoo.com)
Contributor URL: http://hard-drive.hypermart.net
Details: 3.36 KB * Uploaded March 2 2001
Description: Displays the time like a real digital clock. Changes rapidly and includes hours, minutes, seconds and AM/PM indication. Neat!

[ Get Source Code ]


Title: Digital Countdown
Contributor: DendE PhisH
Contributor URL: http://www.geocities.com/duffer121/
Details: 4.12 KB * Uploaded October 2 2001
Description: Countdown from any date in digital numbers. Displays days, hours, minutes, and seconds while updating every second. A must see!

[ Get Source Code ]


Title: DS Analogclock
Contributor: Dario Sciacca (dario@dseffects.com)
Contributor URL: http://www.dseffects.com/
Details: 0.93 KB * Uploaded December 22 2003
Description: This script displays an analog clock on your site. It includes an HTML code generator.

[ Get Source Code ]


Title: Dynamic Calendar
Contributor: Nick Korosi (nfk2000@hotmail.com)
Details: 7.06 KB * Uploaded December 27 1999
Description: This calendar allows you to select a month and year and automatically display the a complete calendar for that month in Dynamic HTML. Great!

[ Get Source Code ]


Title: Dynamic Clock
Contributor: Craig Lumley
Contributor URL: http://www.ws4all.co.uk
Details: 1.66 KB * Uploaded January 17 2000
Description: (Version 4.0+ browsers) Using layers, JavaScript can display a real-time clock your page. This is a really professional way to add that special touch to your web page. And, watch as the clock on your page updates every second. All done without using forms, cool!

[ Get Source Code ]


Title: Dynamic Timed Redirect
Contributor: Jon Brown
Contributor URL: http://allthingsrunescape.freewebs.com
Date Uploaded: October 04, 2006
Description: Redirect the user to a different Web page after a designated number of seconds, while displaying a countdown in the document title representing the number of seconds left before redirection.

[ Get Source Code ]


Title: Easy Time Zone Offset Calculator
Contributor: William and Mari Bontrager
Contributor URL: http://willmaster.com/
Date Uploaded: October 09, 2006
Description: Do you have your office hours posted on your contact page? Do you have regularly scheduled chats or other Internet events? Use this script to show your visitors what time that would be in their time zone. Heavily commented.

[ Get Source Code ]


Title: End of Week Date Lookup
Contributor: Jake Aitchison
Contributor URL: http://www.webdeveloper.com/forum/showthread.php?t=184698
Date Uploaded: June 30, 2008
Description: Use this script to display the date of the end of the week for any given period during the year. Fully customizable and easy to use.


Title: English Date
Details: 1.66 KB * Uploaded January 22 2000
Description: This script show the date in the traditional English format.

[ Get Source Code ]


.

Title: Event Calendar 2
Contributor: J McCaul (entiempo@ziplip.com)
Contributor URL: http://www.lunarliving.org
Details: 19.16 KB * Uploaded November 05 2004
Description: Create your own event calendar using this script. Just add in your special dates make a few selctions and your done. The calendar can be printed or saved as an html document.

[ Get Source Code ]


Title: Event Calendar Code Generator
Contributor: Matthew D. Krieg (battlebots102001@yahoo.com)
Details: 7.53 KB * Uploaded March 13 2002
Description: This script generates code for an event calendar instead of having to do the tedious task of making one each month. This completely simplifies the table making involved. Just punch in your data and cut and paste the code.

[ Get Source Code ]


Title: Event Countdown
Contributor: James Crooke
Contributor URL: http://www.cj-design.com
Details: 2.36 KB * Uploaded November 21 2005
Description: An easy-to-use countdown script which can also count towards a specific amount of days (e.g., day 12 of 30). (Additional uses listed in script.)

[ Get Source Code ]


Title: fcp.Calendar
Contributor: Felix Plesoianu
Contributor URL: http://shadow-v.home.ro/index.html
Date Uploaded: December 15, 2006
Description: A tiny, self-contained JavaScript library which displays a Gregorian calendar. An event is triggered when a user clicks on a date. Fully customizable via CSS. (Uses a European layout, i.e., the week begins on Monday.)


Title: Find Friday the 13th's!
Contributor: Donnie Brewer (brewsky@cox.net )
Details: 4.76 KB * Uploaded November 15 2002
Description: This will display all the Friday the 13th's for a range of years. You may also select a certain month to review! Awesome show of how to interpret and change the date parameters within javascript!

[ Get Source Code ]


Title: First Day of the Week
Contributor: Kevin Swarts (kswarts@nAlliance.com)
Contributor URL: http://www.nAlliance.com/Open/JavaScript/Source/FirstDaysOfWeek.html
Details: 1.62 KB * Uploaded August 20 2001
Description: This script will return a list of dates that are at the beginning of every week within a given month. IE 5+, NS 6

[ Get Source Code ]


Title: Monthly Calendar with Reoccurring Events
Contributor: Shaun Bailey
Contributor URL: http://www.sbwebdevelopment.co.uk
Date Uploaded: March 7, 2007
Description: Features include one time, weekly, monthly, and annual events. Monthly navigation uses links or a dropdown list. Easy to customize using CSS. Can be integrated with a server-side language to retrieve events from a database.


Title: Mouse Trail Clock
Contributor: Amy Cook (ncgoddess@msn.com )
Contributor URL: http://ncgoddess.com/script.html
Details: 7.48 KB * Uploaded June 20 2002
Description: Just a neat little trick, a display of date/time around the mouse pointer

[ Get Source Code ]


Title: Multi-Display Clock
Contributor: Ryan Provost (mrmp_rpr_2003@yahoo.ca)
Contributor URL: http://rynprov.100free.com
Details: 7.10 KB * Uploaded September 26 2005
Description: This is a multi-display clock with local time, UTC time, local/UTC decimal time, UMT, hex time, Swatch Internet Time, New Earth Time, and a countdown clock. IE only.

[ Get Source Code ]


Title: Rainbow Clock
Contributor: Alexander Babichev
Contributor URL: http://www.fortochka.com/JavaScript/DigitalClock/DigitalClock.htm
Details: 0.58 KB * Uploaded August 12 2004
Description: A rainbow digital clock will certainly brighten up your site. This script is very easy to use and implement.

[ Get Source Code ]


Title: ServerDate to JavaScript
Contributor: Emery Wooten
Contributor URL: http://www.mresoftware.com
Details: 2.48 KB * Uploaded July 12 2005
Description: Transfer your server date/time to JavaScript without using Server Side Includes or renaming the page with a .php extension. This script lets you control the initial date/time used by your scripts and makes them independent of the user's local time. Uses JavaScript and PHP.

[ Get Source Code ]


Title: ShowDate Function
Contributor: Demetrius Francis (dem_@hotmail.com)
Contributor URL: http://www.angelfire.com/de/draf/
Details: 3.77 KB * Uploaded November 18 2004
Description: This script is a great example that shows the date in different formats from one function.

[ Get Source Code ]


Title: Simple Calendar
Contributor: Francis Cocharrua
Contributor URL: http://scripts.franciscocharrua.com/
Date Uploaded: July 7, 2006
Description: This script displays a calendar page of the chosen month and year. The function takes a date object as its parameter. If it is omitted, the calendar will default to the date on the client computer.

[ Get Source Code ]


Title: Standard or Daylight Time
Contributor: Professor
Contributor URL: http://www.professorscodingcorner.com/?ID=040
Date Uploaded: March 09, 2007
Description: Is it Standard or Daylight time? This script fills in the correct middle letter of the time zone designation so that either an "S" is shown for Standard, or a "D" for Daylight time. The first function of the script may be used independently if you just need to know in which segment of the year a given date/time is. Adjusted for the new 2007 time changes.


Title: Time of Day Picture Change
Contributor: Anonymous
Contributor URL: http://musikimiz.googlepages.com
Date Uploaded: March 28, 2008
Description: Use this script to change a picture (or banner) depending on the time of the day. Very simple to use!


Title: Time Spent on Page
Contributor: Cody Shaffer
Contributor URL: http://codytheking313.byethost11.com
Date Uploaded: March 22, 2006
Description: This script displays an alert message when a page is closed, telling the visitor how long (in seconds) they have been on the page. It can also display the time on the page in the title bar.

[ Get Source Code ]


Title: Title Bar Clock
Contributor: Alex Jarvis (gamemastax@hotmail.com )
Details: 1.53 KB * Uploaded August 5 2002
Description: This neat script runs a handy clock in the title bar.

[ Get Source Code ]