iamkun / iamkun/dayjs

[Bug] can't use meridiem(meridiem is not a function)

Open
#2,796 0 comments 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

**Describe the bug**
When I use `dayjs().localeData().meridiem()` it returns an error with the following message and can't use the function.
`Uncaught TypeError: dayjs(...).localeData(...).meridiem is not a function`

![image](https://github.com/user-attachments/assets/3f8ddb14-470c-4f27-b84b-bb8b60f2f0be)

**Expected behavior**
Should return a string based on the current locale.

**Information**
- Day.js Version v1.11.13
- OS: Windows
- Browser Chrome 131.0.6778.205
- Time zone: GMT+3

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the error with dayjs().localeData().meridiem() on Day.js v1.11.13 and inspect the localeData API and locale handling. Done means the call returns a string based on the current locale without throwing a TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
localization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.