[whatwg] [wf2] Leap seconds, dates in the past

Gervase Markham gerv at mozilla.org
Fri Aug 18 02:57:51 PDT 2006


Henri Sivonen wrote:
> Could you elaborate on the use cases? Are there a lot of use cases on
> the Web now that force site author to hack awkward JavaScript widgets
> themselves? Can't they continue using those hacks for uses cases that
> are not mainstream like airline reservations?

Could we perhaps make the functions which do date calculation and
differencing pluggable? That is to say, we expose them on the DOM of the
widget, so you can do:

function gervsSubtractDates()
{
  ...
}


myWidget.subtractDates = gervsSubtractDates()

That way, you could have a calendar widget that defaulted to Gregorian
but could be hacked by specialist web pages to display other sorts of
calendar.

Note I haven't thought this through very well - it may be rubbish :-)

Gerv


More information about the whatwg mailing list