Changeset 15352


Ignore:
Timestamp:
04/16/13 10:12:41 (12 years ago)
Author:
tbretz
Message:
Added 'now' as a a valid time.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/scripts/Observation_class.js

    r15288 r15352  
    1717
    1818    // FIXME: Check transisiton from summer- and winter-time!!
    19     var utc = new Date(obj.date);
     19    var utc = obj.date.toString().toUpperCase()=="NOW" ? new Date() : new Date(obj.date);
    2020    if (isNaN(utc.valueOf()))
    21         throw new Error(obj.date+' is not a valid Date String.'+
    22                         ' Try something like "2013-01-08 23:05 UTC" .');
     21        throw new Error('"'+obj.date+'" not a valid Date... try something like "2013-01-08 23:05 UTC".');
    2322    ret.start = utc;
    2423    ret.id    = obj.id;
Note: See TracChangeset for help on using the changeset viewer.