JavaScript Date and Time Articles
You are here: irt.org | Articles | JavaScript | Date and Time
Synopsis: Y2K has come and gone. This article discusses Y2K issues still present in JavaScript, and describes how to code around them. By Martin Webb
Techniques: JavaScript, date, getYear(), setYear, getFullYear(), setFullYear(), lastModified, getCorrectYear()
Synopsis: One of the more common features shared by most sites is the "What's New" page. This page can contain anything from news and press releases, to listings of new features that have been added to the site that week. But implementing a weekly "What's New" page can be a daunting task.
Techniques: Automating What's New, date object, self modifying links, forms and drop down boxes
Synopsis: This article discuses timezone offsets, which can be used to display the time anywhere around the world.
Techniques: GMT, Date, getTimezoneOffset, setTime, getTime, setTimeout, MSIE 3 fiddle, am, pm, forms
Synopsis: This article brings together the last few articles, to produce a page that shows all data regarding any date entered: full date, age, events, birthstone, Zodiac star sign, Chinese year, lottery numbers and random colors. As an added extra it also includes images of birthstones, zodiac star sign and the animal associated with the Chinese year.
Techniques: Images, Dates, Frames, location search property
Synopsis: This article describes how to merge all the calendar events and holidays calculated in the three different articles Born of the 4th of July, Easter and The 3rd Saturday in November into one object array. We will also show how to sort the array in JavaScript 1.1 browsers, and how to simulate an array sort using linked lists.
Techniques: Arrays, Dates, Sorting
052. Saturday 6th December 1997 -
Easter Synopsis: This article will describe how to calculate the date of Easter Sunday, "held on a variable Sunday in March or April". This date will then be used to calculate other religious dates dependent on Easter Sunday.
Techniques: Easter, padout, year, month, day, getMM, getDD, getMMDD, accumulated days in the year, leap years, adding or subtracting days from one date to get another
Synopsis: Describes how to calculate the 1st, 2nd, 3rd, 4th, 5th and last weekdays of any month. This will then be used to calculate the dates of various variable Calendar Events or Holidays.
Techniques: Day of the Week, Nth Day, makeArray, Leap Year, calendar events, holidays
Synopsis: This article shows how to display events and birthdays for any specific date. For birthdays it will use JavaScript *.js source files as data files to hold each months birthday data.
Techniques: Holiday events, religious events, birthdays, born today, dates, object arrays, javascript *.js source, src files, data file, scripting script
Synopsis: Describes how to show the year of the chinese calendar that a date falls in, including the dates and days for the year.
Techniques: Chinese New Year, Chinese branches, Chinese stems, Chinese animal, tables, arrays, dates, year, month, day
Synopsis: This article calculates the zodiac sign that a date falls in, including the dates and days for the year, along with the birthstone associated with the month.
Techniques: Horroscope, star sign, zodiac, birth stone, arrays of data, date, days, months, years, range of dates
Synopsis: This article demonstrates how to calculate the day of the week of any date, and using this information retrieves the relevant line from "Monday's Child". It also shows how to show the full date for any given date.
Techniques: Day of the week, Math, floor, date, days, months, years, age, HowOld
Synopsis: This article describes how to calculate the age in years, months and days of someone who supplies their birthdate.
Techniques: Date, days, months, years, age, HowOld
Synopsis: This article demonstrates how to work with dates prior to 1970 and after 1999 without using the inbuilt Date object. It will describe how to pass this information to another frame or to another document.
Techniques: Date bugs, Calendar, months, days, years, leap years, arrays, data input, forms, options, selection, text input, slectedIndex, passing form references, onSubmit, ACTION, validating, parent, frame, search, location, href, substring
Synopsis: Describes how to display and manipulate the current time, show the difference between two dates, show a countdown to and from a specific time and date, and how to trigger an event after a delay.
Techniques: date, time, hours, minutes, seconds, year, month, date, day, UTC(), counters, countdown, countback, setTimeout(), Millennium countdown
Synopsis: Describes how to interrogate the time display different images, and two sample clocks
Techniques: conditional expression, getHours, getMinutes, getSeconds, images, image object, time
Synopsis: Describes how to create your own form spinner object
Techniques: onLoad, client-side image maps, conditional expression, usemap, forms, text box, Coordinated Universal Time, Temps Universel Coordonn�', UTC, HREF
Synopsis: Demonstrations of different calendar displays.
Techniques: JavaScript, Functions, Arrays, Tables, Floating Frames, Windows
Feedback on 'JavaScript Date and Time Articles'
©2018 Martin Webb