@bytebrand/fe-ui-core 4.2.150 → 4.2.152

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.2.150",
3
+ "version": "4.2.152",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -38,7 +38,8 @@ export const COOKIE_SCHEMA = {
38
38
  'cf_chl_2',
39
39
  'cf_chl_rc_ni',
40
40
  'cf_chl_prog'
41
- ]
41
+ ],
42
+ Matomo: ['MATOMO_SESSID','_pk_ses.1.4d04', '_pk_id.1.4d04']
42
43
  },
43
44
  analytics: {
44
45
  ['auto.de']: [
@@ -83,8 +84,7 @@ export const COOKIE_SCHEMA = {
83
84
  '_uetvid',
84
85
  ...GOOGLE_BUNDLE_COOKIES
85
86
  ],
86
- Hotjar: ['hotjar'],
87
- Matomo: ['MATOMO_SESSID','_pk_ses.1.4d04', '_pk_id.1.4d04']
87
+ Hotjar: ['hotjar']
88
88
 
89
89
  },
90
90
  marketing: {
@@ -601,13 +601,18 @@ export const getUnixTimestampAfterTwoWeeks = () => {
601
601
  /**
602
602
  * Converts a Unix timestamp to the day of the month.
603
603
  * @param {number} unixTimestamp - The Unix timestamp to convert.
604
- * @returns {number} The day of the month.
604
+ * @returns {number} Return the number of days as the result
605
605
  */
606
606
  export const convertUnixTimestampToDays = (unixTimestamp: number) => {
607
607
  const milliseconds = unixTimestamp * 1000;
608
608
  const date = new Date(milliseconds);
609
- const day = date.getDate();
610
- return day;
609
+ const currentDate = new Date();
610
+
611
+ // Calculate the difference between the current date and the obtained date
612
+ const timeDifference = currentDate.getTime() - date.getTime();
613
+ const daysDifference = -Math.floor(timeDifference / (1000 * 3600 * 24));
614
+
615
+ return daysDifference;
611
616
  };
612
617
 
613
618
  export const priceParse = (value: any) => {