It is currently May 2nd, 2024, 11:30 am

Non-Standard Date Format

Get help with creating, editing & fixing problems with skins
Mrwhitepantz
Posts: 7
Joined: October 26th, 2012, 4:59 am

Non-Standard Date Format

Post by Mrwhitepantz »

I'm really new to Rainmeter and I don't know it's limitations. I would like to make a skin that uses a custom date format, and I'm wondering if that's possible. I know that you can use the tags like #a and #Y and whatnot to rearrange the way things are displayed, but what I would like to do is set up something that would take, for instance, today's date 10/25/2012 and print it out as a solid number 12102.5. I only want the one digit after the decimal.

If this isn't possible with just the official stuff, is there a 3rd party plugin that could do it? Or would I need to code it myself? Can anyone point me in the right direction for any of that?

Thanks in advance!

EDIT: a few more examples. 10/13/2012 is 12101.3, 06/05/2013 would be 13060.5

Basically put the year as a 2-digit number first, followed by the month as a 2-digit number, and then the day as a 2-digit number, but with a decimal point between the first and second digit of the day.
User avatar
Brian
Developer
Posts: 2689
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Non-Standard Date Format

Post by Brian »

Fairly simple, but you need two Time measures and two String meters.

Code: Select all

[YearMonth]
Measure=Time
Format=%y%m

[Day]
Measure=Time
Format=%d

[DayCalc]
Measure=Calc
Formula=Day / 10

[DisplayYearMonth]
Meter=String
MeasureName=YearMonth
FontColor=255,255,255
SolidColor=0,0,0

[DisplayDay]
Meter=String
MeasureName=DayCalc
X=-5R
Y=r
FontColor=255,255,255
SolidColor=0,0,0
NumOfDecimals=1
Note the NumOfDecimals=1 option in the "DisplayDay" String meter.

-Brian
Mrwhitepantz
Posts: 7
Joined: October 26th, 2012, 4:59 am

Re: Non-Standard Date Format

Post by Mrwhitepantz »

Oh excellence. That worked exactly like I wanted it to. Thanks a bundle!