Skip to content

Commit

Permalink
fix(eb-app-ui): today
Browse files Browse the repository at this point in the history
  • Loading branch information
emrahcom committed Apr 5, 2024
1 parent 05cc379 commit 507a31b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion machines/eb-app-ui/home/ui/galaxy-dev/src/lib/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ export function epochToIntervalString(time: number) {
// The generated value will be used in the backend to set a date object.
// -----------------------------------------------------------------------------
export function today() {
return new Date().toISOString().split("T")[0];
const _date = new Date();

return (
_date.getFullYear() +
"-" +
("0" + (_date.getMonth() + 1)).slice(-2) +
"-" +
("0" + _date.getDate()).slice(-2)
);
}

// -----------------------------------------------------------------------------
Expand Down

0 comments on commit 507a31b

Please sign in to comment.