Lua Moon Phase Calculator
This script calculates the current moon phase based on the Gregorian date. It uses Lua's built-in date and time functions.
Getting Started
- Clone the repository or download the script.
- Run the script using a Lua interpreter (e.g.,
lua main2.lua). -
The script supports CLI flags:
-
--date YYYY-MM-DD: specify a date --json: output JSON--verbose: print extra info
Examples:
lua main2.lua --date 2026-07-27
lua main2.lua 2000 1 6 --json
lua main2.lua --verbose
Running tests:
lua tests/test_moon.lua