diff --git a/src/services/task.service.ts b/src/services/task.service.ts index 560d95d..d4c11d7 100644 --- a/src/services/task.service.ts +++ b/src/services/task.service.ts @@ -1,6 +1,7 @@ import fs from "fs"; import { Task } from "../types/task"; import { Config } from "../types/config"; +import dayjs from "dayjs"; export function complete(config: Config, profile: string, task: Task) { const profileConfig = config.profiles[profile]; @@ -26,7 +27,8 @@ export function complete(config: Config, profile: string, task: Task) { throw new Error(`Cannot complete task, file has been changed since last scan. Rememberred line: ${task.source}, current line: ${line}.`); } - output.push(line.replace(/^-(\s+)\[.\]/, `-$1[${profileConfig.completion?.status ?? 'x'}]`)); + const taskStr = line.replace(/^-(\s+)\[.\]/, `-$1[${profileConfig.completion?.status ?? 'x'}]`); + output.push(`${taskStr} ✅ ${dayjs().format("YYYY-MM-DD")}`); } else {