Class Anclock
Version
1.00.
<div id="myclock"></div> (...) <script> var oClock=new Anclock("myclock"); </script>
<div id="myclock"></div> <script> var aOptions={...} var oClock=new Anclock("myclock", aOptions); </script>
{date object} getDate()
get the date that the clock currently uses/ shows.
{array} getOptions()
get current options; see setOptions() for details to the options array
{array} getSkin(sSkin)
get skin styling data - it is taken from skin parameter values and filled with options (values of a sckin override options)
{string} getTimeAsString()
get the time as HH:MM that the clock currently uses/ shows.
setDate(oDatetime)
set a time for the clock.
setOptions(aOptions)
Apply new options after the clock was initialized.
The same options array can be used at initialisation.
See constructor on top.
oClock.setOptions={ width: false, // size of the clock height: false, iAnimate: 0, // duration for animation of clock hands [s] bStopped: false, // set true to keep the shown time bShowDay: true, // show day of the month (as text) bShowDigital: true, // Show digital clock (as text) bShowSeconds: false, // Show seconds in digital clock bShowSecHand: true, // show seconds hand in the analog clock bShowTimeAsTitle: true, // use date and time as title bUseOffset: false, // use offset no: show users system time; yes: use iOffset to UTC time iOffset: 0, // offset value to UTC in minutes skin: 'default', // name of existing skin }