TotallyInformation / node-red-contrib-moment

Node-Red Node that produces formatted Date/Time output using the Moment.JS library. Timezone, dst and locale aware.
Apache License 2.0
34 stars 16 forks source link

Added support for date string formats not recognized by moment #19

Closed shrickus closed 6 years ago

shrickus commented 6 years ago

Fallback to new Date(inp) when the date string is non-standard, like this output from the file stat() function: 2017-12-12 16:03:51.832427000 -0400 as well as the Twitter API default time string: Mon Jan 08 21:24:37 +0000 2018

TotallyInformation commented 6 years ago

Hi Steve, thanks for this. One question though. Does the input still work with "today", "tomorrow" and "yesterday"?

TotallyInformation commented 6 years ago

No, OK, I can see from a code review that it will.

TotallyInformation commented 6 years ago

Published as v1.0.7, many thanks.