It is currently May 26th, 2020, 8:42 pm

Days Since

General topics related to Rainmeter.
Cakecheese
Posts: 3
Joined: May 14th, 2013, 10:15 pm

Days Since

Post 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
User avatar
moshi
Posts: 1850
Joined: November 13th, 2012, 9:53 pm

Re: Days Since

Post by moshi »

Cakecheese
Posts: 3
Joined: May 14th, 2013, 10:15 pm

Re: Days Since

Post 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/
User avatar
jsmorley
Developer
Posts: 20637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Days Since

Post 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....
Cakecheese
Posts: 3
Joined: May 14th, 2013, 10:15 pm

Re: Days Since

Post by Cakecheese »

You sir, are amazing!

Thank you very much!
User avatar
jsmorley
Developer
Posts: 20637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Days Since

Post 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
You do not have the required permissions to view the files attached to this post.
Gakk
Posts: 1
Joined: January 14th, 2018, 11:03 pm

Re: Days Since

Post 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!
SomaKhaos
Posts: 6
Joined: June 4th, 2019, 3:03 pm

Re: Days Since

Post 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?
User avatar
jsmorley
Developer
Posts: 20637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Days Since

Post 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.
You do not have the required permissions to view the files attached to this post.
SomaKhaos
Posts: 6
Joined: June 4th, 2019, 3:03 pm

Re: Days Since

Post by SomaKhaos »

thank you very much, exactly what i wanted :bow: