histogramming phases between a periodic function and another periodic, quasiperiodic or almost-periodic function with irrational period relationship. Background and motifivation:
The Astronomy SE question How often does a full moon happen on the weekend? touches on issues I've always wondered about.
The current answer says 2/7 of full moons occur on weekends because

There is no exact alignment of the lunar orbit to the length of a week, so a full moon is equally "likely" to be at the weekend

I'll bet there's a simple proof of this somewhere; with two phases linearly increasing with an irrational slope ratio, if we take their difference modulo $2 \pi$ and bin (histogram) the results it into n equal width bins, as our sample time becomes infinite each bin ends up with and equal 1/7 probability.
But I am wondering - what exactly is that proof?
Now the Moon's orbit is subject to the Sun's tidal force (difference between the Sun's pull on Earth and on the Moon due to their different distances and positions) so the Moon's instantaneous phase relative to Earth deviates somewhat from a constant slope due to an approximately yearly perturbation.
It's also an elliptical orbit, so there is a separate monthly wiggle due to its eccentric motion.
By itself the elliptical aspect would just be addressed with a Fourier series since it doesn't affect periodicity. Thus while interesting, eccentricity adds a twist to the problem that you are welcome to ignore because my focus is currently for a circular orbit with constant phase slope.
But the period of the Sun's effect will likely have a rational relationship to the Moon's periodicity.
However, this question is about Mathematics, not Astronomy
Anyway, the astronomical orbits are the inspiration to the question but I'm not asking about them per se.
Question: When histogramming phases between a periodic function and another periodic, quasiperiodic or almost-periodic function with irrational period relationship, are there proofs that all equal-sized phase bins will end up with equal probability as time goes to infinity?
I may have set myself up for failure here; implicit in my question is the premise that quasiperiodic and almost periodic functions can be characterized with a period such that it can have an irrational relationship with the other, sampling period.
This makes me wonder that parts of my question are either

*

*not currently answerable.

*are addressed by some serious mathematical work exploring the nature of quasiperiodicity and almost periodicity.


Potentially helpful:

*

*Almost periodic function vs quasi periodic function

*Symmetry in an almost periodic function
 A: This indeed touches on interesting mathematics (which I believe were indeed historically motivated by questions from astronomy). Reformulated in mathematical terms, I  think your question is answered by this:
Theorem 1: Let $\alpha>0$ be irrational, and let $T_\alpha$ be addition by $\alpha$ mod 1. Then $T_\alpha$ is ergodic (on $\mathbb R/\mathbb Z$ with the Lebesgue measure) (whatever this means).
Theorem 2 (Birkhoff's ergodic theorem)  If $T$ is ergodic, then $\frac{1}{n} \sum_{k=1}^n f \circ T^k(x)$ converges to $\int_0^1 f(x) dx$, for any integrable function $f$ and almost any $x$.
This means that given any $1$-periodic function $f$, if you take average time samples at intervals that are multiples of $\alpha$ (that is, you look at $\frac{1}{n} \sum_{k=1}^n f(x+k\alpha)$, this will converge to the time average $\int_0^{1} f(x) dx$ on a period.
Note that this is NOT true if $\alpha$ is rational. The most self-evident case is where $\alpha=1$, in which case the averages are all equal to $f(0)$, since $f$ is 1-periodic, and there are no reason why $f(0)$ should be $\int_0^1 f(x) dx$ (that is, there are many functions for which it is not the case).
Now to come back to histograms and the astronomy question: choose a week as a time unit. Pretend that the motion of the moon is perfectly periodic, and that its period $\alpha$ is irrational (as measured in the time unit of a week). Let $f$ be the function that is equal to 1 when it is the week end, and 0 otherwise: then $f$ is 1-periodic, and $\int_0^1 f(x) dx=\frac{2}{7}$.
Let $x$ be a time during which the moon is full. Then $\frac{1}{n} \sum_{k=1}^n f(x+k\alpha)$ is exactly the proportion of full moons that occur during week ends within the first $n$ periods of the moon, and by the two previous theorems, it converges to $\int_0^1 f(x) dx=\frac{2}{7}$, which is the time proportion of the week end.

It is an interesting question to ask whether the ratio of physical quantities should be thought of as rational or irrational (although this does not really make sense, since for instance the mass of the Earth cannot a number defined with absolute precision). But since there are in some sense many more irrational numbers that rational (from a mathematical point of view), it is reasonnable to expect that say the ratio of the period of rotation of the Earth and of the Moon should be treated as irrational. However, this would only work if we thought of periods as random numbers chosen picked independantly. In reality, there can be resonance phenomena "pushing" periods to have rational ratio.
