Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Better timezone support for manipulating moments #1419
This adds a second argument to setters that provides a hint to updateOffset to not change hours/minutes when crossing a tz boundary. This is frequently desirable when modifying part of an existing moment object directly.
It further passes this argument whenever adding / subtracting days or months, fixing an issue with moment-timezone (moment/moment-timezone#28). See the corresponding PR for moment-timezone here: moment/moment-timezone#53.