These fall into a couple of categories, each with new options and option values. I will touch on each of these individually, then do a post with an example skin that should demonstrate how it all fits together.
Input - Reading and evaluating a date and time string.
TimeStamp
The first and most important new capability is that you can now define a TimeStamp option for a Time measure that consists of a date and / or time representation in just about any format.
The documentation for TimeStamp is probably the best explanation of this, but in general this means you can define something like:
Code: Select all
[MeasureTime]
Measure=Time
TimeStamp=2015-02-18T14:58:00Z
Code: Select all
[MeasureTime]
Measure=Time
TimeStamp=[SomeWebParserMeasure]
DynamicVariables=1
TimeStampFormat
When you use a formatted string in the TimeStamp option, it will require that you also have a TimeStampFormat option that creates a "mask" for the format. In effect you tell the measure what those bits and pieces of the string mean as Time measure Format codes.
Again, the documentation for TimeStampFormat is the most complete way to understand this, but as an example you might use:
Code: Select all
[MeasureTime]
Measure=Time
TimeStamp=2015-02-18T14:58:00Z
TimeStampFormat=%Y-%m-%dT%H:%M:%S
TimeStampLocale
One last new option to complete the "input" part of things. If the string that you get, for instance from a WebParser measure, is in a different "language / locale" than "English" which is what the Time measure uses by default, you can tell it what language / locale it is in so it will be read and decoded properly. For that we use the new TimeStampLocale option. This option consists of a NLS Language / Locale Identifiers code, that identifies the language, or language and country, desired.
For example, if we assume that the date / time string you are getting is in German, you might use:
Code: Select all
[MeasureTime]
Measure=Time
TimeStamp=Mittwoch, 18. Februar 2015 18:57:16
TimeStampFormat=%A, %#d. %m %Y %H:%M:%S
TimeStampLocale=de-DE
The effect of this is that any formatted date and / or time string is decoded by the measure, and will set the value of the measure to the appropriate Windows timestamp number. This is a number of seconds since January 1, 1601, and is what the Time measure uses, and has always used, to define the date and time for the measure.
This Windows timestamp number can then be used in Calc measures or other formulas to do "math" on the date, to compare the date from the measure with the current date for instance, or it can be formatted for display in a String meter, which we will now address.
Output - Formatting the display
Format
The Time measure has always used the Format option to format the Windows timestamp value of the measure into a readable date / time string that you define. This has not changed with the new functionality.
Code: Select all
[MeasureTime]
Measure=Time
TimeStamp=2015-02-18T14:58:00Z
TimeStampFormat=%Y-%m-%dT%H:%M:%S
Format=%A, %B %#d, %Y %H:%M:%S
So what we have done is "input" a formatted date / time string, "decoded" it into a valid timestamp the measure can use, and "formatted" it any way we like for display.
So the string "2015-02-18T14:58:00Z" from our WebParser RSS feed (for instance) is turned into "Wednesday, February 18, 2015 14:58:00" in our skin. Very powerful stuff.
FormatLocale
One last new option to complete the "output" part of things. Remember above, we used the new TimeStampLocale option to tell the measure what language / locale the "input" TimeStamp string is in.
By default the "output" of the Format option will always be in "English" in a Rainmeter Time measure. So if your system's locale is other than "English", or you want to set the output to some other desired language, you can simply use the FormatLocale option, which will use the same NLS Language / Locale Identifiers codes to define the language / locale that should be used when the measure value is formatted with the Format option.
So for instance if your system's locale was "German":
Code: Select all
[MeasureTime]
Measure=Time
TimeStamp=Tuesday, January 27, 2015 at 15:22:30
TimeStampFormat=%A, %B %#d, %Y at %H:%M:%S
TimeStampLocale=en-US
FormatLocale=fr-FR
Format=%A, %B %#d, %Y %H:%M:%S
Output - The result
So we are now able to use any formatted date / time string in the measure, that is any format, in any language. We "decode" that string to create a Time measure value, and using the Format and FormatLocale options, output the result in any format and language we want in a String meter.
There are a couple of other new options that are somewhat related to this, that I will touch on in additional posts following this one, then we will look at an example skin that sorta pulls it all together.