-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
c: bugSomething isn't workingSomething isn't workingc: featureRequest for new featureRequest for new featuregood first issueGood for newcomersGood for newcomers
Milestone
Description
We will not add a default case.
Instead we adjust the method signature to allow for unkown string params and return dates in v6.0.
recent(format: LiteralUnion<'abbr' | 'wide' | 'unix' | 'date'> = 'unix'): string | number | Date { ... }
Previous description
The switch statement in time.recent is missing the a default switch case.
Lines 21 to 31 in 1058e17
| switch (format) { | |
| case 'abbr': | |
| date = date.toLocaleTimeString(); | |
| break; | |
| case 'wide': | |
| date = date.toTimeString(); | |
| break; | |
| case 'unix': | |
| // TODO @Shinigami92 2022-01-10: add default case | |
| date = date.getTime(); | |
| break; |
FFR: Documented by @Shinigami92
Metadata
Metadata
Assignees
Labels
c: bugSomething isn't workingSomething isn't workingc: featureRequest for new featureRequest for new featuregood first issueGood for newcomersGood for newcomers