Playground
Change the schedule and the start, and see where the working hours land. Everything is computed by workclock in your browser.
Due 09:30 on Wednesday 30 December 2026 (Europe/London)
- Thu 24
- Fri 25
- Sat–Sun
- Mon 28
- Tue 29
- Wed 30
Working hours 09:00–17:00, break 12:00–13:00. Times in Europe/London.
Loading workclock…
The same call in code
A complete program for the inputs above. It changes as you change them.
use jiff::civil::{date, time};use jiff::{SignedDuration, Zoned};use workclock::{Break, Holidays, Schedule, Weekdays, WorkDay};fn main() -> Result<(), Box<dyn std::error::Error>> { let days = Weekdays::MON_TO_FRI; let schedule = Schedule::builder() .time_zone("Europe/London") .rule(WorkDay::new(time(9, 0, 0, 0), time(17, 0, 0, 0), days)) .rule(Break::new(time(12, 0, 0, 0), time(13, 0, 0, 0), days)) .rule(Holidays::new([date(2026, 12, 25), date(2026, 12, 28)])) .build()?; let opened: Zoned = "2026-12-24T16:30[Europe/London]".parse()?; let due = schedule.add(&opened, SignedDuration::from_hours(8))?; println!("{due}"); // due: Wed 30 Dec 2026, 09:30 in Europe/London Ok(())}