this is Multiclock

by P.Tsiros

javascript analog clock with alarms and timers
( rather a multi-alarm multi-zone clock with 17 enhanced timers)


Bug reports, suggestions, comments or any ideas may be sent to Tsiros

   




popup


Download multiclock V3.2a  multiclock V4.1 (Hor)  multiclock V4.1 (Vert)

Last modifications 28 Dec 2008

 

QuickStart and setup

Before you start clicking, please read the following:

In order to hear the sound from the alarm, multiclock.htm must exist with a file named "notify.wav" in the same directory.

You can change the face of the clock by editing the day.gif and night.gif

CPU usage ~1%

Your browser must accept cookies in order to remember the settings.

The first time you open the clock at the center you see the word "Local".The CurrentRegion is "Local". If you don't see it, press the control "LR" (i.e. Local Region).

Directly below the "8 hour" there are two controls. The upper one (the GMT offset control) displays the time zone for this region (the CurrentRegion). Left click on it until it display the correct GMT offset for your time zone.(if it reaches 13 restart from -11).Or right click on "LR" label.A prompt window is displayed.The format for this prompt is 

button label(twoletters);region_name;mouseover_message;GMT_offset.

Then erase the GMT_offset and write your timezone.

The other control is the "switch GMT/DST". This must be set to display "DST" if this region (the CurrentRegion which now is the LocalRegion) uses Daylight Saving Time (Summer Time).

Now the clock must display the correct local time.

Now click on the control with label "NY". At the center you see the label "New York". The current region now set to New York.

The GMT offset control displays the time zone for New York "-5" (GMT-5)

The other (the "switch GMT/DST") must be set to display "DST" if this region uses Daylight Saving Time (Summer Time). If not, select GMT.

If the settings are correct the clock will display the correct time for New York.

This way you can fill the empty positions or make any changes you want to any region..

If the GMT offset is not a whole number fill the prompt window this way

KA;Kathmandu;Capital of Nepal;5.75      for Kathmandu with GMT +5.75 ie 5hr 45'  or

AD;Adelaide;Australia;9.50   for Adelaide with GMT +9.50 ie 9h 30'

Note! the offset is a decimal and not 5.45 (hh.mm)

If the time is AM, you will see a picture with blue color else you will see another.

 

Help for the alarm.

Because the clock use cookies to store the alarms you are limited (if the alarm messages are 30-40 characters long) to about 60 alarms.

On the top left you see two controls

1.  The alarm switch ON/OFF (now OFF) 

2. The alarm counter which display "1".

This means that the first alarm for the current region is disabled

Move the yellow pointer to some position with your mouse.

Then click on OFF.A prompt window will appear.

You see the date and the time separated with space.At the end, after the semicolon, if you want type a message (and/or change the time).Press OK.

When the hour pointer reaches the yellow, a message is displayed with the name of city where the alarm is set.

If you want to add another alarm,  click on the alarm counter. The switch turns to OFF and the alarm counter displays "2".

Or simply click where you want and the alarm counter jump to the next empty alarm position.

The same procedure for the next alarm.

You may browse through the alarms by continuously left clicking on the AlarmCounter. When you reach the end you see the next empty position. This way you can delete unwanted alarms (by turning the switch to OFF) or edit any alarm by RightClicking the AlarmCounter..

If you have defined three alarms and you delete the first then the alarm counter will jump to the last alarm; which now is the second.

So you don't see the OFF and "1" but  "ON" and "2"

When your mouse is over the alarm counter a small message box appears and displays the date, the time and the message for that alarm.

Warning! The alarms are sorted!.

When you set an alarm for a region, the label of the region change to red in order to remember pending alarms.

the format for the simple alarm is [dd[/mm[/yyyy]]] hh:mm (if the date format is set to dd/mm/yyyy)

Some examples

12:45;bla bla         the simplest form. The clock add the nearest date 

12/1/2005 10:45      here a full date is provided (the clock is not allowed to make any change).If is not a valid dataTime, you will be prompted again.

12/4 10:45     here the clock add the year

