Moon Phases

This code snippet was published on .

In part of building a weather app, I wanted to represent the phases of the moon somehow, and Iโ€™m getting values 0โ€“99 from my data, so I needed a solution that worked easily with that in mind.