The story is usually linked to historical mourning after the 1848 revolution. It is more cultural custom than ordinary law, but it belongs in the odd-rules hall of fame.
Source / verification note
Cultural/historical custom; not presented as enforceable current law.