Ai(mage) question

I ve been trying to incorporata icons for various moon ages but Im not exactly sure about the range of returned values and their co-relation to the actual moon phase.
I waited close to a whole month and observed that it returned values from 0 to 29. I thought that I needed 30 icons then to represent the above ages.
Now this month it seems to go up to 28 then returns back to 0 ( New moon). I ve been searching APIs and still cant figure out:
Regardless of whether the providers of astro-info round to closer integers… Does age 15 always correspond to full moon? Or does this change according to how many days of age has the moon for a given month?