Except as otherwise provided by charter provision or ordinance or this code, municipal executive committees shall exercise similar functions and be governed by the same laws in regard to municipal primary elections and regular municipal elections as county executive committees in regard to county-state primary and general elections, so far as the same may be applicable. All expenses of conducting municipal primary elections and regular municipal elections shall be paid by the municipality. The provisions of chapter three of this code, referring more particularly to primary elections and general elections, shall, so far as the same can be applied and so far as not otherwise provided by charter provision or ordinance, govern the conduct of municipal primary elections and regular municipal elections, as the case may be. No municipal primary election shall be held on the day of the county-state primary election except as provided in section five of this article nor less than twenty-five days immediately preceding the regular municipal election, unless a shorter period of time is established by charter or ordinance.