Date formatting with pattern tokens. See PATTERNS for presets and the format function docs for the full token reference table.
Parse a Gregorian date string into { year, month, day }
Supports formats:
Date string
GregorianDate or null if unparseable
parseGregorian('2025-10-11') // { year: 2025, month: 10, day: 11 }parseGregorian('2025/10/11') // { year: 2025, month: 10, day: 11 }parseGregorian('2025年10月11日') // { year: 2025, month: 10, day: 11 } Copy
parseGregorian('2025-10-11') // { year: 2025, month: 10, day: 11 }parseGregorian('2025/10/11') // { year: 2025, month: 10, day: 11 }parseGregorian('2025年10月11日') // { year: 2025, month: 10, day: 11 }
Date formatting with pattern tokens. See PATTERNS for presets and the format function docs for the full token reference table.