521 B
521 B
Moment.js
This guide shows you how to install and use Moment.js, a popular date library in ToonBoom Harmony.
Install it from NPM and create a new script file:
❯ npm install moment
❯ touch ./src/scripts/moment.ts
Use ES modules to import the library:
// src/scripts/moment.ts
import moment from "moment";
MessageLog.trace(moment().locale("es").format("LLLL"));
Build it:
❯ npm run build
Then run dist/moment.js in Harmony:
martes, 18 de noviembre de 2025 12:23