import { parse, startOfDay, endOfDay, formatRFC3339 } from 'date-fns';
const endDate = range.end
? parse(range.end, 'dd.MM.yyyy', new Date())
: null;
const startDate = range.start
? parse(range.start, 'dd.MM.yyyy', new Date())
: null;
if (!startDate || !endDate) return;
const start = formatRFC3339(startOfDay(startDate), { fractionDigits: 3 });
const finish = formatRFC3339(endOfDay(endDate), { fractionDigits: 3 });