[Spec] Date from-to format
We should provide a from-to date format. The current date converters provides formats that are too long to be used in a app when you want to display a from and to date together. The following formats are inspired by our desktop client:
Example:
Dates are in the same month
From: 02.02.2020
To: 25.02.2020
English
Short: 2nd - 25th Feb 2020
Long: 2nd - 25th February 2020
Norwegian
Short: 2. - 25. feb 2020
Long: 2. - 25. februar 2020
Example:
Date are in different months
From: 02.02.2020
To: 25.03.2020
English
Short: 2nd Feb - 25th Mar 2020
Long: 2nd February- 25th Mars 2020
Norwegian
Short: 2. feb - 25. mar 2020
Long: 2. februar - 25. mars 2020
Example:
Date are in different years
From: 24.12.2019
To: 25.03.2020
English
Short: 24th Dec 2019 - 25th Mar 2020
Long: 24th December 2019 - 25th March 2020
Norwegian
Short: 24. des 2019 - 25. mar 2020
Long: 24. desember 2019 - 25. mars 2020
Example:
Dates are in the same month, but different year
Should give the same format as: Date are in different months
API Changes
Consider creating a DateRangeConverter with different Formats. With the lack of a IMultiValueConverter, we should also consider creating a new type for the date-range. DateRange might be a good name for it.
DateRange should have FromDate and ToDate properties to be used inside of the converter.