[dom] Read-only OS time formatting preferences (#79)

All operating systems allow user to select time format. Usually between 12h, 24h or follow automatic.

Firefox OS is currently providing `navigator.mozHour12` that can take true/false/undefined values and that nicely fits into Intl API:

```
(new Date()).toLocaleString(navigator.languages, {
  hour12: navigator.mozHour12,
  hour: 'numeric',
  minute: 'numeric'
});
```

When "use default" is used, `mozHour` is undefined and Intl uses the default `hour12` value for the given locale. If `mozHour` is specified to either `true` or `false`, Intl API follows that.

There's also an event associated with it: `timeformatchange` that is dipatched on `window`.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/79

Received on Monday, 21 September 2015 08:21:15 UTC