tools.js
/**
 * Convert string date from manifest, to ISODate.
 */
Convert string date from manifest, to ISODate.
Convert string date from manifest to ISODate .
function dateToISO(str1) {
    var yr1 = parseInt(str1.substring(0, 4));
    var mon1 = parseInt(str1.substring(4, 6));
    var dt1 = parseInt(str1.substring(6, 8));
    var hh = parseInt(str1.substring(8, 10));
    var mm = parseInt(str1.substring(10, 12));
    var ss = parseInt(str1.substring(12, 14));
    return new Date(yr1, mon1 - 1, dt1, hh, mm, ss);
}
function dateToISO ( str1 ) { var yr1 = parseInt ( str1 . substring ( 0 , 4 ) ) ; var mon1 = parseInt ( str1 . substring ( 4 , 6 ) ) ; var dt1 = parseInt ( str1 . substring ( 6 , 8 ) ) ; var hh = parseInt ( str1 . substring ( 8 , 10 ) ) ; var mm = parseInt ( str1 . substring ( 10 , 12 ) ) ; var ss = parseInt ( str1 . substring ( 12 , 14 ) ) ; return new Date ( yr1 , mon1 - 1 , dt1 , hh , mm , ss ) ; }
Convert string date from manifest, to ISODate.
Convert string date from manifest to ISODate .
// str1 format would be 20160928104932