-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
dayjs().set() support Object param? #677
Comments
Update: ObjectSupport plugin https://day.js.org/docs/en/plugin/object-support please use |
thanks. |
ok we will |
plus one on this feature. It's common for Calendar Dates to be represented in Objects via:
momentjs accepts this format during initialization. Would be nice if dayjs had similar capabilities |
Especially since .toObject() method exist, would be nice to have the way back of it |
这么做感觉挺奇怪的。
|
We just released the |
cool! |
@iamkun Hello, dayjs().get('month') // 8
dayjs({ month: dayjs().get('month') }).get('month') // 7 It's very uncomfortable. I always need to remember that this parts of one lib works in different way. dayjs().get('month') === dayjs({ month: dayjs().get('month') }).get('month') // true |
@xSorc this is absolutely a bug that I did not review it deeply.
should return |
@xSorc a fixed pr here #1089 |
fix: fix objectSupport plugin to get the correct result (zero-based month) is released in 1.9.1 |
hi! i used objectSupport plugin, but for some reason it still doesn'w work :c
it doesn't compile:
I used other plugins and didn't have any problems with them |
I seem to be getting the same issue as @BigBird15, but when passing the object with |
not working...
The text was updated successfully, but these errors were encountered: