Amとpmで、色を変更したい

KLCKで、24時間針を作った。
AMとPMで、針の色を変えたい。

色パラメーターに、以下の計算式を入れたが、指定した時間に色が変わらない。

計算式が間違っていると思うが、どこが間違っているか、分からない。

教えて欲しい。

計算式↓

$if(df(hh)>=12,0067C0,F58220)$

df(h) can be 12h/24h depending on your settings, df(H) is always 24h time.
df(a) is AM/PM in 12h mode and empty in 24h mode, df(A) can be used to get AM/PM regardless of settings.

so you can use:

$if(df(A)=PM, 0067C0, F58220)$

or

$if(df(H)>=12, 0067C0, F58220)$

Google translated:

df(h) は設定に応じて 12h/24h になりますが、df(H) は常に 24h 時間です。
df(a) は 12h モードでは AM/PM で、24h モードでは空です。df(A) は設定に関係なく AM/PM を取得するために使用できます。

次のコードを使用できます:

$if(df(A)=PM, 0067C0, F58220)$

または

$if(df(H)>=12, 0067C0, F58220)$

ありがとうございます。

試してみて、結果報告します。

結果報告です。

$if(df(H)>=12, 0067C0, F58220)$
↑の計算式で、動きました!!

ありがとうございます!!

1 Like

This topic was automatically closed 25 days after the last reply. New replies are no longer allowed.