(dateTs: number)
| 20 | | ThoughtSignatureBlock |
| 21 | |
| 22 | export function getTaskFileName(dateTs: number): string { |
| 23 | const date = new Date(dateTs) |
| 24 | const month = date.toLocaleString("en-US", { month: "short" }).toLowerCase() |
| 25 | const day = date.getDate() |
| 26 | const year = date.getFullYear() |
| 27 | let hours = date.getHours() |
| 28 | const minutes = date.getMinutes().toString().padStart(2, "0") |
| 29 | const seconds = date.getSeconds().toString().padStart(2, "0") |
| 30 | const ampm = hours >= 12 ? "pm" : "am" |
| 31 | hours = hours % 12 |
| 32 | hours = hours ? hours : 12 // the hour '0' should be '12' |
| 33 | return `roo_task_${month}-${day}-${year}_${hours}-${minutes}-${seconds}-${ampm}.md` |
| 34 | } |
| 35 | |
| 36 | export async function downloadTask( |
| 37 | dateTs: number, |
no test coverage detected