Page 3 of 6

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: November 25th, 2020, 3:16 pm
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

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: November 25th, 2020, 3:30 pm
by acibiber53
Thanks for the lightning reply! It worked!

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: November 25th, 2020, 3:37 pm
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.

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: November 25th, 2020, 7:43 pm
by buckb
Thank you for answering the question, balala.
Much appreciated.

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: November 25th, 2020, 8:42 pm
by balala
buckb wrote: November 25th, 2020, 7:43 pm Thank you for answering the question, balala.
Much appreciated.
Glad to help. :thumbup:

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: December 6th, 2020, 10:33 am
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

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: December 6th, 2020, 7:29 pm
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)

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: December 6th, 2020, 8:07 pm
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.

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: December 7th, 2020, 7:42 am
by GeoffC
Thank you both.

Re: AstroCalendar, MultiCalendar and WorldClock

Posted: December 7th, 2020, 9:21 am
by GeoffC
Yep - that works - as long as the syntax is inserted correctly ! :Whistle [ I put ..day.. on the tool tip, instead of day..]