Skip to content

Commit

Permalink
[Release] Stage to Main (#2515)
Browse files Browse the repository at this point in the history
  • Loading branch information
milo-pr-merge[bot] authored Jun 26, 2024
2 parents 03578fb + 75d922e commit 32f61f0
Show file tree
Hide file tree
Showing 9 changed files with 1,249 additions and 13 deletions.
16 changes: 4 additions & 12 deletions libs/blocks/chart/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,12 @@ export function formatExcelDate(date) {
let newDate;

if (!Number.isNaN(+date)) {
const hours = Math.floor((+date % 1) * 24);
const minutes = Math.floor((((+date % 1) * 24) - hours) * 60);
const offsetUTC = 24 - (new Date().getTimezoneOffset() / 60);

newDate = new Date(Date.UTC(0, 0, +date, hours - offsetUTC, minutes));
newDate = +date > 99999
? new Date(+date * 1000)
: new Date(Math.round((+date - (1 + 25567 + 1)) * 86400 * 1000));
} else {
newDate = new Date(date);
}

const localDateFormat = new Date(
newDate.getFullYear(),
newDate.getMonth(),
newDate.getDate(),
);

return localDateFormat.toLocaleString([], { dateStyle: 'short' });
return newDate.toLocaleString([], { dateStyle: 'short', timeZone: 'GMT' });
}
1 change: 1 addition & 0 deletions libs/features/georoutingv2/georoutingv2.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ function buildContent(currentPage, locale, geoData, locales) {
const downArrow = createTag('img', {
class: 'icon-milo down-arrow',
src: `${config.miloLibs || config.codeRoot}/ui/img/chevron.svg`,
role: 'presentation',
width: 15,
height: 15,
});
Expand Down
Loading

0 comments on commit 32f61f0

Please sign in to comment.