@hestia-earth/ui-components 0.42.0 → 0.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -47,8 +47,8 @@ import * as semver from 'semver';
|
|
|
47
47
|
import { parse } from 'papaparse';
|
|
48
48
|
import omit from 'lodash.omit';
|
|
49
49
|
import { validationsByMessage } from '@hestia-earth/data-validation';
|
|
50
|
-
import
|
|
51
|
-
import '
|
|
50
|
+
import { format, subDays, parseISO } from 'date-fns';
|
|
51
|
+
import { enGB } from 'date-fns/locale';
|
|
52
52
|
import { v4 } from 'uuid';
|
|
53
53
|
import { MarkdownComponent } from 'ngx-markdown';
|
|
54
54
|
import { linkHorizontal } from 'd3-shape';
|
|
@@ -12510,7 +12510,7 @@ const calculateCycleStartDateEnabled = (properties, property) => {
|
|
|
12510
12510
|
const calculateCycleStartDate = (properties, property) => {
|
|
12511
12511
|
const cycleDuration = siblingProperty(properties, property, 'cycleDuration');
|
|
12512
12512
|
const endDate = siblingProperty(properties, property, 'endDate');
|
|
12513
|
-
return
|
|
12513
|
+
return format(subDays(parseISO(endDate.value), cycleDuration.value), 'yyyy-MM-dd', { locale: enGB });
|
|
12514
12514
|
};
|
|
12515
12515
|
|
|
12516
12516
|
const siteLocation = ({ latitude, longitude }) => latitude && longitude
|