;------------------------------------------------------------------------------------------------
; ENIGMA MOONSHINE (I)
; Class: Icon

[Rainmeter]
Author=Kaelri.LCD@gmail.com
AppVersion=1001000
Update=1000
MiddleMouseDownAction=!RainmeterActivateConfig #CURRENTCONFIG# Moon.ini

[Metadata]
Name=Enigma Moon | Icon
Config=Enigma | Taskbar | Moon
Description=This skin shows the current moon phase.
Version=2.7
Tags=Taskbar | Moon
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Preview=#SKINSPATH#Enigma\Resources\Images\Preview.png
Credits=This skin has been adapted from the original MoonShine by benjam and jER. | Special thanks to Alex2539 for the mathematics that went into this skin.
Variant=2

;------------------------------------------------------------------------------------------------
; MEASURES

[MeasureDay]
Measure=Time
Format=%d

[MeasureMonth]
Measure=Time
Format=%m

[MeasureYear]
Measure=Time
Format=%Y

[MeasureDaysSinceY2K]
Measure=Calc
Formula=FLOOR((MeasureYear-2000)*365.25)+(MeasureMonth>1)*31+(MeasureMonth>2)*(28+((MeasureYear%4)=0))+(MeasureMonth>3)*31+(MeasureMonth>4)*30+(MeasureMonth>5)*31+(MeasureMonth>6)*30+(MeasureMonth>7)*31+(MeasureMonth>8)*31+(MeasureMonth>9)*30+(MeasureMonth>10)*31+(MeasureMonth>11)*30+(MeasureMonth>12)*31+MeasureDay

[MeasureMoonPhase]
Measure=Calc
Formula=ROUND(16*FRAC(((-29.5305888531)+SQRT((29.5305888531)**2-4*(102.19*(10**(-12)))*(20.362954-MeasureDaysSinceY2K)))/(2*(102.19*(10**(-12))))))%16
Substitute=".00000":""

[MeasureMoonPhaseMod]
Measure=Calc
Formula=880000+(MeasureMoonPhase*100)+97
Substitute="88":"#SKINSPATH#Enigma\Resources\Images\Moon\","97":".png"

;------------------------------------------------------------------------------------------------
; METERS

[Moon]
Meter=IMAGE
ImageName=#SKINSPATH#Enigma\Resources\Images\Moon\Moon.png
H=24
W=24

[MoonPhase]
Meter=IMAGE
MeasureName=MeasureMoonPhaseMod
H=25
W=25