fix: favourite button, optimise widgets and remove dependency

This commit is contained in:
David Ralph
2021-08-16 12:21:37 +01:00
parent 23251d248b
commit 4d3c7cbbe6
10 changed files with 56 additions and 45 deletions

View File

@@ -1,4 +1,4 @@
export default function nth(d) {
export function nth(d) {
if (d > 3 && d < 21) {
return d + 'th';
}
@@ -14,3 +14,7 @@ export default function nth(d) {
return d + 'th';
}
}
export function convertTimezone(date, tz) {
return new Date((typeof date === 'string' ? new Date(date) : date).toLocaleString('en-US', { timeZone: tz }));
}