Skip to content

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

@JackmanGo

Description

@JackmanGo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions