It is currently April 25th, 2024, 3:10 pm

24 hours to 12 hours TIME

Get help with creating, editing & fixing problems with skins
EjjT
Posts: 4
Joined: June 12th, 2020, 7:36 am

24 hours to 12 hours TIME

Post by EjjT »

Hey there!

So I am using https://www.reddit.com/r/Rainmeter/comments/64ry4s/mnml_ui_v11_more_skins/ mnml UL v1.1 and I want its time to be a 12-hour format may you help me with this please?

Thank you so much!

Code: Select all

[Rainmeter]
Update=3000
DynamicWindowSize=1

[Variables]
Color=255,255,255
Size=200

BottomLineLenght=[MeasureMonthBottomLineLenght]
RightLineLenght=[MeasureMonthRightLineLenght]

;Shorten Bottom and Right side of square to fit month text
[MeasureMonthBottomLineLenght]
Measure=Time
Format=%b
Substitute="Jan":"(#size#/4)","Feb":"(#size#/20)","Mar":"(#size#*13/40)","Apr":"(#size#/2)","May":"(#size#*9/20)","Jun":"(#size#*2/5)","Jul":"(#size#*9/20)","Aug":"(#size#*2/5)","Sep":"(#size#/10)","Oct":"(#size#/5)","Nov":"(#size#/10)","Dec":"(#size#/10)"

[MeasureMonthRightLineLenght]
Measure=Time
Format=%b
Substitute="Jan":"(#size#*7/10)","Feb":"(#size#*7/10)","Mar":"(#size#*11/20)","Apr":"(#size#*11/20)","May":"(#size#*3/4)","Jun":"(#size#*3/4)","Jul":"(#size#*3/4)","Aug":"(#size#*7/10)","Sep":"(#size#*11/20)","Oct":"(#size#*7/10)","Nov":"(#size#*11/20)","Dec":"(#size#*11/20)"
;---------------------------------------------------------

