The differenceInWhole... functions should just return Int values. The underlying TimeDifference, because of the nature of the computation, will only have a single represented value, so the extra indirection is unnecessary.
This could be implemented by adding the new Int-returning methods but marking them as @_disfavoredOverload; that would mean existing code would continue to compile without issues and would not require modifications.
Eventually when Time reaches 2.0 status, the @_disfavoredOverload attribute could swap from the Int-returning method to the TimeDifference-returning method, because that's a source/API-breaking change, which is appropriate for a major version update.
The
differenceInWhole...functions should just returnIntvalues. The underlyingTimeDifference, because of the nature of the computation, will only have a single represented value, so the extra indirection is unnecessary.This could be implemented by adding the new
Int-returning methods but marking them as@_disfavoredOverload; that would mean existing code would continue to compile without issues and would not require modifications.Eventually when Time reaches 2.0 status, the
@_disfavoredOverloadattribute could swap from theInt-returning method to theTimeDifference-returning method, because that's a source/API-breaking change, which is appropriate for a major version update.