Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

13
  • 2
    How is 1635750314812 in any way YYYY/MM/DD?! Commented Nov 1, 2021 at 7:54
  • @deceze took the words out of my mouth Commented Nov 1, 2021 at 7:54
  • @deceze, i don't understand what you mean Commented Nov 1, 2021 at 7:55
  • moment('1635750314812', 'YYYY/MM/DD') means parse 1635750314812 assuming it is in YYYY/MM/DD format. Which it's clearly not. Commented Nov 1, 2021 at 7:55
  • 'YYYY/MM/DD' is supposed to inform Moment about the format of the first argument. moment('1635750314812', 'YYYY/MM/DD') means : "Hey Moment, I'm informing you that '1635750314812' is in format 'YYYY/MM/DD'). Moment is like 'Wat?' and produces an invalid Moment object. Log it, it says _isValid:false. Commented Nov 1, 2021 at 7:56