MV Moon phases plugin

First, sorry for any grammar error but im driving a car now, but I need maybe not a plugin but a function that basing On current, actual date will display as text the moon phase that it is actually. I found couple examples Over the internet, but none of them give expexted result. I also followed the actually formula to calculate it by myself, but the result also is different from what I See on Pages with weather and astronomical websites.

I could Just use some free API to obtain Such data, but lets be honest, there is no Point for writting a plugin that require constant access to API, API can anytime have mallfunction and game in Best case Just throw an error.
How do you propose getting the current moon phase without using an API to access that data? Any data source you use for this is going to have the same potential malfunction risk.
Maybe By converting Gregorian calendar to Julian calendar? Maybe pick a date where was Full moon and start calculating from that date. But I said it earlier, samples Over internet dont shows actual result, when I get home Ill provide my code, Im still behind the wheel.

I used This as base

Original thread: https://forums.rpgmakerweb.com/threads/moon-phases-plugin.147104/