I want to add certain number of hours to date, ignoring the weekends
For example,
(Friday 18:00) + 48 = (Tuseday 18:00) (Saturday and Sunday are ignored)
since the company works 24 hours, business hours are 24. But still i could not get how to add hours only on business days
function can be something like:
public Date getTaskEndTime(Calendar startDate, int hours){
// calculate the end time by adding the hours ignoring the weekends
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…