New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage suggestions for min and max #2946

Closed
wants to merge 1 commit into
base: develop
from

Conversation

Projects
None yet
3 participants
@crteal
Contributor

crteal commented Feb 3, 2016

The deprecation warnings for instance min and max give incorrect substitutions. Per the current documentation moment().min and moment.max() should be replaced by moment.max and moment.min respectively. We learned this the hard way.

screen shot 2016-02-03 at 1 32 52 pm

https://jsfiddle.net/s5ex3qh7/
(open the console to see the deprecation warning)

@mj1856

This comment has been minimized.

Member

mj1856 commented Feb 4, 2016

Thanks, and sorry for you having to learn the hard way!

Related: moment/momentjs.com#261

@mj1856 mj1856 added the Bug label Feb 4, 2016

@mj1856 mj1856 added this to the 2.12.0 milestone Feb 4, 2016

@mj1856

This comment has been minimized.

Member

mj1856 commented Feb 4, 2016

Staged for next release. Thanks.

@crteal

This comment has been minimized.

Contributor

crteal commented Feb 4, 2016

Thank you for merging this @mj1856, and no need to apologize!

@ichernev

This comment has been minimized.

Contributor

ichernev commented Mar 2, 2016

Sorry about that. The docs are correct, but the deprecation warning was overlooked.

@crteal

This comment has been minimized.

Contributor

crteal commented Mar 2, 2016

No need to apologize @ichernev!

@ichernev

This comment has been minimized.

Contributor

ichernev commented Mar 6, 2016

Merged in 59ba744

@ichernev ichernev closed this Mar 6, 2016

ichernev added a commit that referenced this pull request Mar 6, 2016

@crteal

This comment has been minimized.

Contributor

crteal commented Mar 7, 2016

Thank you @mj1856 and @ichernev!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment