On the website datepicker, with which users select a date. I need only date, Without time. Selected the date I store in the database. In the database plain text field. The date is stored in format "2019-01-25T12:04:00.000 Z".
Now, to display this date, I use "let d = new Date(savedDate)".
And then there are bugs. For example (very rarely) there are cases when datepicker selected, for example, the number 24, but using new Date (), and .getDate() is displayed 23. And the amazing thing is that in the database, too, is 23!
I assume that the case in our time zones. The problem is that you cannot get a naked date, without the time and everything else, only include month and year. The library returns the same format.
How to work with date?