Analysis of Double Minutes

The symbol for double minutes is "dmin". Before the symbol, the count is presented as a single absolute number, a mean (with an approximate sign before the number) or a range of two numbers connected with an approximate sign.

Hence, the description string passed to the constructor of the DoubleMinute class is compared to the pattern "^\??(?<approx>[\~\-])?(?<min>\d+)?([\~\-](?<max>\d+))?dmin$" after removal of unnecessary spaces.

If a single absolute number is given, it will be caught in the "min" group. A range is caught by the the "min" and "max" groups. In case of a mean value, the approximate sign is caught in the "approx" group, while the number is caught in the "min" group.

According to the ISCN manual, a number must be given. Here, a number of one (1) double minute is assumed if no number is given.

Since the pattern above would also match some bogus descriptions, the resulting values are checked for consistency (no approximate sign in case of a range; minimum number must not be bigger than maximum number).