I prefer to display the H:M:S digital time with the seconds having a different colour from the hours and minutes. This can easily be done by having two digital time elements, with one having a text specification of #Db#:#DmZ#: and the other #DUsZ#
This requires the left hand element (hrs, mins) to be right justified and the right element (secs) to be left justified, though that has the disadvantage that it is not possible to centrally justify the combined time display.
I’ve already found one solution, which was to have two sets of times - one for times with single-digit hour values and another for double-digit hour values. Each set was then manually centred.
However, is there an easier way? I wondered if it was possible to put my two digital time elements into a container that can be given a justification setting independent of its contents.
You would need some kind of grouping feature with common properties adjustable for such group. This is not possible on Facer.
Other two ways would be
either to split the time even further and center each on its own,
or simply find suitable font with fixed width of digits.
And finally you could make formula for the x-coordinate of the time text fields, that would shift them around, depending of how many digits they contain.
Sadly, you have confirmed my feeling that a container-based solution is unavailable in Facer.
Thanks for your alternative suggestions, but they don’t appear to address the issue of the width changing when the hours value moves from one to two digits. My existing solution is designed to handle that and it works very well.
There are many fixed width fonts available and in combination with leading zero tags should resolve your problem. Another solution would be to use images of the numbers - if this method appeals to you it has been discussed here in the community you just need to search…
A leading zero for hours would certainly simplify matters, but I prefer to avoid using a leading zero.
I’m not sure how mrantisocialguy’s proposal would work better than my existing solution I described earlier. However, I’d like to know more about the code. What is the meaning of the (0-5) and (0-9) prefixes?
Those just are to show the number range of each of the expressions (0-5) is zero 10’s of minutes or seconds through 5 10’s of minutes. You can hide the leading zero for hours by using $#Db#<10&&#DTIMEFORMAT#==12?0:100$ in the opacity box.
To see how I use those expressions take a look at this watchface. Inspection is open.
In the example above (tens of minutes) includes the digits 0 - 5 and to split out the tens of minutes the tag (floor(#Dm#/10)) is used, #Dm# is the tag for minutes.
Thanks for the clarification. I did indeed misunderstand MAG’s original post on this topic. I had assumed that those prefixes were part of the formulas!
However, I don’t yet understand the benefit of splitting a digital time display into 8 separate elements. My own solution simply uses #Db#:#DmZ#: for the hours and minutes (and colons), with #DsZ# for a separate display of the seconds.
If I used a leading zero that would be sufficient for my purposes, but as prefer to avoid leading zeros, I have two sets of those displays, each centred on the watch face. I use opacity settings of $#Db#>9?100:0$ and $#Db#<10?100:0$ to switch between each set.
@mrantisocialguy gave you an alternative simple way which would serve you well in your future designs. In his method each digit could be coloured differently should you wish.
Your method works - the benefit of his is that it can be used to format in different ways.
Search the community - a lot has been changed over the 3 years you were away. Many new tags introduced and many posts about time and how to show it
When I said I didn’t understand the benefits of his coding, I meant in the context of only changing the colour of the seconds display.
My preference is for relatively restrained designs that maximise legibility and I doubt if I would ever wish to give each digit a different colour. To each his own