If you omit the time in the new Date(string)
constructor, UTC time is assumed. So the displayed value is actually correct. Use new Date('2016-09-05 00:00')
to create the date object in local time.
More Related Contents:
- Single event handler for four button clicks
- Does return stop a loop?
- How to get the raw value an field?
- setTimeout and “this” in JavaScript
- Losing scope when using ng-include
- how to access iFrame parent page using jquery?
- Angular: Can’t find Promise, Map, Set and Iterator
- Are dashes allowed in javascript property names?
- jQuery – script tags in the HTML are parsed out by jQuery and not executed
- Selecting last element in JavaScript array [duplicate]
- Async/Await inside Array#map()
- Use javascript to check http status codes
- fetch – Missing boundary in multipart/form-data POST
- Need to find height of hidden div on page (set to display:none)
- Load existing components dynamically Angular 2 Final Release
- How to get highcharts dates in the x axis?
- How can I toggle the element that is clicked and hide all others?
- Correct way to document open-ended argument functions in JSDoc
- jQuery validate plugin on DIV
- How to check if object has any properties in JavaScript?
- Get value of a string after last slash in JavaScript
- how to get selection inside a div using jquery/javascript
- What are some good ways to prevent people from copying my source code? [closed]
- Detect failure to load contents of an iframe
- Google Maps – Weird geometry.location attributes (G, K)
- Automatically resize jQuery UI dialog to the width of the content loaded by ajax
- How to parse html to React component?
- Why is event.clientX incorrectly showing as 0 in firefox for dragend event?
- Get today date in Google Apps Script
- How to get simple dispatch from this.props using connect w/ Redux?