( timeblock: TimeBlock, newStartTime: string, newEndTime: string )
| 776 | * Creates a copied timeblock with a fresh ID and updated time range. |
| 777 | */ |
| 778 | export 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 |
no test coverage detected