Jakub Szczepaniak, home pagePolski

Clock – a simple JavaScript app

The objective is to display information about time. Building a simple interface for it will improve your basic skills and knowledge of JavaScript.

Basic requirements

  1. Show the current time in the HH:MM:SS:MS format (a digital clock):
    • minutes, seconds and milliseconds can be turned on and off
    • the user can switch between the 12-hour and the 24-hour clock
  2. Show the current time on a classic clock face:
    • the second and minute marks on the face can be turned on and off
    • the second and minute hands can be turned on and off

Future improvements

  1. A choice of numerals on the clock face (in a dropdown): Arabic, Roman and custom (the developer’s choice).
  2. A choice of time zone, showing its name and the time difference.
  3. An option to show the day, month, year and day of the week.
  4. The script works as a library, with an API that returns the current time in the formats from the basic requirements.

All notes