Note: This function has been deprecated in 2.7.0. Consider moment.max instead.

Limits the moment to a minimum of another moment value. So a.min(b) is the same as a = moment.max(a, b) (note that min is converted to max).

This is the counterpart for moment#max.


This can be used in conjunction with moment#max to clamp a moment to a range.

var start  = moment().startOf('week');
var end    = moment().endOf('week');
var actual = moment().min(start).max(end);