SirGaga / mobiscroll

Automatically exported from code.google.com/p/mobiscroll
0 stars 0 forks source link

Optional 4-digit format for year in the scroller #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Look at the year part of the scroller

What is the expected output? What do you see instead?
I'd like to configure the year to be displayed as 2011 instead of 11. Now the 
2-digit format is hard-coded.

What version of the product are you using? On what operating system?
Mobiscroller 1.5.

Please provide any additional information below.
The format can be changed from the code by changing the line

w[s.yearText][i] = s.dateOrder.search(/yy/i) < 0 ? i.toString().substr(2, 2) : 
i.toString();

to

w[s.yearText][i] = s.dateOrder.search(/yy/i) < 0 ? i.toString().substr(0, 4) : 
i.toString();

This could be provided as a general option.

Original issue reported on code.google.com by thar...@gmail.com on 5 Sep 2011 at 7:17

GoogleCodeExporter commented 9 years ago
The original code is correct. In order to display 4 digit year format on the 
scroller, set the dateOrder option to 'mdyy' instead of the default 'mdy'.

Original comment by diosla...@gmail.com on 5 Sep 2011 at 8:08

GoogleCodeExporter commented 9 years ago
You are indeed right and this issue was not warranted. Thank you for a quick 
reply.

Original comment by thar...@gmail.com on 5 Sep 2011 at 9:35