I have a requirement to change the order of DD/MM/YYYY tags according to a users country .
http://en.wikipedia.org/wiki/Date_format_by_country
The way that I was
For PHP, this should be a good start: http://php.net/manual/en/function.setlocale.php
For JavaScript: Display date/time in user's locale format and time offset
All in all, most modern languages have locale support built-in very well. You should not have to implement this yourself. It will be tiresome and buggy (localization is hard).