{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/html/issues/281","repository_url":"https://api.github.com/repos/w3c/html","labels_url":"https://api.github.com/repos/w3c/html/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/w3c/html/issues/281/comments","events_url":"https://api.github.com/repos/w3c/html/issues/281/events","html_url":"https://github.com/w3c/html/issues/281","id":151490237,"number":281,"title":"stepUp/Down algorithm does not match reality","user":{"login":"travisleithead","id":2152696,"avatar_url":"https://avatars.githubusercontent.com/u/2152696?v=3","gravatar_id":"","url":"https://api.github.com/users/travisleithead","html_url":"https://github.com/travisleithead","followers_url":"https://api.github.com/users/travisleithead/followers","following_url":"https://api.github.com/users/travisleithead/following{/other_user}","gists_url":"https://api.github.com/users/travisleithead/gists{/gist_id}","starred_url":"https://api.github.com/users/travisleithead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisleithead/subscriptions","organizations_url":"https://api.github.com/users/travisleithead/orgs","repos_url":"https://api.github.com/users/travisleithead/repos","events_url":"https://api.github.com/users/travisleithead/events{/privacy}","received_events_url":"https://api.github.com/users/travisleithead/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/html/labels/match%20reality%20better","name":"match reality better","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"travisleithead","id":2152696,"avatar_url":"https://avatars.githubusercontent.com/u/2152696?v=3","gravatar_id":"","url":"https://api.github.com/users/travisleithead","html_url":"https://github.com/travisleithead","followers_url":"https://api.github.com/users/travisleithead/followers","following_url":"https://api.github.com/users/travisleithead/following{/other_user}","gists_url":"https://api.github.com/users/travisleithead/gists{/gist_id}","starred_url":"https://api.github.com/users/travisleithead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisleithead/subscriptions","organizations_url":"https://api.github.com/users/travisleithead/orgs","repos_url":"https://api.github.com/users/travisleithead/repos","events_url":"https://api.github.com/users/travisleithead/events{/privacy}","received_events_url":"https://api.github.com/users/travisleithead/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/w3c/html/milestones/3","html_url":"https://github.com/w3c/html/milestones/HTML5.1%20WD%20(June%202016)","labels_url":"https://api.github.com/repos/w3c/html/milestones/3/labels","id":1697509,"number":3,"title":"HTML5.1 WD (June 2016)","description":"","creator":{"login":"LJWatson","id":3501033,"avatar_url":"https://avatars.githubusercontent.com/u/3501033?v=3","gravatar_id":"","url":"https://api.github.com/users/LJWatson","html_url":"https://github.com/LJWatson","followers_url":"https://api.github.com/users/LJWatson/followers","following_url":"https://api.github.com/users/LJWatson/following{/other_user}","gists_url":"https://api.github.com/users/LJWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/LJWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LJWatson/subscriptions","organizations_url":"https://api.github.com/users/LJWatson/orgs","repos_url":"https://api.github.com/users/LJWatson/repos","events_url":"https://api.github.com/users/LJWatson/events{/privacy}","received_events_url":"https://api.github.com/users/LJWatson/received_events","type":"User","site_admin":false},"open_issues":44,"closed_issues":18,"state":"open","created_at":"2016-04-11T12:55:14Z","updated_at":"2016-05-16T21:14:30Z","due_on":"2016-05-31T23:00:00Z","closed_at":null},"comments":1,"created_at":"2016-04-27T21:01:42Z","updated_at":"2016-05-16T21:32:44Z","closed_at":null,"body":"In my reading of http://w3c.github.io/html/sec-forms.html#dom-htmlinputelement-stepup\r\n\r\nwith the following input:\r\n```html\r\n<input type=\"month\" value=\"1970-03\" min=\"1970-01\" max=\"2000-01\" step=\"0.5\">\r\n```\r\nThe algorithm seems to get all the way through to step 11, where it tries to convert value (3.5) to a month string. I think somewhere along the line it must be triggering the \"suffering from a step-mismatch\" because 3.5 does not convert to a legitimate month value, so rounding occurs. \r\n\r\nI think step 7 is trying to do this, but as worded, the step base-minus-value (-2) **is** an integral multiple of the allowed value step (0.5) [using a integral multiple of -4].\r\n\r\nThe algorithm should probably do an explicit rounding, perhaps via a step 10 1/2 that does a `ceil(value)` if value suffers a step-mismatch and `stepUp()` was called, `floor(value)` in the `stepdown()` case. (Since small steps still result in an increment, e.g., step values of \"0.2\").\r\n\r\nTest: https://jsfiddle.net/a3cafwv0/\r\nEdge/Chrome: round-up to the next month.\r\nFirefox/Safari: do not support type=\"month\""},"comment":{"url":"https://api.github.com/repos/w3c/html/issues/comments/219554875","html_url":"https://github.com/w3c/html/issues/281#issuecomment-219554875","issue_url":"https://api.github.com/repos/w3c/html/issues/281","id":219554875,"user":{"login":"travisleithead","id":2152696,"avatar_url":"https://avatars.githubusercontent.com/u/2152696?v=3","gravatar_id":"","url":"https://api.github.com/users/travisleithead","html_url":"https://github.com/travisleithead","followers_url":"https://api.github.com/users/travisleithead/followers","following_url":"https://api.github.com/users/travisleithead/following{/other_user}","gists_url":"https://api.github.com/users/travisleithead/gists{/gist_id}","starred_url":"https://api.github.com/users/travisleithead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisleithead/subscriptions","organizations_url":"https://api.github.com/users/travisleithead/orgs","repos_url":"https://api.github.com/users/travisleithead/repos","events_url":"https://api.github.com/users/travisleithead/events{/privacy}","received_events_url":"https://api.github.com/users/travisleithead/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T21:32:44Z","updated_at":"2016-05-16T21:32:44Z","body":"step=2.6 scalar=2 => 6 month step --> https://jsfiddle.net/a3cafwv0/7/\r\nstep=2.1 scalar=2 => 6 month step --> https://jsfiddle.net/a3cafwv0/8/\r\n\r\nSo, Edge/Chrome both apply the ceil(step) then multiply by scalar for step up/down (to get 6 months either way)."}}