We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 45f162d + cf56fc4 commit 8ef37a7Copy full SHA for 8ef37a7
src/commands/General/time.js
@@ -1,9 +1,9 @@
1
import dateFormat from "dateformat";
2
-const date = new Date();
3
-const t = dateFormat(date, "HH:MM:ss.L");
4
5
export default class TimeCommand {
6
execute(term, params, directory, setDirectory) {
+ const date = new Date();
+ const t = dateFormat(date, "HH:MM:ss.L");
7
term.writeln('');
8
term.writeln(`Current time is ${t}`);
9
@@ -12,4 +12,9 @@ export default class TimeCommand {
12
description() {
13
return "Print current time";
14
}
15
-}
+
16
+ help(term) {
17
+ term.writeln("Usage: time");
18
+ term.writeln("This command prints the current time in the format HH:mm:ss.SSS");
19
+ }
20
+}
0 commit comments