Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format() typeerror #1188

Open
mingxin-yang opened this issue Nov 6, 2020 · 5 comments
Open

format() typeerror #1188

mingxin-yang opened this issue Nov 6, 2020 · 5 comments

Comments

@mingxin-yang
Copy link

Describe the bug

use dayjs().format() out TypeError: undefined is not an object (evaluating 'i[r]')

My code is

`import dayjs from 'dayjs';
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
dayjs.extend(isSameOrBefore)
dayjs.extend(isSameOrAfter)

console.log("3223",dayjs('2019-01-25').format())`

Expected behavior
A clear and concise description of what you expected to happen.

Information

  • Day.js Version v1.9.5
  • OS: android
  • Browser react native
  • Time zone:UTC/GMT +8 hours CST
@iamkun
Copy link
Owner

iamkun commented Nov 6, 2020

Seems good https://runkit.com/embed/074vo0sil5fo

@mingxin-yang
Copy link
Author

My node version is v10.16.3

@iamkun
Copy link
Owner

iamkun commented Nov 6, 2020

Tested on v10.16.3 and works as well

@mingxin-yang
Copy link
Author

Is that cased by react native?

@iamkun
Copy link
Owner

iamkun commented Nov 6, 2020

Sorry can't help, I don't know React Native.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants