Note this fixes the unit tests. Still the calendar API itself
should be able to manage this cases, both casting (int) or
being stricter about what's allowed there (param hinting).
But that falls out from this issue and the code that introduced
the failures, so the pure unit-test fix has been applied.