var int48 = require('./int48');

module.exports = (() => {
	'use strict';

	return {
		write(buffer, value, offset) {
			return int48.write(buffer, value.getTime(), offset);
		},

		read(buffer, offset) {
			return new Date(int48.read(buffer, offset));
		},

		getByteLength(value) {
			return int48.getByteCount(0);
		},

		getName() {
			return 'date';
		}
	};
})();
@@ -1,12 +1,13 @@
 var 
+u
 int48 = 
@@ -17,16 +17,17 @@
 uire('./
+u
 int48');
@@ -119,24 +119,25 @@
 %7B%0A%09%09%09return 
+u
 int48.write(
@@ -220,16 +220,17 @@
 ew Date(
+u
 int48.re
@@ -291,16 +291,17 @@
 %09return 
+u
 int48.ge
@@ -309,13 +309,14 @@
 Byte
-Count
+Length
 (0);

Fix Date object (de)serialization