In my cases dates are supposed to be in the format – YYYY-MM-DD and I usually have such math for them:
- start date = today + 1 day
- end date = today + 4 days
So, the problem was solved pretty fast, but it wasn’t enough for me. I was curious if such a great tool as Postman has something inbound for the date manipulation. I went to the Postman site and started reading the documentation. Spending just a small amount of time on the site my curiosity was rewarded with a prize. The Postman allows using some of the inbound Node.js libraries in custom scripts. One of them is moment – an effective library for the date manipulation.
My problem was solved one more time in another way:
In my particular case above, both solutions look pretty similar and the usage of the special library doesn’t provide almost any benefits. But in some more complex cases, this might be extremely helpful.
So, the whole point here is: if you think you already know some tool just spend some time to read the documentation and you will be rewarded.