/date-range

Short coding exercise available in many different languages

Primary LanguageC++

Date Range

To complete this short coding exercise, pick your preferred language and get all 9 unit tests to pass. You will need to implement a function that takes in two date ranges and returns the overlap of those date ranges as a new date range. If there is no overlap, an exception should be thrown. Make no assumptions about the order of the date ranges that are passed into the function. Please look at the tests to validate that you are returning the expected result in each case.

Note Regarding Additional Languages

The following languages may one day get support:

  • Rust
  • Scala
  • Kotlin
  • Clojure
  • Swift
  • F#

No plans exist to develop tests for these at the moment.