Let's assume that a user has the following requirements.
Service window: Monday-Sunday, 08:00 - 22:00
Resolution time: End of next business day
If the ticket was created today, it must be resolved tomorrow by 22:00. Otherwise the SLA will be breached.
Add the following script as a post function to the Create transition in the issue's workflow. This post function is designed to set a date-time custom field named "Nextday" to next weekday at 10:00 PM.
//MutableIssue issue = ComponentAccessor.getIssueManager().getIssueObject("issueKey"); //For Script console only
Calendar newDate = Calendar.getInstance();
Since this post function is in the Create transition, "Stores updates to an issue (no change history is created)." post function after the above custom script post function should be added too.
After these steps, the SLA configuration is pretty straightforward.
SLA Start: Date Field: Jira Field: Created
SLA End: Status: Done // Customize this as you wish
SLA Goal: Negotiation Date: Nextday
JQL Condition: Project=abc // Customize this as you wish
You may want to limit this SLA to the projects or issue types where the Nextday custom field is set, otherwise, this SLA will show up as INVALID in the view issue page.