Sorry to jump in so late, but if you want to remove the time portion of a moment()
rather than formatting it, then the code is:
.startOf('day')
More Related Contents:
- Get the time difference between two datetimes
- Get hours difference between two dates in Moment Js
- “Deprecation warning: moment construction falls back to js Date” when trying to convert RFC2822 date in moment.js
- How to JSON stringify a javascript Date and preserve timezone
- Moment.js: Date between dates
- Moment Js UTC to Local Time
- Format date and Subtract days using Moment.js
- from unix timestamp to datetime
- How to properly add 1 month to current date in moment.js
- Moment.js – How To Detect Daylight Savings Time And Add One Day
- Round a timestamp to the nearest date
- How to convert Moment.js date to users local timezone?
- moment.js isValid function not working properly
- How to add days to Date?
- How to add 30 minutes to a JavaScript Date object?
- How to subtract days from a plain Date?
- How to convert date to timestamp?
- Current time formatting with Javascript
- Moment js date time comparison
- How to convert an ISO date to the date format yyyy-mm-dd?
- Deprecation warning in Moment.js – Not in a recognized ISO format
- How to ignore user’s time zone and force Date() use specific time zone
- Set date in input type date
- Convert Date from one format to another format in JavaScript
- How Do I calculate the difference of 2 time zones in JavaScript?
- Why isn’t “2016-02-16” equal to “2016-02-16 00:00”?
- How to get difference between 2 Dates in Years, Months and days using moment.js
- How to parse a string into a date object at JavaScript?
- Javascript Date Plus 2 Weeks (14 days)
- Making a live clock in javascript