-
Notifications
You must be signed in to change notification settings - Fork 27.4k
feat(input): allow to define the timezone when parsing and formatting dates #8629
Conversation
@petebacondarwin Could you review this PR and merge it if good? |
@tbosch - is there a reason why some tests use |
I would say that the L1040 The similar correction should be done somewhere near the first change - the base year value should be 1970 instead of 0 which means 1900. |
@estekhin - how come that doesn't fail any of the tests then? |
@petebacondarwin No, the old code contained them for converting a Date into a number and I forgot to remove them, as |
The tests are failing, will look into this on Monday... |
@petebacondarwin base year=1970 is needed for input[time]. What is the policy on that - should I create an issue specific for input[time]? The idea is that when converting a string value of input[time] into a Date it should be based on 1970-01-01 "date" part as described in http://www.w3.org/TR/html5/forms.html#time-state-(type=time) and http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#time-state-(type=time). |
I will include it in this PR... |
023fab7
to
9c0d485
Compare
@petebacondarwin Could you review this? |
This seems OK. I wonder though whether UTC should be the default? Since that is how HTML5 API inputs are supposed to work? |
@petebacondarwin see the comment on the issue that I am about to add :-) |
e94ab96
to
5f90340
Compare
Allow to define the timezone for parsing dates in
input[date]
,input[time]
, … as well as in thedateFilter
.Closes #8447.