12  11:45;and this is OK.   The clock add the month and year (again to create the nearest valid datetime)

An important note.When you define an simple alarm, his state is the "waiting state".By the way,the simple alarm does not have any other state.He waits, then rings and after this he is removed.

 

Repeated alarms

If you have something to do at regular time interval.(take a pill every 8 hours or drink two glass of water every 4 hours) this clock can help you.

Create an alarm (as described above). Dont care about the time.

The prompt window appears.Erase the data and write: + 12:00 8:00;the message   (+ space 12:00 space 8:00;bla bla bla) Press OK.

You have defined an alarm that rings every 8 hours starting from 12:00 (12:00 is the BaseHour and the 8:00 is the StepHour)

The + 13:05 15 means repeat the alarm every 15 minutes starting from 13:05 (included)

The + 20 means repeat an alarm every 20 minutes from now (now not included )

The + 8:10 means repeat an alarm every 8 hours and 10 minutes from now

The + 2:8:10 means repeat an alarm every 2 days 8 hours and 10 minutes from now

+ 1:145:200 is converted to + 7:4:20 (every 7 days 4 hours and 20 minutes from now)

Don't forget the space.Else you get an error

The format for repeated alarms is: + [[dd][/mm[/yyyy]] [hh:mm]] [[dd:]hh:]mm (again, if the date format is dd/mm/yyyy)

An important note.The first time a repeated alarm rings it goes into a new state.This state is named "running state".The previous was the "waiting state".

Some valid repeated alarms.

+13 12:12 23  or  +   13    12:12     23   or 13  12:12      23   (multiples spaces dont produce error)

+13/1 10:10 1:2:33 

+13/1/2005 12:12 3:56

12:123:555

1000

but 12:12 means simple alarm.You have to write  +12:12.This is the only case where the + is needed 

When your mouse is over a region label the hint show the alarms (if any) of this region converted to the date/hour of current region.

When your mouse is over the CurrentRegion label the hint show all the alarms (if any) of all regions converted to the date/hour of CurrentRegion

You must know this.

Suppose that you have defined some alarms on a region.If you change the gmt or dst setting of this region the alarms in "waiting" state does not change.The date of a meeting must remain unchanged

But repeated alarms in "running state" are changed in order to keep the time interval fix (the important now is this time interval) 

Very important note:There is no any change in repeated alarms  if you change the time of computer.So avoid this if you have defined repeated alarms. 

The Timer

This Timer is a little complicated.But show what a Timer must do.

Each region has its own timer.Consequently there are 17 independent timers!

1. LeftClick on timer and the count start. LeftClick again stop. Now Rightclick and nothing happens (later what actually happens).Again Rightclick and the Timer show 00:00.

2.When the Timer show 00:00 by LeftClick or RightClick the Timer stores the StartTime. Think of StartTime as the Time when you start an observation

3.When the Timer stops (and stops only with LeftClick) the Timer stores the EndTime. Think (and actually is) of EndTime as the time you end an observation..

4.When the Timer is stopped, RightClick and the Timer stores again the EndTime.

5.When the Timer count, by RightClick the display freeze but the Timer count.RightClick and unfreeze or LeftClick and the display show where stopped

6.When you cause the timer to store the EndTime (as in 3,4) the hint of Timer ( the three first lines ) show in per cent the division (Duration of observed event) / (Duration of whole observation).Next the number of observed events and next the mean duration (in seconds)

When the Timer count (either the display is freezed or not), every time you press the RightClick the time (of timer, not clock) of this event is stored.When you stop the Timer the hint display (the last lines) a) how many times you have press the RightClick b) how many per minute and c) the mean time between these events. This way you can track individual events.

Warning :this timer is accurate (in his own way) but does not work like a chronograph.

Duration of observation : EndTime-StartTime= 06:43-05:44 = 59 sec (LeftClick)   06:54-05:44 = 70 sec (RightClick)

Number of observed events : 2.  Duration of observed events (timer counter) 49 sec. Mean duration 49/2 = 24.5 sec

Per cent : 49/59 = 83% (LeftClick) 49/70= 70% (RightClick)

