Date literals

David-Sarah Hopwood david.hopwood at industrial-designers.co.uk
Wed Nov 19 23:59:35 PST 2008


Michael Haufe wrote:
> FWIW, VB.NET uses the following syntax for date literals #8/23/1970
> 3:45:39AM#
> 
> Would that not solve the parsing problem?

It would, since # is not otherwise used. But I don't see the point:
what is wrong with using 'new Date("...")'? Date literals would be
vanishingly rare compared to other literals; there are very few cases
where it is correct to use a hard-coded date in a program.
(As for dates in JSON, that was already addressed in my previous
reply.)

-- 
David-Sarah Hopwood


More information about the Es-discuss mailing list