Simple analog and digital clocks

Here is a simple analog clock.
Remember it shows your pc time (so it is not guaranteed it’s correct)

simpleClock

simpleClock.wick (3.4 KB)

1 Like

can you do a digital one for me to use?

Yes I can do it but I guess you can understand how to do it by watching the code I posted.
I imagine you can do a digital one writing Hours and Minutes in a textField or you can create your graphic Clip and tell to go to the correct frame based on the time.
You may give it a try and I’ll help for any issue.

I uh…
can’t
i can’t really code a whole lot so i wouldn’t know how.

ok.
I was ready for that :smile:

analogAndDigitalClocks

analogAndDigital.wick (212.5 KB)

1 Like

is there a way to make it a 12hr clock and not a 24hr?

image spits this out on the update thing

this is a reply for your question: It is possible to make is 12 h not 24h

sure
add:

if (h>12){
  h-=12;  
}

after:
var h=d.getHours();

in setDigital function

I also did a clock!

Depending on the hour it changes the background.

I didn’t know where to post it so i’ll post it here because this post is about digital clocks anyway.

date and time v62-2-2021_12-29-53.html (2.2 MB)

@Watrmeln
my project does not show any error.
what’s your time now?

It’s 1:44 PM EST where i am now
ps how can i also get the date?

I double checked and i receive no errors
this one show you time in 12h (but you can change it)
for date you have to wait. time to go out for me.

analogAndDigital02.wick (212.6 KB)

How can i provide a way to switch from 24hr to 12hr? and vice versa?

ok
in this last version you have date and time
it’s a revisited version. just copy and paste the clip in another project and all should work (you may loose the font of the textfield tough)
if you press the green dot you switch from 12h to 24h. just edit the button according to your tastes.

digitalClock03.wick (211.3 KB)

Managed to hack something together that works nvm

Nice steven !