Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1495

Help: Rainmeter Skins • Re: Fantasy Clock and calendar making (custom values)

$
0
0
I thought about making calendar, and clock with different values than usual. Like 32hours a day, every hour has 50 minutes instead of 60 or something, and calendar based on custom values too, but i am no programist, so i dont know where to start.
Even if makes not too much sense in my opinion, I don't think it's not possible, however some math is required. I'd count the number of seconds since midnight and would convert this number to the number of seconds of the day with 32 hours and each hour with 50 minutes.
For instance, the following [MeasureSecSinceMN] measure is returning the number of seconds since midnight (based on the values returnd by the [MeasureHour], [MeasureMinutes] and [MeasureSeconds] measures):

Code:

[MeasureHour]Measure=TimeFormat=%#H[MeasureMinutes]Measure=TimeFormat=%#M[MeasureSeconds]Measure=TimeFormat=%#S[MeasureSecSinceMN]Measure=CalcFormula=( 3600 * MeasureHour + 60 * MeasureMinutes + MeasureSeconds )
Since for instance on a day with 32 hours and 50 minutes each hour, we'd have 32 x 50 x 60 = 96.000 seconds (I just assumes each minute has 60 seconds), but on a normal day there are only 86.400 seconds. So to get the number of seconds passed since midnight for the new style day, we have to divide the value returned by the above [MeasureSecSinceMN] measure by 86400 and multiply the result by 96000. Let's add these operations to the above [MeasureSecSinceMN] measure and round the result. So, replace the above Formula option by Formula=( Round ( 96000 * ( 3600 * MeasureHour + 60 * MeasureMinutes + MeasureSeconds ) / 86400 )) (simplification for the above formula is needed and possible).
Having the above measure, we have to transform this into hours, minutes and seconds, for instance this way:

Code:

[MeasureHourNew]Measure=CalcFormula=( Floor ( MeasureSecSinceMN / ( 60 * 50 )))[MeasureMinutesNew]Measure=CalcFormula=( Floor (( MeasureSecSinceMN - 60 * 50 * MeasureHourNew ) / 50 ))[MeasureSecondsNew]Measure=CalcFormula=( MeasureSecSinceMN - 60 * 50 * MeasureHourNew - 50 * MeasureMinutesNew )
These measures are returning the new stzle hours, minutes and seconds.

Statistics: Posted by balala — Today, 4:54 pm



Viewing all articles
Browse latest Browse all 1495

Trending Articles