function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Previous working date based on the BusinessHours



I need to find out the previous working date based on the BusinessHours .




Order Due Date : Sunday, March 10, 2013


I need to get its previous working date which would be Friday, March 08,2013.


Also I want to make sure that if Friday was an holiday then it should return me Thursday, March 07,2013.


I have already looked at the business hours class  (


I was able to get the next buisiness day but not the previous buiseness day.


This is very urgent, I will appreciate if some one can provide me sample code for this.





MJ Kahn / OpFocusMJ Kahn / OpFocus
To get the previous business day, use the BusinessHours class to add a negative number to the date time.