Posts

Showing posts with the label setYears

javascript : Date.addYears(number)

  javascript : Date .addYears( Number ) Target: Applicable with  Date  Data Type. Description : Add/Subtract years from Date and return new Date object. Syntax: Date .addYears( number ) Usase: var dd = '1 Apr 2020'.toDateTime(); dd.addYears(1); It return "Thu Apr 01 2021 00:00:00 GMT+0530 (India Standard Time)" dd.addYears(-1); It return "Mon Apr 01 2019 00:00:00 GMT+0530 (India Standard Time)" Download MYJS.js MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type.  Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.

javascript : Date.addMonths(number)

  javascript : Date .addMonths( Number ) Target: Applicable with  Date  Data Type. Description : Add/Subtract months from Date and return new Date object. Syntax: Date .addMonths( number ) Usase: var dd = '1 Apr 2020'.toDateTime(); dd.addMonths(1); It return "Fri May 01 2020 00:00:00 GMT+0530 (India Standard Time)" dd.addMonths(-1); It return "Sun Mar 01 2020 00:00:00 GMT+0530 (India Standard Time)" Download MYJS.js MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type.  Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.

javascript : Date.addDays(number)

  javascript : Date .addDays( Number ) Target: Applicable with  Date  Data Type. Description : Add/Subtract days from Date and return new Date object. Syntax: Date .addDays( number ) Usase: var dd = '1 Apr 2020'.toDateTime(); dd.addDays(5); It return "Mon Apr 06 2020 00:00:00 GMT+0530 (India Standard Time)" dd.addDays(-5); It return "Fri Mar 27 2020 00:00:00 GMT+0530 (India Standard Time)" Download MYJS.js MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type.  Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.