(date: Date)
| 133 | } |
| 134 | |
| 135 | function formatGmailDate(date: Date): string { |
| 136 | const y = date.getFullYear() |
| 137 | const m = String(date.getMonth() + 1).padStart(2, '0') |
| 138 | const d = String(date.getDate()).padStart(2, '0') |
| 139 | return `${y}/${m}/${d}` |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Decodes base64url-encoded content from the Gmail API. |