I've just developed a new Node-RED node called Date Injector, and I have to say, developing for Node-RED has been a real blast! This node is a bit like simpletime, but I hope it's even more versatile
With Date Injector, you can:
Inject the current date and time into your flows
Customize the format using Day.js, thanks to them.
Add or subtract time with units like years, days, hours, etc.
Support for multiple languages (English, French, Spanish, and more)
I had a great time building it, and I hope you'll find it useful in your flows! I'd love to hear your thoughts and feedback.
[quote="marcus-j-davies, post:2, topic:91149"]
Thank you for the feedback!
Yes, I looked into what @TotallyInformation offered with the Moment node, but since Moment.js is no longer being updated, I decided to move away from it. I also explored JSONata, but it didn't quite achieve what I was looking for. I considered simpletime as well, but again, it didn't fully match my requirements. That’s why I went with Day.js and developp this node.
However, I plan to incorporate some of the great ideas from @TotallyInformation into my node, especially the ability to inject dates (priority one), the option to select timezones, and other... my node is in alpha version (just did it today !)
@fdecourt has reached out and I've offered to open up the repo to them for the creation of a new node, perhaps a dayjs node? I can help with some testing and re-publishing.
I think we can keep the legacy name, people generally recognise it anyway. I've suggested a new node in the same package so people get plenty of time to move over as they feel the need.
Should be easy enough to start by duplicating the existing node and re-engineering with the day.js library. Hopefully adding a few tweaks to bring the programming up to 2020's code instead of 2010's code.