Skip to content

Commit

Permalink
show readable representation of Date objects in repl
Browse files Browse the repository at this point in the history
  • Loading branch information
chqrlie committed Feb 25, 2024
1 parent 27928ce commit 6428ce0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,8 @@ import * as os from "os";
std.puts(a);
} else if (stack.indexOf(a) >= 0) {
std.puts("[circular]");
} else if (a instanceof Date) {
std.puts("Date " + a.toGMTString().__quote());
} else if (has_jscalc && (a instanceof Fraction ||
a instanceof Complex ||
a instanceof Mod ||
Expand Down

0 comments on commit 6428ce0

Please sign in to comment.