Horje
javascript add business days to date Code Example
javascript add business days to date
function add_bus_days(date, busDays) { // add business days to a date
                var wkdy = date.getDay(); // get weekday number
                var addDays = wkdy >= 3 ? (busDays + 2) : busDays; // if it's wednesday or later set add days to 5 instead of 3 to account for the weekend
                date.setDate(date.getDate() + addDays); // add days to current date
                return date
            }
// usage
var dt = new Date(); // get date
newDate = add_bus_days(dt, 3) // add 3 business days




Javascript

Related
combinereducers Code Example combinereducers Code Example
how to create a random 2d vector in js Code Example how to create a random 2d vector in js Code Example
replace non alphanumeric javascript Code Example replace non alphanumeric javascript Code Example
js remove from array by value Code Example js remove from array by value Code Example
Can't bind to 'ngForOf' since it isn't a known property of 'th' Code Example Can't bind to 'ngForOf' since it isn't a known property of 'th' Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9