Skip to content

Commit

Permalink
refactor(typescript): apply pull request feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
pac-guerreiro committed Mar 20, 2024
1 parent f051c2e commit 3e40a53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/DateUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function formatToLongDateWithWeekday(datetime: string | Date): string {
*
* @returns Sunday
*/
function formatToDayOfWeek(datetime: string | Date): string {
function formatToDayOfWeek(datetime: Date): string {
return format(new Date(datetime), CONST.DATE.WEEKDAY_TIME_FORMAT);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/DateUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('DateUtils', () => {
});

it('formatToDayOfWeek should return a weekday', () => {
const weekDay = DateUtils.formatToDayOfWeek(datetime);
const weekDay = DateUtils.formatToDayOfWeek(new Date(datetime));
expect(weekDay).toBe('Monday');
});
it('formatToLocalTime should return a date in a local format', () => {
Expand Down

0 comments on commit 3e40a53

Please sign in to comment.