[Square]
Meter=Shape
Shape=Rectangle (#size#),(#size#/10),#size#,(#size#*3/200) | Fill Color #Color# | StrokeWidth 0
Shape2=Rectangle (#size#),(#size#/10),(#size#*3/200),#size# | Fill Color #Color# | StrokeWidth 0
Shape3=Rectangle (#size#),(#size#/10+#size#),#BottomLineLenght#,(#size#*3/200) | Fill Color #Color# | StrokeWidth 0
Shape4=Rectangle (#size#+#size#),(#size#/10),(#size#*3/200),#RightLineLenght# | Fill Color #Color# | StrokeWidth 0
DynamicVariables=1

[MeasureMonth]
Measure=Time
Format=%B

[Month]
Meter=String
MeasureName=MeasureMonth
FontFace=Agatha Needs Flesh
FontSize=(#size#*3/8)
FontColor=#Color#
StringAlign=CenterCenter
AntiAlias=1
Angle=(-PI/8)
X=(-#size#*7/20)R
Y=(-#size#/40)R
DynamicVariables=1

[MeasureTime]
Measure=Time
Format=%H %M
Substitute="00":"Zero","01":"One","02":"Two","03":"Three","04":"Four","05":"Five","06":"Six","07":"Seven","08":"Eight","09":"Nine","10":"Ten","11":"Eleven","12":"Twelve","13":"Thirteen","14":"Fourteen","15":"Fifteen","16":"Sixteen","17":"Seventeen","18":"Eighteen","19":"Nineteen","20":"Twenty","21":"TwentyOne","22":"TwentyTwo","23":"TwentyThree","24":"TwentyFour","25":"TwentyFive","26":"TwentySix","27":"TwentySeven","28":"TwentyEight","29":"TwentyNine","30":"Thirty","31":"ThirtyOne","32":"ThirtyTwo","33":"ThirtyThree","34":"ThirtyFour","35":"ThirtyFive","36":"ThirtySix","37":"ThirtySeven","38":"ThirtyEight","39":"ThirtyNine","40":"Forty","41":"FortyOne","42":"FortyTwo","43":"FortyThree","44":"FortyFour","45":"FortyFive","46":"FortySix","47":"FortySeven","48":"FortyEight","49":"FortyNine","50":"Fifty","51":"FiftyOne","52":"FiftyTwo","53":"FiftyThree","54":"FiftyFour","55":"FiftyFive","56":"FiftySix","57":"FiftySeven","58":"FiftyEight","59":"FiftyNine"

[Time]
Meter=String
MeasureName=MeasureTime
FontFace=Futurist Fixed-width
FontSize=(#size#*9/100)
StringStyle=Bold
StringCase=Upper
FontColor=#Color#
StringAlign=CenterCenter
X=(#size#*3/2)
Y=(-#size#/100)R
AntiAlias=1
DynamicVariables=1

[MeasureDate]
Measure=Time
Format=%A-%d

[Date]
Meter=String
MeasureName=MeasureDate
FontFace=Futurist Fixed-width
StringStyle=Bold
FontSize=(#size#*9/100)
StringCase=Upper
FontColor=#Color#
StringAlign=CenterCenter
X=r
Y=(#size#/20)R
AntiAlias=1
DynamicVariables=1
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: 24 hours to 12 hours TIME

Post by mak_kawa »

Hi Ejjt

Maybe like this;

Code: Select all

[MeasureTime]
Measure=Time
Format=%I %M %p
Does work?
EjjT
Posts: 4
Joined: June 12th, 2020, 7:36 am

Re: 24 hours to 12 hours TIME

Post by EjjT »

mak_kawa wrote: June 12th, 2020, 9:16 am Hi Ejjt

Maybe like this;

Code: Select all

[MeasureTime]
Measure=Time
Format=%I %M %p
Does work?
Oh wait yeah it did work thank you! But can you remove the PM at the last part of it? Like AM or PM - should be removed
User avatar
balala
Rainmeter Sage
Posts: 16169
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: 24 hours to 12 hours TIME

Post by balala »

EjjT wrote: June 12th, 2020, 9:48 am But can you remove the PM at the last part of it? Like AM or PM - should be removed
See the Format option. Right now it is Format=%I %M %p. From these parameters, %I represents the hour in 12-hour format, %M represents the minute, while the last %p is the AM/PM indicator. If you want to renounce to this, you simply have to remove the %p from the above Format option: Format=%I %M
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: 24 hours to 12 hours TIME

Post by mak_kawa »

Hi Ejjt

Way to remove "AM/PM" is just as balala said. BTW, nicely designed clock...:-)
User avatar
balala
Rainmeter Sage
Posts: 16169
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: 24 hours to 12 hours TIME

Post by balala »

Just two comments:
  • Although here seconds are not shown, I still say for clocks the best approach is to set the default Update=1000, instead of Update=3000 ([Rainmeter] section).
  • Especially when the skin has large transparent surfaces (like this one), adding a BackgroundMode=2 and a SolidColor=0,0,0,1 (or whatever color do you prefer) option to the [Rainmeter] section is very good, to can easier click / right click the skin.
EjjT
Posts: 4
Joined: June 12th, 2020, 7:36 am

Re: 24 hours to 12 hours TIME

Post by EjjT »

balala wrote: June 12th, 2020, 10:40 am Just two comments:
  • Although here seconds are not shown, I still say for clocks the best approach is to set the default Update=1000, instead of Update=3000 ([Rainmeter] section).
  • Especially when the skin has large transparent surfaces (like this one), adding a BackgroundMode=2 and a SolidColor=0,0,0,1 (or whatever color do you prefer) option to the [Rainmeter] section is very good, to can easier click / right click the skin.
What does this do?
  • Although here seconds are not shown, I still say for clocks the best approach is to set the default Update=1000, instead of Update=3000 ([Rainmeter] section).
For the second bullet, it's already okay for me with its width, thank you!
User avatar
balala
Rainmeter Sage
Posts: 16169
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: 24 hours to 12 hours TIME

Post by balala »

EjjT wrote: June 12th, 2020, 11:10 am What does this do?
  • Although here seconds are not shown, I still say for clocks the best approach is to set the default Update=1000, instead of Update=3000 ([Rainmeter] section).
For the second bullet, it's already okay for me with its width, thank you!
If the seconds would be shown, the Update for sure should be set to 1000. Not having seconds, finally it is ok even so, but for skins showing time and for those using WebParser measures, the default Update=1000 is the best approach.
EjjT
Posts: 4
Joined: June 12th, 2020, 7:36 am

Re: 24 hours to 12 hours TIME

Post by EjjT »

balala wrote: June 12th, 2020, 11:45 am If the seconds would be shown, the Update for sure should be set to 1000. Not having seconds, finally it is ok even so, but for skins showing time and for those using WebParser measures, the default Update=1000 is the best approach.
Oh, no worries! It's fine I like it without the seconds, anyways thank you so much for this!

You may already close the thread.

Take care and have a great day!
User avatar
balala
Rainmeter Sage
Posts: 16169
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: 24 hours to 12 hours TIME

Post by balala »

EjjT wrote: June 12th, 2020, 2:55 pm You may already close the thread.
I'm glad if you got it working well.
In this forum threads remain open, they are not closed.