-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Description
moment().min and moment().max were a good idea for helper functions, but combined with the mutability that most moment() methods have it turned out disasterously confusing.
So we're deprecating those two in favor of moment.min and moment.max, which are non-mutating and work on any number of objects:
// if a, b, c, d are moments ordered in time
moment.min(a, b); // a
moment.min(a, b, c, d); // a
moment.min([a, b, c, d]); // a
moment.max(a, b); // b
moment.max(a, b, c, d); // d
moment.max([a, b, c, d]); // dReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels