How are Hebrew Calendar dates written and said?

Speaking of Hebrew, my Hebrew grammar book states that

In numbering days of the month and years, the cardinals are very frequently used instead of the ordinals even for the numbers from 1 to 10…

which explains “תשעה באב” (tishah b’Av), [day] nine in Av.

What I was wondering about is why it’s בְּ there while “בְּתִשְׁעָה לַחֹדֶשׁ” (on the ninth day of the month) uses לְ, here meaning [belonging] to ? The section on prepositions simply translates

בְּ [poet. בְּמוֹ] in, at, with.
לְ [poet. לְמוֹ] towards, (belonging) to, for, Lat. ad.

This was actually the subject of some discussion in Hebrew linguistic circles, and the conclusion was: nobody knows. Just one of those things, I guess.