The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 2 more by this user. Created: 04/1/12
Last CDN Push: 05/16/12
Build Tag: gallery-2012.05.16-20-37
Project: YUI 3
License: YUI BSD
YUI Version: 3.5.1
Free for use.
when adding 1 month to the end of a month, I didn't want result to skip a month
<script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.05.16-20-37'
}).use('gallery-icello-date', function (Y) {
var d1 = new Date(2011, 0, 31),
d2 = Y.Icello.Date.addMonths(d1, 1);
//after adding 1 month to Jan 31, 2011, d2 is Feb 28, 2011, not Mar 3, 2011
Y.log('d1: ' + d1);
Y.log('d2: ' + d2);
});
All code on this site is licensed under the BSD License unless stated otherwise.