Any person entitled to vote at a general or special election or at any election at which propositions are submitted to a popular vote in this State, shall, on the day of such election, be entitled to absent himself from any services or employment in which he is then engaged or employed, for a period of 2 hours between the time of opening and closing the polls; and such voter shall not because of so absenting himself be liable to any penalty; Provided, however, that application for such leave of absence shall be made prior to the day of election. The employer may specify the hours during which said employee may absent himself as aforesaid, except that the employer must permit a 2-hour absence during working hours if the employee's working hours begin less than 2 hours after the opening of the polls and end less than 2 hours before the closing of the polls. No person or corporation shall refuse to an employee the privilege hereby conferred, nor shall subject an employee to a penalty, including a reduction in compensation due to an absence under this Section, because of the exercise of such privilege, nor shall directly or indirectly violate the provisions of this section.
10 ILCS 5/17-15