[FIX] XQuery, format date: check invalid calendars