Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
19 lines (16 sloc) 426 Bytes
title
Add/Subtract
moment().add(period, number) is deprecated. Please use moment().add(number, period)
moment().subtract(period, number) is deprecated. Please use moment().subtract(number, period)

Moment deprecated ordering the parameters of add and subtract as (period, number). Invert your parameters.

Bad:

moment().add('hours', 3);

Good:

moment().add(3, 'hours');