It is currently March 29th, 2024, 3:24 pm

changing time format

Get help with creating, editing & fixing problems with skins
raindog
Posts: 2
Joined: February 4th, 2023, 5:19 am

changing time format

Post by raindog »

Hello

I'm using the Optiq skin and I'd like to change the time format to 12hr and not 24hr. Also, how can I remove the "0" before say, 07:30 when it's morning? I'd like it to read 7:30 instead of 07:30.

Thanks for your help.

Here is my code:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1


[Metadata]
Name=Optiq
Author=xxenium
Version=1.0
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]

@Include=#@#Variables.inc

;Size of the skin
Size=1

;==========Measures===========


[MeasureWeekDay]
Measure=Time
Format=%A

[MeasureDay]
Measure=Time
Format=%d    

[MeasureMonth]
Measure=Time
Format=%B %Y 

[MeasureTime]
Measure=Time

[MeasureHour]
Measure=Time
Format=#HourFormat#

[MeasureBlink]
Measure=Calc
Formula=MeasureTime % 2
MaxValue=1
MinValue=0
Substitute="0":"","1":":"

[MeasureMinute]
Measure=Time
Format=%M

[MeasureAmPm]
Measure=#Ms#
Format=#Fm#


;==========Meters==============


[MeterHour]
Meter=STRING
MeasureName=MeasureHour
X=(#size#*200)
Y=(#size#*315)
FontColor=#ClockColor#
FontEffectColor=#FontEffectColor#
FontSize=(#size#*130)
FontFace=#FontFace2#
StringEffect=shadow
StringAlign=right
StringStyle=normal
AntiAlias=1
LeftMouseUpAction=!ToggleConfig "Optiq\Settings" "Settings.ini"

[MeterBlink]
Meter=STRING
MeasureName=MeasureBlink
X=(#size#*242)
Y=(#size#*295)
FontColor=#ClockColor#
FontEffectColor=#FontEffectColor#
FontSize=(#size#*130)
FontFace=#FontFace2#
StringEffect=shadow
StringAlign=center
StringStyle=normal
AntiAlias=1
DynamicVariables=1

[MeterMinute]
Meter=STRING
MeasureName=MeasureMinute
X=(#size#*282)
Y=(#size#*315)
FontColor=#ClockColor#
FontEffectColor=#FontEffectColor#
FontSize=(#size#*130)
FontFace=#FontFace2#
StringEffect=shadow
StringAlign=left
StringStyle=normal
AntiAlias=1

[MeterAMPM]
Meter=STRING
MeasureName=MeasureAmPm
X=(#size#*445)
Y=(#size#*250)
FontColor=#ClockColor#
FontEffectColor=#FontEffectColor#
FontSize=(#size#*45)
FontFace=#FontFace2#
StringEffect=shadow
StringAlign=right
StringStyle=normal
AntiAlias=1

[MeterDay]
Meter=STRING
MeasureName=MeasureDay
X=(#size#*526)
Y=(#size#*480)
FontColor=#DayColor#
FontEffectColor=#FontEffectColor#
FontSize=(#size#*55)
FontFace=#FontFace2#
StringEffect=shadow
StringAlign=right
StringStyle=normal
AntiAlias=1

[MeterWeekDay]
Meter=STRING
MeasureName=MeasureWeekDay
X=(#size#*435)
Y=(#size#*480)
FontColor=#WeekDayColor#
FontEffectColor=#FontEffectColor#
FontSize=(#size#*55)
FontFace=#FontFace2#
StringEffect=shadow
StringAlign=right
StringStyle=normal
AntiAlias=1

[MeterMonth]
Meter=STRING
MeasureName=MeasureMonth
X=(#size#*472)
Y=(#size#*460)
FontColor=#MonthColor#
FontEffectColor=0,0,0,250
FontSize=(#size#*45)
FontFace=#FontFace2#
StringEffect=shadow
StringAlign=left
StringStyle=normal
AntiAlias=1
Angle=(Rad(-90))
Last edited by balala on February 4th, 2023, 6:30 am, edited 1 time in total.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: changing time format

Post by xenium »

You choose the time format from the settings menu.
Click on the hour to open the settings menu.

After choosing the time format, go to Documents\Rainmeter\Skins\Optik\@Resources, open the Variables file and edit:

HourFormat=%#I

Then refresh the skin
raindog
Posts: 2
Joined: February 4th, 2023, 5:19 am

Re: changing time format

Post by raindog »

Wow! fantastic, thanks for your help!
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: changing time format

Post by xenium »

raindog wrote: February 4th, 2023, 6:47 am Wow! fantastic, thanks for your help!
You're welcome!