[whatwg] <input type=number> for year input

Nils Dagsson Moskopp nils at dieweltistgarnichtso.net
Fri Mar 7 22:24:58 PST 2014


Jonathan Watt <jwatt at jwatt.org> writes:

> is it wrong to use <input type=number> for year input.

I am certainly not an expert on the topic, but I believe the conceptual
problem can be reduced to using an input designed for a group (in the
mathematical sensce) to represent a value that is torsor.

Quote <http://ro-che.info/articles/2013-01-08-torsors.html>:

> While adding two dates is not possible, it is possible to add a time
> interval to a date («five days from today»). This suggests that we
> should not confound dates and time intervals — they are different
> types of values.

Therefore asking for a duration using <input type=number> is fine –
asking for a calendar year, however, is obviously a type error.

<http://math.ucr.edu/home/baez/torsors.html>


-- 
Nils Dagsson Moskopp // erlehmann
<http://dieweltistgarnichtso.net>



More information about the whatwg mailing list