times per minutes (red dot) 5/49=6.1

mean time between red dots (43-5)/4=10.5 secs

Think of the red dot as something which happens only when an event occurs.

 

 Customizing names of days or date format

RightClick on the "V 3.1".You see the names of days and at the end a "false"

the false means: use the default format dd/mm/yyyy.If is set to "true"  then clock use the  mm/dd/yyyy format.

But be carefull when use the mm/dd/yyyy format! Because 1/11 10:00 means set an alarm at the 11th day of january but 11 10:00 means set alarm at the 11th day (this month or next month)

for the days things are simpler and there is no need for explanations.

Add the clock to the Windows Active Desktop

The clock can be added to your desktop using Windows Active Desktop.

Open the display properties page either by right clicking on the desktop and choosing 'Active Desktop > Customize my Desktop' or by going to the Control Panel and selecting display. Go to the 'Web' tab.

1. Tick the box that says 'show Web content on my Active Desktop'

2. Click the 'NEW' button and select the file 'multiclock.htm'

3. The window will appear on your desktop.  Close the properties page and move and resize the clock to suit.  There is a link on the page which if you leave visible enables you to launch the clock in a window from the desktop.  When you have it where you want it to stay right-click on the desktop and go to 'Active Desktop > Lock Desktop Items'.  Your clock will now stay put.

Notes and Calculations

LeftClick on the "V 3.1" and the alarms/notes window opens

You can "mark" a time and create a note or do a calculation by RightClick on the alarm window.Clicking on the created time link you can write a short note. i.e. just now i have this strange feeling or my wife has called me or (4+ log(74))/sin(88) (read calculations).In the last case if the expression is valid you get the result. With LeftClick you can correct it.Yes, you can "erase" it when have done with it, by RightClick on the link. Yes, the hint show the time passed since that.

You can use the javascript functions.Like sin cos tan log etc.Angles in radians.

You can define and variables.ie   a=45/6;b=2*a;c=a+b (in one prompt window)

If you have defined variables in different prompt windows and you change the value of one,you have to refresh the alarms/notes window (close and open) in order to recalculate the expressions.

About V4.0

the Clock always display a Moment.This is the CurrentMoment.Every  region display the same CurrentMoment

Every region has a different description for CurrentMoment.A CurrentMoment is defined by a Year,Month,Date,Hours and minutes.

The Year, Month and  date of CurrentMoment defines the CurrentDate. CurrentDate is "today" for Currentregion.

Same way the selected region is the CurrentRegion. "Here" for this clock is the CurrentRegion. None region, including LocalRegion, has for this clock any special meaning. You can name Local region as you want (exactly like the others).Nor his position means something.

When you change region, you are moving only in space.There is no change to the CurrentMoment.But the CurrentDate (perhaps) CHANGE.

Again each region has a different description (because of GMT offset and DST) of CurrentMoment.Perhaps different hours, minutes, date or month, even Year.But it is the same moment.

Only when  you click a day you change the CurrentMoment.Of course you change the CurrentDate

When you click on NOW, you set CurrentMoment to NOW.This NOW of course in terms of CurrentRegion. "NOW" means now and here. ("here" is CurrentRegion).

From any CurrentDate you can set an alarm to any other date if this date is after NOW. The background of this date change to red.If you click this "red date" (ie you make this date to be CurrentDate) the region turns to red.

When your mouse is over a red Date, the hint shows the alarms of all regions that will ring this Date (in terms of CurrentRegion) sorted and converted to the CurrentRegion time.

When the mouse is over a red region, the hint shows the alarms of that region that will ring this day(ie CurrentDate) sorted and converted to the CurrentRegion's time.When at the same moment an Australian and a American say "today" perhaps (ie there is a possibility) they say the same words but they dont means the same thing."Today" is a time interval and as time interval is perceived.

When you change regions then red regions maybe appears or disappears and some red days (in calendar) maybe shifted left or right. This happens because CurrentDate is not the same for these regions.

Other programs

If you deal with a lot of mathematical calculations, you may wish to try my SuperCalc


Hosted by Freeo.Net free web hosting.