Skip to content

Commit 6428ce0

Browse files
committed
show readable representation of Date objects in repl
1 parent 27928ce commit 6428ce0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

repl.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,8 @@ import * as os from "os";
10051005
std.puts(a);
10061006
} else if (stack.indexOf(a) >= 0) {
10071007
std.puts("[circular]");
1008+
} else if (a instanceof Date) {
1009+
std.puts("Date " + a.toGMTString().__quote());
10081010
} else if (has_jscalc && (a instanceof Fraction ||
10091011
a instanceof Complex ||
10101012
a instanceof Mod ||

0 commit comments

Comments
 (0)