Section 17A. If any police officer of a city or town is required to work on January the first, July the fourth or Christmas day, or the day following when any of said days occurs on Sunday, or the third Monday in February, the third Monday in April, the last Monday in May, the first Monday in September, the second or fourth Monday in October or Thanksgiving day, he shall be given an additional day off, or, if such additional day off cannot be given because of personnel shortage or other cause, he shall be entitled to an additional day’s pay; provided, that, in the case of any such police officer whose regular day off, vacation day or a day on which he is absent from duty because of injuries sustained in line of duty, falls on any of the aforementioned holidays, an additional day off shall be allowed, or payment in lieu of one day shall be allowed. Such additional day’s pay shall be based on the hourly rate of his regular compensation for his average weekly hours of regular duty or such higher rate as may be determined by the person or persons authorized to establish pay scales in the respective police departments. This section shall take effect in a city having a Plan E charter when accepted by the affirmative vote of a majority of the city council, and in the case of other cities by vote of the city council subject to the provisions of its charter, and in a town by a majority vote at an annual town meeting.