There is no single-digit formatter for month #8150
Comments
We don't have to use formatter, we can keep Demo: http://jsfiddle.net/BlackLabel/LLExL/11801/ PS: In my opinion |
I agree with @glajchs, we should support this. In some cultures (like my own), it is common to write 10/3 for April 10th and so on. I'm surprised PHP doesn't have a symbol for this. Do you have any suggestion for which letter to use? Any conventions out there in other programming languages? |
How about |
But the %j in returns global day from a year, not month. |
I have a suggestion for what the new "month # without leading zero" variable should be, which is "%o". Highcharts uses a subset of the PHP API, as linked above. In the PHP API, the standard seems to be to use the next available letter in the alphabet, in lower case, when providing the non-leading-zeros-prefixed version of a value. For instance the leading-zero-prefixed 24 hour value is "%H", and the non-leading-zero-prefixed version of the 24 hour value is "%k". It's not "%h" because that's already taken, and it's not "%i", or "%j" because those are already taken. Since our 2 digit month is "%m", and "%M" is already taken, the next value could be "%n", but I'd advise against that since you're borrowing a subset from the PHP API, and in the PHP API "%n" is newline char (even though highcharts doesn't support this). |
Expected behaviour
I can format a date like (4/3) for April 3rd without requiring a custom formatter.
Actual behaviour
The default formats April 3rd like (04/3), which looks very weird. I can double-digit pad the day to make it look like (04/03), but that still looks bad.
Live demo with steps to reproduce
http://jsfiddle.net/LLExL/11754/
Product version
6.0.7
Affected browser(s)
All
The text was updated successfully, but these errors were encountered: