Skip to content

Commit 6e0f627

Browse files
author
Shenbaga Delip P
committed
add global format date
1 parent ea46cf0 commit 6e0f627

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.changeset/brave-plums-fetch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@roadiehq/backstage-plugin-jira': minor
3+
---
4+
5+
use global date format
236 KB
Loading

plugins/frontend/backstage-plugin-jira/src/api/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,10 @@ export class JiraAPI {
378378
);
379379

380380
if (assignmentHistory.length > 0) {
381-
assignedDate = new Date(
382-
assignmentHistory[0].created,
383-
).toLocaleDateString();
381+
const date = new Date(assignmentHistory[0].created);
382+
assignedDate = `${date.getFullYear()}-${String(
383+
date.getMonth() + 1,
384+
).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
384385
}
385386
}
386387

0 commit comments

Comments
 (0)