Let’s say that a planet has multiple moons, and because I don’t want to type “a planet” many times, let’s call the planet Stan. One of these moons changes phase (“phase” being the best word for it, despite not actually being a phase, I guess) according to the months, and this is, in point of fact, where the residents of Stan get their twelve month, 30-31 day per month (except for the second month) calendar. I’m aware that this is convenient, but that’s the entire point.
TL;DR: A planet gets their version of the Gregorian calendar from a twelve-phased (pseudo-phase) moon.
Anyway, to elaborate on the question; how could a twelve-phased (again, not legitimate phases) moon work, and what might the twelve phases (see ^) be? Some extra information, every moon appears at night, and Stan is roughly the same distance from the sun as Earth is from our own sun.