-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codebugBug or defectBug or defect
Milestone
Description
Context
- node version: 8.1.4
- joi version: 10.6.0
- environment (node, browser): node
- used with (hapi, standalone, ...): standalone
- any other relevant information:
What are you trying to achieve or the steps to reproduce ?
Joi.date().iso().validate('2013').value.toISOString();Which result you had ?
'1970-01-01T00:00:02.013Z'What did you expect ?
Same output as new Date('2013').toISOString():
'2013-01-01T00:00:00.000Z'As far as I can tell, it unexpectedly parses it as a timestamp value.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codebugBug or defectBug or defect