It is currently December 3rd, 2021, 6:42 am

New Time and Locale functionality

Changes made during the Rainmeter 3.2 beta cycle.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: New Time and Locale functionality

Post by moshi »

the new Time measure options and using the registry measure from above with Google apis that use the same format for language allows creating "universal" skins.
Form4inc_Dublin_Chapel_final04_large.jpg
http://customize.org/rainmeter/skins/65672649
You do not have the required permissions to view the files attached to this post.
Crest
Posts: 82
Joined: August 16th, 2013, 12:47 pm

Re: New Time and Locale functionality

Post by Crest »

So very cool. The formatting reminds me a bit of a simplified regex. Awesome work :)
PoochMx
Posts: 1
Joined: February 11th, 2021, 7:25 pm

Re: New Time and Locale functionality

Post by PoochMx »

Hi guys, it's been a while since I messed up with my skins. I just found about this timestamp function and I assumed I could use it to translate dates into Spanish (my first language). I used to have this date widget and used the Substitute function to handle the translation:

Code: Select all

[measureDay]
Measure=Time
Format=%a
Substitute="Sun":"Domingo","Mon":"Lunes","Tue":"Martes","Wed":"Miércoles","Thu":"Jueves","Fri":"Viernes","Sat":"Sábado"
I get I need to use the timestamp function to use the locale format and get translations, but when I use it, the displayed date is not correct.

Code: Select all

[MeasureDate]
Measure=Time
TimeStamp=Monday, January 21
TimeStampFormat=%A, %B %#d
TimeStampLocale=en-US
FormatLocale=es-MX
Format=%A, %B %#d
Today's Thu, Feb 11. But when I use the timestamp function, it gives random dates, like "sun, Jan 21". If I change the timestamp date, sometimes the days change, and sometimes the day number does. I don't get what I need to do to display the current date. Any help will be much appreciated. :)
User avatar
balala
Rainmeter Sage
Posts: 13513
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New Time and Locale functionality

Post by balala »

PoochMx wrote: February 11th, 2021, 7:40 pm Today's Thu, Feb 11. But when I use the timestamp function, it gives random dates, like "sun, Jan 21". If I change the timestamp date, sometimes the days change, and sometimes the day number does. I don't get what I need to do to display the current date. Any help will be much appreciated. :)
If you're adding a TimeStamp option to a Time measure, the measure doesn't return the current date and time, but that established by the TimeStamp option. The only thing you have to do is to remove all options related to TimeStamp (TimeStamp, TimeStampFormat and TimeStampLocale).
And no, if you're adding a VALID TimeStamp, the measure doesn't return random dates, but as said above, that established by the TimeStamp.