Calendar: Cast bool to int for PostgreSQL. Fix #728