carboneio / carbone

Fast and simple report generator, from JSON to pdf, xslx, docx, odt...
https://carbone.io
Other
1.3k stars 190 forks source link

date input to string conversion cause a moment js deprecation warning #85

Closed seddik11 closed 3 years ago

seddik11 commented 4 years ago

https://github.com/Ideolys/carbone/blob/4859cf8d894fcbfa46253578d1cdec1093ac095e/formatters/date.js#L36

when I try to use the date formatter formatD moment js print a deprecation warning Deprecation warning: value provided is not in a recognized RFC2822 or ISO format but when i removed the concatenation + '' warning disappeared.

steevepay commented 4 years ago

Hi @seddik11, thank you for reaching us! Since the latest release v2.0.0, we have updated the momentjs module and we didn't notice the warning. We are going fix the issue but we need to investigate to see if it breaks or changes older reports.

steevepay commented 3 years ago

Version 3 of Carbone is available, Dayjs is used instead of Momentjs. You can directly switch to the latest version without breaking changes, everything is supported. Learn more: https://github.com/carboneio/carbone/blob/master/CHANGELOG.md#v300