Diff APIs
These APIs return the difference in milliseconds between start and end DateTime values based on the specified shift plan, shift, and shift segment values. Holidays are excluded from working hours during calculation. Return type is Duration.
Use Shift Configured for Logged-in User
diff(DateTime startDate, DateTime endDate)
If no shift is configured in User Parameters, system-level settings are used. If no system-level settings are found, an error is thrown.
Use Shift Configured for Passed-in User
diffByUser(UUID userId, DateTime startDate, DateTime endDate)
Use Passed-in Shift
diffByShift(UUID shiftId, DateTime startDate, DateTime endDate)
For more information: