Prev and next Hours

Hello, everyone,
I’m just freaking out…
I’m trying to show future hours in 24 hour format. But I can’t do this. From 12:00 p.m., 01:00 a.m. is displayed again in the 12 hour format.
From 8 a.m. (AM) the problems start…

The past few hours have also caused problems.
If the clock shows 1 a.m., then the past hours are displayed as 59, 58, etc.

I hope you can give me a tip… Thank you in advance…

1 Like

Not sure you are using the right tag. For 24h, you can use #DH#.

Also not sure why your formula is so complicated.
+1: (#DH#+1)
+2: (#DH#+2)

but maybe I did not get what you are trying to achieve…

3 Likes

Hi @daredevill . Sorry to say your Face is a bit of a mess .

your Hrs-1 Text Tag includes

$((#DH#+59)%60)<10?0:$((#DH# + 59) % 60)

So that is why it is showing numbers like 59 .

You have to decide if it is a 12 or 24 hours Digital . As @tom.vannes has pointed out .

#Dh# = 1 - 12 hrs

#DH# = 0 - 23 hrs

Mixing them up gets one into a bit of a pickle .

You are very nearly there . Switch off all the layers except the ones to the right and left of your real time . Work on one at a time and let it grow .

2 Likes

Look here. I’ve helped with it once before. Hopefully that makes it clear how it works.

2 Likes

I’m not good at coding, but maybe my version will help you.

2 Likes

@petr.patocka Not sure where that link is supposed take us.

So sorry I clicked on the link Last night and it took me to the main Facer.io page ,
This morning it works fine .
I find this Jiggery Pokery a bit difficult .
I see it working but do not have the Wit to convert it to 24 hrs as @daredevill was asking .

to a test watch that seems to work

2 Likes

Hi @daredevill,

As @tom.vannes & @russellcresser point out, mixing 12/24 hours in scrolling previous/next numbers can be a pickle, but it can work. The following example from the old facer elements only challenge makes it work & is fully 12/24 hour compatible. For your example, just swap the X & Y Axis. Good luck!

Edit:
Or perhaps if you want things that only start to shift slightly before the time change, this example may be of use:

3 Likes

Good Morning all,

in advance, many thanks for your help. I’m a little further now.
But… maybe I’m too precise… but at the turn of the day (i.e. between 11pm and 2am) the formulas indicate chaos!
Here is an example of the formulas of @bradtc :
Screenshot 2022-10-13 060101

and the example of @russellcresser 's and @tom.vannes formula:
Screenshot 2022-10-13 060246

But maybe FACER can’t process it properly.

1 Like

Facer copes well with this stuff. You have some Syntax problems. They are always difficult to Debug. Take a good look at @bradtc Faces he has I cracked there. It is crossing the Zero that is always the problem. It has been done in many ways by Differen people. Keep at it.

2 Likes

You always have to add the whole period you want the text to cycle trough and use modulo (reminder of division) with period length.
Check this example:

6 Likes

Many Thanks @petruuccios
Now my clock is running “round” and is now online.

3 Likes

You are welcome. I just find it a bit strange, that you use leading zero for the central hour but not for the other hour texts on sides.
image

2 Likes

Que lindo amigo…estou encantado