Whenever a reduction in force is necessary in any public position, or on public works of the Commonwealth and its political subdivisions, and personnel are discharged according to seniority, the number of years of service of any veteran shall be determined by adding the veteran's total years of service in the civil service or on public works to the veteran's total years of service as a member of the armed forces of the United States, including a reserve component or National Guard, during any period of war or armed conflict in which the United States engaged other than for periods of active duty training.
51 Pa.C.S. § 7107