MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / pastedImageTimestamp

Function pastedImageTimestamp

apps/desktop/src/main/vault.ts:2936–2948  ·  view source on GitHub ↗
(now: Date)

Source from the content-addressed store, hash-verified

2934}
2935
2936function pastedImageTimestamp(now: Date): string {
2937 const date = [
2938 now.getFullYear(),
2939 padPastedImageDatePart(now.getMonth() + 1),
2940 padPastedImageDatePart(now.getDate())
2941 ].join('-')
2942 const time = [
2943 padPastedImageDatePart(now.getHours()),
2944 padPastedImageDatePart(now.getMinutes()),
2945 padPastedImageDatePart(now.getSeconds())
2946 ].join('')
2947 return `${date} ${time}`
2948}
2949
2950function pastedImageExtension(input: Pick<PastedImageInput, 'mimeType' | 'suggestedName'>): string {
2951 const suggestedExt = path.extname(input.suggestedName ?? '').toLowerCase()

Callers 1

pastedImageFilenameFunction · 0.85

Calls 1

padPastedImageDatePartFunction · 0.85

Tested by

no test coverage detected