Skip to content

Commit 86d8179

Browse files
jacobbaskinRomanHotsiy
authored andcommitted
fix: Ioutput dates as ISO 8601 strings in JSON Formatter (#313)
kudos to @jacobbaskin
1 parent da9df29 commit 86d8179

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/utils/JsonFormatterPipe.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ function valueToHTML(value) {
3535
level++;
3636
output += arrayToHTML(value);
3737
level--;
38+
} else if (value && value.constructor === Date) {
39+
output += decorateWithSpan('"' + value.toISOString() + '"', 'type-string');
3840
} else if (valueType === 'object') {
3941
level++;
4042
output += objectToHTML(value);

0 commit comments

Comments
 (0)