JavaScript's Date class is more like a badly implemented version of SQL's TIMESTAMP WITH TIME ZONE class. To handle date-precision data, you really need a separate class, preferably one that counts days since an epoch. As a first pass, it might make sense to wrap Date and constrain it's construction to midnight UTC...
JavaScript's
Date
class is more like a badly implemented version of SQL'sTIMESTAMP WITH TIME ZONE
class. To handle date-precision data, you really need a separate class, preferably one that counts days since an epoch. As a first pass, it might make sense to wrapDate
and constrain it's construction to midnight UTC...