There are plenty of cool apps that can show you the moon phase for a specified date. Don’t want to use an app? You may want to give this interactive installation a look: Moon Phases lets you enter any date to see the moon phase for that night. It is certainly an educational tool to study the moon phases from the past and the future.
This machine was completed using an Arduino. There are more sophisticated solutions out there, but this machine looks fun to play around with.