Using moment version 2.9 if I try to set a time to midnight using either of the following methods
var date = moment('2015-03-28T10:55:10.050');
date = moment({hour: 0, minute: 0, seconds: 0, milliseconds: 0});
or
date.hours(0).minutes(0).seconds(0).milliseconds(0);
or
date.set('hours',0).set('minutes',0).set('seconds',0).set('milliseconds',0);
I get
'Deprecation warning: moment().add(period, number) is deprecated. Please use moment().add(number, period).'
So what am I doing wrong?
UPDATE:
Just to give further info, which might help, the warning is coming up in the console when I run Karma Jasmine unit tests, they don't appear in the console log in the web app, these only appear when I'm unit testing.