date Type
Information
- Stores the date as a number. Converts to
new Date()
class upon deserialization. - Requires 8 bytes.
- Use the
new Date()
class for assignment.
Example Usage
import { Serializer, t } from "encodexx"
const serializer = new Serializer({ createdAt: t.date, updatedAt: t.date})
serializer.encode({ createdAt: new Date("11/12/2024"), updatedAt: new Date("02/24/2024")});