datetime/parse: cannot parse ISO week date
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
parse() cannot parse [ISO week date](https://en.wikipedia.org/wiki/ISO_week_date) such as `2023-W50`.
**Steps to Reproduce**
```ts
import { parse } from "https://deno.land/std@0.208.0/datetime/parse.ts"
parse("2023-W50", "yyyy-MM-dd")
```
**Expected behavior**
it returns `2023-12-11`. however, it errors with
```
Uncaught Error: value not valid for token { month undefined } W20
at DateTimeFormatter.parseToParts (https://deno.land/std@0.208.0/datetime/_common.ts:562:15)
at parse (https://deno.land/std@0.208.0/datetime/parse.ts:28:27)
at :1:22
```
**Environment**
- OS: Ubuntu 23.10
- deno version: 1.38.5+e9ab9ba canary
- std version: 0.208.0
Contributor guide
Assessment
This issue has not been assessed yet.