Skip to content

Commit

Permalink
feat: standardize date format
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Jul 10, 2024
1 parent 14c2a1d commit 91c05d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/controllers/fundingrequests.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class FundingRequestsController {
return {
components: item.components,
submissionDate: item.submissionDate
? moment(item.submissionDate).format('D MMMM YYYY')
? moment(item.submissionDate).format('DD MMM YYYY')
: '--',
approach: item.approach,
trpWindow: item.trpWindow,
Expand All @@ -51,17 +51,17 @@ export class FundingRequestsController {
_children: item.items.map((subitem: any) => {
return {
boardApproval: subitem.boardApproval
? moment(subitem.boardApproval).format('MMMM YYYY')
? moment(subitem.boardApproval).format('DD MMM YYYY')
: '--',
gacMeeting: item.gacMeeting
? moment(item.gacMeeting).format('MMMM YYYY')
? moment(item.gacMeeting).format('DD MMM YYYY')
: '--',
grant: subitem.grant,
startingDate: subitem.startingDate
? moment(subitem.startDate).format('DD-MM-YYYY')
? moment(subitem.startDate).format('DD MMM YYYY')
: '--',
endingDate: subitem.endingDate
? moment(subitem.endDate).format('DD-MM-YYYY')
? moment(subitem.endDate).format('DD MMM YYYY')
: '--',
principalRecipient: subitem.principalRecipient,
};
Expand Down
6 changes: 3 additions & 3 deletions src/controllers/grants.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,22 +246,22 @@ export class GrantsController {
GrantOverviewMapping.implementationPeriod.boardApprovedDate,
'',
),
).format('DD/MM/YYYY - hh:mm A');
).format('DD MMM YYYY');
data.dates = [
moment(
_.get(
period,
GrantOverviewMapping.implementationPeriod.startDate,
'',
),
).format('DD/MM/YYYY hh:mm A'),
).format('DD MMM YYYY'),
moment(
_.get(
period,
GrantOverviewMapping.implementationPeriod.endDate,
'',
),
).format('DD/MM/YYYY hh:mm A'),
).format('DD MMM YYYY'),
];
}
return {data: [data]};
Expand Down

0 comments on commit 91c05d8

Please sign in to comment.