(type: string)
| 22 | |
| 23 | const parts = formatter.formatToParts(new Date()) |
| 24 | const get = (type: string) => parts.find((p) => p.type === type)?.value ?? "" |
| 25 | |
| 26 | const date = `${get("year")}-${get("month")}-${get("day")}` |
| 27 | const minutes = parseInt(get("hour"), 10) * 60 + parseInt(get("minute"), 10) |