The values returned by the Blizzard API do not tie directly into the information you want to display.
Code:
local power = UnitPower(unit, SPELL_POWER_ECLIPSE)
The above is the API call to get the current eclipse value, with the returned value being between -100 and 100 inclusive.
The value is negative when you are towards solar power, and positive when you are towards lunar power.