MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / createCopiedTimeblock

Function createCopiedTimeblock

src/utils/helpers.ts:778–790  ·  view source on GitHub ↗
(
	timeblock: TimeBlock,
	newStartTime: string,
	newEndTime: string
)

Source from the content-addressed store, hash-verified

776 * Creates a copied timeblock with a fresh ID and updated time range.
777 */
778export function createCopiedTimeblock(
779 timeblock: TimeBlock,
780 newStartTime: string,
781 newEndTime: string
782): TimeBlock {
783 return {
784 ...timeblock,
785 id: generateTimeblockId(),
786 startTime: newStartTime,
787 endTime: newEndTime,
788 attachments: timeblock.attachments ? [...timeblock.attachments] : undefined,
789 };
790}
791
792/**
793 * Updates a timeblock in a daily note's frontmatter

Calls 1

generateTimeblockIdFunction · 0.85

Tested by

no test coverage detected