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.