Page 1 of 2

Days Since

Posted: May 14th, 2013, 10:25 pm
by Cakecheese
Hi guys,

Still getting used to Rainmeter, enough to customize things to my liking and have a bit of a fiddle, but still far from writing from scratch.

I've been trying to put together a 'Days Since' counter.

There are lots of countdown skins, but I can't seem to find anything that counts up.

Was also hoping to set it so that clicking it would reset to counting from current date/time - again, something I've seen, but not been able to replicate.

Cheers

Re: Days Since

Posted: May 15th, 2013, 6:11 am
by moshi

Re: Days Since

Posted: May 15th, 2013, 10:37 pm
by Cakecheese
I was looking for something that would more specifically count the number of days.

I boot my laptop down a lot, so a stopwatch style meter wouldn't really provide a long term measure as it would have to be restarted each time.

I found something similar on r/rainmeter but unfortunately the DL link is dead:
http://www.reddit.com/r/Rainmeter/comments/r4a9u/can_someone_help_me_make_a_skin_i_need_a_skin/

Re: Days Since

Posted: May 15th, 2013, 11:15 pm
by jsmorley

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
StartTime=13013118900

[MeasureTime]
Measure=Time

[MeasureDays]
Measure=Calc
Formula=Floor(([MeasureTime:]-#StartTime#) / 86400)
DynamicVariables=1

[MeterSetTime]
Meter=String
FontSize=15
FontColor=0,255,0,255
SolidColor=60,60,60,255
AntiAlias=1
Text=Reset
LeftMouseUpAction=[!UpdateMeasure MeasureTime][!WriteKeyValue Variables StartTime [MeasureTime:]][!Refresh]
DynamicVariables=1

[MeterDays]
Meter=String
MeasureName=MeasureDays
X=5R
FontSize=15
FontColor=0,0,255,255
Text=%1 Elapsed Days
Up to you to make it pretty....

Re: Days Since

Posted: May 16th, 2013, 5:38 pm
by Cakecheese
You sir, are amazing!

Thank you very much!

Re: Days Since

Posted: January 15th, 2018, 2:16 am
by jsmorley
Someone in a PM asked about this:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Variables]
StartDateTime=April 25, 1996

[MeasureStartTime]
Measure=Time
TimeStamp=#StartDateTime#
TimeStampFormat=%B %#d, %Y

[MeasureTime]
Measure=Time

; Note there are 86400 seconds in a day
[MeasureDays]
Measure=Calc
Formula=Floor(([MeasureTime:Timestamp]-[MeasureStartTime:Timestamp])/86400)
DynamicVariables=1

[MeterDays]
Meter=String
MeasureName=MeasureDays
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1 Elapsed Days
1.png
https://docs.rainmeter.net/manual/measures/time/#TimeStamp
https://docs.rainmeter.net/manual/measures/time/#TimeStampFormat

Re: Days Since

Posted: January 15th, 2018, 8:18 pm
by Gakk
Thank you very much, sir! This is exactly what I wanted. I failed to realize the seconds were from a single day. Thank you, really!

Re: Days Since

Posted: April 2nd, 2020, 2:25 pm
by SomaKhaos
Is there any way to make this that it doesn't only shows the days but instead it shows Days Hours:Minutes:Seconds?

Re: Days Since

Posted: April 2nd, 2020, 2:35 pm
by jsmorley
SomaKhaos wrote: April 2nd, 2020, 2:25 pm Is there any way to make this that it doesn't only shows the days but instead it shows Days Hours:Minutes:Seconds?

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Variables]
StartDateTime=April 25, 1996

[MeasureStartTime]
Measure=Time
TimeStamp=#StartDateTime#
TimeStampFormat=%B %#d, %Y

[MeasureTime]
Measure=Time

[MeasureElapsed]
Measure=Uptime
SecondsValue=([MeasureTime:Timestamp]-[MeasureStartTime:Timestamp])
Format="%4!i! days %3!i! hours %2!i! minutes %1!i! seconds"
DynamicVariables=1

[MeterElapsed]
Meter=String
MeasureName=MeasureElapsed
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Elapsed Since #StartDateTime##CRLF#%1 

1.jpg


https://docs.rainmeter.net/manual/measures/uptime/

This will be from midnight on April 26th, 1996.

Re: Days Since

Posted: April 2nd, 2020, 3:18 pm
by SomaKhaos
thank you very much, exactly what i wanted :bow: