MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / strTime

Function strTime

libs/datatables-binding-0.18/datatables.js:532–540  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

530 $input.parent().removeClass('has-error');
531 // treat date as UTC time at midnight
532 var strTime = function(x) {
533 var s = type === 'date' ? 'T00:00:00Z' : '';
534 var t = new Date(x + s).getTime();
535 // add 10 minutes to date since it does not hurt the date, and
536 // it helps avoid the tricky floating point arithmetic problems,
537 // e.g. sometimes the date may be a few milliseconds earlier
538 // than the midnight due to precision problems in noUiSlider
539 return type === 'date' ? t + 3600000 : t;
540 };
541 if (inArray(type, ['date', 'time'])) {
542 v[0] = strTime(v[0]);
543 v[1] = strTime(v[1]);

Callers 1

datatables.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected