refactor: imports etc

This commit is contained in:
David Ralph
2021-08-14 20:10:48 +01:00
parent 1a8bb69288
commit 39751736ca
55 changed files with 403 additions and 423 deletions

View File

@@ -1,18 +1,16 @@
export default class Date {
static nth(d) {
if (d > 3 && d < 21) {
return d + 'th';
}
export default function nth(d) {
if (d > 3 && d < 21) {
return d + 'th';
}
switch (d % 10) {
case 1:
return d + 'st';
case 2:
return d + 'nd';
case 3:
return d + 'rd';
default:
return d + 'th';
}
switch (d % 10) {
case 1:
return d + 'st';
case 2:
return d + 'nd';
case 3:
return d + 'rd';
default:
return d + 'th';
}
}