This library calculates to high precision the lunar phases and dates.
dmitry kim
gem "astro_moon", "~> 0.2"