John Iannicello![]()
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);
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info