iamkun / iamkun/dayjs

utcOffset Interface error

Open
#1,773 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I am using utcOffset in TypeScript project, but the interface of utcOffset may be error.
```
dayjs()
.utcOffset(timeZone)
.add(4, 'y')
.format(patten);
```

node_modules/dayjs/index.d.ts utcOffset(): number

Contributor guide

Open the contributing guide

Research direction

Start with node_modules/dayjs/index.d.ts and compare the declared utcOffset interface with the usage shown in the issue. Verify the intended utcOffset call in a TypeScript project and add or update the relevant declaration and test so the interface matches the supported API.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.