moment icon indicating copy to clipboard operation
moment copied to clipboard

Methods like toDateTimeString and toDateString required.

Open yogeshgalav opened this issue 8 months ago • 0 comments

Is your feature request related to a problem? Please describe. When dealing with database on backend we have to write same code again and again, which is vulnerable because all sql database accept date string and date time string in same format.

Describe the solution you'd like Like PHP Carbon library you can define "toDateString" and "toDateTimeString" methods, as this are the most common format used in backend.

Describe alternatives you've considered "toDateString" will be shorthand to "format("YYYY-MM-DD")" and "toDateTImeString" will be shorthand to "format("YYYY-MM-DD HH:mm:ss")"

Additional context As I'm migrating from Laravel(Carbon) to JS(moment), I just want similar functions and ease of use.

yogeshgalav avatar May 31 '24 03:05 yogeshgalav