Sorry but that's an oft-made statement that holds no truth in UK legislation. It's derived from the EU directive regarding consumer rights - the "EU 2 year rule" - and relates to the minimum length of time a consumer can pursue a seller for a remedy (the EU interpretation of warranty,
not how we in the UK perceive a warranty). But UK legislation already allowed for 6 years (5 in Scotland) in which to pursue a claim against a seller, so the "EU 2 year rule" is simply not a thing in the UK.
Remember - the EU directive interprets "warranty" as "the right to pursue a claim against a seller for a non-conformance"; nothing more. It does not in any way state that all goods must come with a minimum 2 year product warranty.