Thread:Project:Support desk/Code for swapping between metric/imperial and British/american dates

Back when my wiki was on Wikia, someone wrote some code that meant I could swap between American and British dates and Imperial and Metric measurements (wrapped in a special tag) by pressing switches. Obviously when using Vector, it no-longer works. Can anyone advise me of any extensions that can do the same thing or (even better) fix my code to work with the Vector skin? I'm useless at programming. The code is located on this page.