Setting the date on the label is the food business operator's responsibility. The Ministry guidance defines shelf life as the time a food keeps its microbiological suitability and its appearance, smell and taste criteria under proper handling, transport and storage; packaging, transport, storage temperature, pH, water activity and formulation act on it together.

MethodWhat is done
Static testStored at the set temperature beyond the expected life, with chemical, microbiological, physical and sensory tests at intervals; the most common method for use-by dates
Accelerated testStored at a high, controlled temperature; the life under normal conditions is calculated from kinetic values such as Q10
End-point testEffects of temperature, humidity and transport in the distribution chain are observed
Abuse testAn inoculated pathogen is followed over the period

For easily perishable food the date is a use-by date, for food that does not spoil quickly at room temperature a best-before date. Food past its use-by date counts as unsafe. The period holds only for the temperature it was found at, so the label also carries the storage temperature (for example keep at +4 °C).