The UK could be in for 40 days of sunshine or 40 days of downpours, depending on how the day dawns on Wednesday, according to the folklore of St Swithin’s Day.

The weather through the end of July and August is said to be determined by the whim of one of Britain’s medieval saints who is celebrated on July 15.

St Swithin was a ninth century Anglo-Saxon bishop of Winchester and, according to legend, was tutor to a young King Alfred the Great.

He is best known for a proverb which predicts 40 days of rain or sun, depending on what weather hits the UK on his special day.

Little is known about the saint, but he is said to have requested he be buried outside Winchester Cathedral so his grave would be exposed to both the footsteps of worshippers and the elements.

But in the 10th century, after some priests moved his tomb inside, a great storm hit, which was taken as a sign of St Swithin’s displeasure.

It sparked the proverb: “St Swithin’s Day if thou dost rain, for forty days it will remain, St Swithin’s Day if thou be fair, for forty days will rain na mair.”

So what can the UK expect for the next 40 days? Probably cloudy and a bit of drizzle, according to the Met Office.

Meteorologist Alex Burkill told the PA news agency: “For many it’s going to be a largely cloudy day.

“There will be a rain that could be a bit heavy at times, particularly across parts of Scotland and then western areas of the UK – so north-west England, Wales, south-west England.

“So cloudy with outbreaks of rain that will be heavier towards the north, and further east the clouds could be thick enough for a few spots of rain but mostly dry.”

Can we expect the weather to stay fixed for the next six weeks? In a word, no.

Asked if we will have 40 days of rain, Mr Burkill said: “I think in the history of anything that has never happened, and that’s not going to happen this time, fortunately.”

While the gloomy picture will remain into Thursday, by the end of the week the UK could be in for much warmer temperatures and sunny skies, especially in the south.

Mr Burkill added: “It’s a drier and brighter picture as we go into the start of August – it does look like we’re going to see more prolonged dry spells than really we’ve had this month.

“So quite a different story from what many of us can expect on quite a cloudy and damp St Swithin’s Day.”

St Swithin’s Day has certainly never been a particularly reliable source of meteorological predictions.

In 1913, July 15 was hit by a 15-hour rainstorm, but 30 days of sunshine came after.

In 1924, 13 and a half hours of glorious sunshine were followed by 30 days of rain out of the next 40.