title: Detect if user's locale is set to 12-hour or 24-hour timeformat using javascript
body: <p>how to check whether the user is using 12hr or 24hr time format using Javascript with or without using 3rd party library like moment.js 
  I also tried <code>new Date().toLocaleString()</code> but it is not working tested in firefox and google chrome. firefox always shows 12hr format and chrome always shows 24hrs time format</p>