You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let d = new Date()
d.setHours(0)
d.setMinutes(0)
d.setSeconds(0)
d.setMilliseconds(0)
(about 400 times faster)
When calling startOf(unit), where unit is one of 'hour', 'day', 'week', 'month', 'year', moment should use the first method rather than the second one.
Environment:
I'm running a ReactNative app on an iOS Simulator, running iOS 10.1.
Other information that may be helpful:
The time zone setting of the machine the code is running on : UTC + 01:00 (Paris, France)
The time and date at which the code was run : 2016-11-23T10:56:19+01:00
Other libraries in use (TypeScript, Immutable.js, etc) : ReactNative
console.log((newDate()).toString())// [Log] Wed Nov 23 2016 10:58:47 GMT+0100 (CET) (index.ios.bundle, line 788)console.log((newDate()).toLocaleString())// [Log] 11/23/2016, 10:58:47 AM (index.ios.bundle, line 788)console.log((newDate()).getTimezoneOffset())// [Log] -60 (index.ios.bundle, line 788)console.log(navigator.userAgent)// [Log] undefined (index.ios.bundle, line 788)console.log(moment.version)// [Log] 2.14.1 (index.ios.bundle, line 788)
The text was updated successfully, but these errors were encountered:
Description of the Issue and Steps to Reproduce:
is way more efficient than :
(about 400 times faster)
When calling
startOf(unit)
, whereunit
is one of'hour'
,'day'
,'week'
,'month'
,'year'
, moment should use the first method rather than the second one.Environment:
I'm running a ReactNative app on an iOS Simulator, running iOS 10.1.
Other information that may be helpful:
The text was updated successfully, but these errors were encountered: