mirror of
https://github.com/Fluffy-Bean/website.git
synced 2025-05-14 08:02:16 +00:00
Merge pull request #10 from Fluffy-Bean/deepsource-transform-02fbb8b7
style: format code with Prettier
This commit is contained in:
commit
ec80ed92a4
1 changed files with 5 additions and 5 deletions
10
src/utils.ts
10
src/utils.ts
|
@ -32,14 +32,14 @@ export function getMonth(date: Date): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDaySuffix(date: Date): string {
|
export function getDaySuffix(date: Date): string {
|
||||||
let suffix = 'th';
|
let suffix = "th";
|
||||||
if (date.getDate() % 10 === 1 && date.getDate() !== 11) {
|
if (date.getDate() % 10 === 1 && date.getDate() !== 11) {
|
||||||
suffix = 'st';
|
suffix = "st";
|
||||||
} else if (date.getDate() % 10 === 2 && date.getDate() !== 12) {
|
} else if (date.getDate() % 10 === 2 && date.getDate() !== 12) {
|
||||||
suffix = 'nd';
|
suffix = "nd";
|
||||||
} else if (date.getDate() % 10 === 3 && date.getDate() !== 13) {
|
} else if (date.getDate() % 10 === 3 && date.getDate() !== 13) {
|
||||||
suffix = 'rd';
|
suffix = "rd";
|
||||||
}
|
}
|
||||||
|
|
||||||
return suffix;
|
return suffix;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue