mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
11 lines
260 B
TypeScript
11 lines
260 B
TypeScript
import moment from "moment";
|
|
export function now(node) {
|
|
var fmt = "HH:mm:ss";
|
|
const args = node.arguments;
|
|
if (args[0] instanceof <string />) {
|
|
fmt = args[0].get();
|
|
}
|
|
const time = moment().format(fmt);
|
|
return <string value={time}></string>;
|
|
}
|