Here’s a strange observation (on a Tuesday?) that I saw recently at a nurse station… An electric pumpkin powered by an extension cord. Even though the electric pumpkin was UL listed and presumably okay, NFPA 70-2011, Article 400.8 (1) says flexible electrical cords cannot be used as a substitute for fixed wiring. That means extension cords cannot be used for anything except temporary use.
CORRECTION: On November 6, 2018, a very thoughtful reader pointed out to me that I was incorrect in my posting above. According to NFPA 70-2011, Article 590.3(B), extension cords are permitted to be used for holiday decorations up to 90-days. But Article 590.2(A) does say all other requirements of the code would have to be met. implying the extension cord would have to be listed by a national listing agency (i.e. UL). Also, Article 590.2(B) says temporary wiring is acceptable if it is approved based on the conditions of use. So, you would not be able to abuse the concept of an extension cord used on holiday decorations.
This also means that individual organizations could have policies specific to their staff that limit or prohibit the use of extension cords on holiday decorations beyond what NFPA 70-2011 provides.
I apologize for this error, and appreciate the reader for bringing this to my attention.