added microseconds to date

This commit is contained in:
Alexander Sulfrian 2011-01-28 18:16:12 +01:00
parent b98994ae39
commit 01e0fb1b92

View File

@ -321,7 +321,21 @@ var parseDate = function(value) {
var rawValue = parseBits(value, 63, 1);
// discard usecs and shift from 2000 to 1970
return new Date((((sign == 0) ? 1 : -1) * rawValue / 1000) + 946684800000);
var result = new Date((((sign == 0) ? 1 : -1) * rawValue / 1000) + 946684800000);
// add microseconds to the date
result.usec = rawValue % 1000;
result.getMicroSeconds = function() {
return this.usec;
};
result.setMicroSeconds = function(value) {
this.usec = value;
};
result.getUTCMicroSeconds = function() {
return this.usec;
};
return result;
}
var arrayParser = function(value) {