It is currently October 13th, 2024, 7:21 am

AstroCalendar, MultiCalendar and WorldClock

Clocks and timer skins
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: AstroCalendar, MultiCalendar and WorldClock

Post by balala »

acibiber53 wrote: November 25th, 2020, 3:08 pm How to make WorldClock show hours in 24 hours format?
Replace the %#I and %I strings into the variables posted in the [Variables] section with %#H and %H and remove the %p from the same variables:

Code: Select all

[Variables]
colorDivider=229,169,51,255
riseSetFormat=%#H:%M
dstFormat=%a, %d %b %Y at %#H:%M
timeFormatLocal=%H:%M:%S
dateFormatLocal=%a, %d %b %Y
zoneFormatLocal=UTC %z %#z
timeFormatOther=%H:%M
dateFormatOther=%a, %d %b
zoneFormatOther=%Z %z %#z
acibiber53
Posts: 2
Joined: November 25th, 2020, 1:22 pm

Re: AstroCalendar, MultiCalendar and WorldClock

Post by acibiber53 »

Thanks for the lightning reply! It worked!
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: AstroCalendar, MultiCalendar and WorldClock

Post by balala »

acibiber53 wrote: November 25th, 2020, 3:30 pm Thanks for the lightning reply! It worked!
As you can see in the help of Time measure, %I means Hour in 12-hour format (01 - 12), while %H is the Hour in 24-hour format (00 - 23). That's why you had to replace %I with %H. Also note that %p is the AM/PM indicator for 12-hour clock, this had to be removed.
Glad you got it working well.
buckb
Posts: 67
Joined: February 12th, 2018, 12:47 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by buckb »

Thank you for answering the question, balala.
Much appreciated.
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: AstroCalendar, MultiCalendar and WorldClock

Post by balala »

buckb wrote: November 25th, 2020, 7:43 pm Thank you for answering the question, balala.
Much appreciated.
Glad to help. :thumbup:
GeoffC
Posts: 4
Joined: December 6th, 2020, 10:28 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by GeoffC »

Thank you for this....I'm new to Rainmeter...

On AstroCalendar,

How does one change the Date format under ( for instance ) Moon Times for ... It currently returns m-d-y; I would like it to return d-m-y ( standard UK format ). I've looked through Calendar.ini, but there's no appropriate setting in there.

Thanks...

Geoff
buckb
Posts: 67
Joined: February 12th, 2018, 12:47 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by buckb »

GeoffC wrote: December 6th, 2020, 10:33 am Thank you for this....I'm new to Rainmeter...

On AstroCalendar,

How does one change the Date format under ( for instance ) Moon Times for ... It currently returns m-d-y; I would like it to return d-m-y ( standard UK format ). I've looked through Calendar.ini, but there's no appropriate setting in there.

Thanks...

Geoff
Hi Geoff,

AstroCalendar has almost no localization options. You'll need to edit Calendar.lua if you want to change date formats (or language or units). For example, see the following line of code in the function drawCalendarMoonTimes:

Code: Select all

table.insert (detail, "Moon Times for "..viewMonth.."-"..day.."-"..viewYear)
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: AstroCalendar, MultiCalendar and WorldClock

Post by balala »

GeoffC wrote: December 6th, 2020, 10:33 am How does one change the Date format under ( for instance ) Moon Times for ... It currently returns m-d-y; I would like it to return d-m-y ( standard UK format ).
As buckb said, you have to rewrite a few lines in the AstroCalendar\Calendar.lua script file. Replace all occurrances of the viewMonth.."-"..day.."-"..viewYear expression with day.."-"..viewMonth.."-"..viewYear. As you can see in the original expression first has been used the viewMonth (which returns the month), followed by day (obviously returning the day) and viewYear (the year, as you guessed, I suppose). These expressions will be replaced by the same variables into the day, viewMonth and viewYear order (if needed you can reorder the variables even in a different order).
The replacements have to be done into the following lines: 410, 530, 533, 802, 1159 and 1419.
GeoffC
Posts: 4
Joined: December 6th, 2020, 10:28 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by GeoffC »

Thank you both.
GeoffC
Posts: 4
Joined: December 6th, 2020, 10:28 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by GeoffC »

Yep - that works - as long as the syntax is inserted correctly ! :Whistle [ I put ..day.. on the tool tip, instead of day..]