diff --git a/.github/workflows/runtest.yml b/.github/workflows/runtest.yml index 9f2bbe1..e517c54 100644 --- a/.github/workflows/runtest.yml +++ b/.github/workflows/runtest.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: "npm" diff --git a/MMM-JsonTable.js b/MMM-JsonTable.js index 28ccf06..0309d90 100644 --- a/MMM-JsonTable.js +++ b/MMM-JsonTable.js @@ -125,7 +125,7 @@ Module.register("MMM-JsonTable", { if (typeof input === "string" && m.isValid()) { // Show a formatted time if it occures today if ( - m.isSame(new Date(), "day") && + m.isSame(new Date(Date.now()), "day") && m.hours() !== 0 && m.minutes() !== 0 && m.seconds() !== 0 diff --git a/README.md b/README.md index b7450e3..07a4037 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MMM-JsonTable -A module for the [MagicMirror²](https://github.com/MichMich/MagicMirror) project which creates a table filled with a list gathered from a json request. +A module for the [MagicMirror²](https://github.com/MagicMirrorOrg/MagicMirror) project which creates a table filled with a list gathered from a json request. All the variables of the objects in the array are represented by a table column. For every column it checks if a valid DateTime is given, and then formats it to `HH:mm:ss` if it is today or `YYYY-MM-DD` otherwise.