fix: many bug fixes and some performance improvements

Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
David Ralph
2021-04-11 15:53:11 +01:00
parent 465596d22d
commit fbc656f978
16 changed files with 91 additions and 65 deletions

View File

@@ -0,0 +1,18 @@
export default class Date {
static 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';
}
}
}