45As a preliminary point, it must be observed that the principle of equal treatment, as laid down in Article 20 of the Charter, is a general principle of EU law, which requires that comparable situations must not be treated differently and that different situations must not be treated in the same way unless such treatment is objectively justified. A difference in treatment is justified if it is based on an objective and reasonable criterion, that is, if the difference relates to a legally permitted aim pursued by the legislation in question, and it is proportionate to the aim pursued by the treatment concerned (judgments of 16 December 2008, Huber, C‑524/06, EU:C:2008:724, paragraph 75, and of 4 May 2023, Glavna direktsia ‘Pozharna bezopasnost i zashtita na naselenieto’ (Night work), C‑529/21 to C‑536/21 and C‑732/21 to C‑738/21, EU:C:2023:374, paragraph 52 and the case-law cited).