Python 3.8 (pre-release), 90 bytes
lambda s,e,n:[d for i in range((e-s).days+1)if-len(set(d:=str(s+(e-s).__class__(i))))==~n]
An unnamed function which returns a list of strings (counting/including leading zeros) that accepts three arguments:
s
, the start - adatetime.date
object;e
, the end - adatetime.date
object; andn
, the number of days - anint
object.
Note: As the function accepts datetime.date
objects I have not counted the import code for that (and have worked around importing the datetime.timedelta
object as it is indirectly accessible via subtraction of these input objects).