mde / timezone-js

DEPRECATED: Timezone-enabled JavaScript Date object. Uses Olson zoneinfo files for timezone data.
824 stars 183 forks source link

for jsonp load #119

Open vflash opened 10 years ago

vflash commented 10 years ago
<script type="text/javascript" src="./tzdata.js?jsonp=tzdata">/*var tzdata = {...preparse...};*/</script>
<script type="text/javascript" src="./timezone-js/src/date.js"></script>

<script>
    timezoneJS.timezone.transport = function(o) {
        var data = o.url == 'tzdata' ? tzdata : '';
        if (o.async && typeof o.success == 'function') {
            o.success(data)
        };
        return data;
    };

    var _tz = timezoneJS.timezone;
    _tz.loadingScheme = _tz.loadingSchemes.MANUAL_LOAD;
    _tz.loadZoneJSONData('tzdata', true);
</script>
longlho commented 10 years ago

We have a test suite, can you add it to our test suite?

vflash commented 10 years ago

not, I can not use Jake ~ https://gist.github.com/vflash/e75f00dcf2cb923b796d,

PunkChameleon commented 10 years ago

This has been around for a while -- should it be closed if not merged?

longlho commented 10 years ago

Hmm I haven't got time to write a test for it yet