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

Bug while format with option {hideTime: true} #130

Open
JackmanGo opened this issue Jun 21, 2023 · 0 comments
Open

Bug while format with option {hideTime: true} #130

JackmanGo opened this issue Jun 21, 2023 · 0 comments

Comments

@JackmanGo
Copy link

JackmanGo commented Jun 21, 2023

This method returns an empty string

    let str = mStart.twix(mEnd, {allDay: true}).format({hideTime: true})
    console.log("mStart:"+mStart)
    console.log("mEnd:"+mEnd)
    console.log("str:"+str)

In chrome console output:

start:2023-06-21
end:2023-06-20
str:

I expect the output to be "Jun 21-Jun 20," but why is it an empty string? Is this a bug?
If the start date is today and the end date is yesterday, it results in an empty string while other time periods work fine

package.json:

 "moment": "2.22.2",
 "moment-timezone": "0.5.21",
 "twix": "1.2.1"

Thanks

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

1 participant