The regulations do not say which wire should be permanent line(live) and which is switched. As the yellow should have red sleeve. Blue with be return(neutral). As you say one will be for run on. If wrong way around it will not switch off.
as Eric says no standard but what you describe would be most popular method, if you can see connections in light it may confirm, ie is yel. in with sw. line to light or in with perm. looped lives.
As you say it was middle of night I ussume it had been working correctly before? if so then would seem the timer circuit has failed in 'on' position, if so needs new fan as not economic to repair,
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!