Skip to content

Commit

Permalink
perf: use new logseq-dateutils
Browse files Browse the repository at this point in the history
  • Loading branch information
benjypng committed Oct 3, 2023
1 parent bc846c2 commit 0d02bd9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@doist/todoist-api-typescript": "^2.1.2",
"@logseq/libs": "^0.0.14",
"logseq-dateutils": "^0.0.26",
"logseq-dateutils": "^2.1.1",
"preact": "^10.17.1",
"react": "npm:@preact/compat",
"react-dom": "npm:@preact/compat"
Expand Down
18 changes: 14 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions src/features/retrieve/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import {
TodoistApi,
} from "@doist/todoist-api-typescript";
import { BlockToInsert } from "./types";
import {
getScheduledDeadlineDateDay,
getYYMMDDTHHMMFormat,
} from "logseq-dateutils";
import { getScheduledDateDay, getYYMMDDTHHMMFormat } from "logseq-dateutils";
import { PluginSettings } from "~/settings/types";

const handleComments = async (taskId: string, obj: BlockToInsert) => {
Expand Down Expand Up @@ -57,7 +54,7 @@ const handleAppendTodoAndAppendUrlAndDeadline = (
}
if (due?.date) {
treatedContent = `${treatedContent}
DEADLINE: <${getScheduledDeadlineDateDay(new Date(due.date))}>`;
${getScheduledDateDay(new Date(due.date))}`;
}
if (retrieveAppendCreationDateTime) {
const isoDate = getYYMMDDTHHMMFormat(new Date(createdAt));
Expand Down

0 comments on commit 0d02bd9

Please sign in to comment.