@tak-ps/vue-tabler 3.8.2 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/components/Epoch.vue +2 -1
- package/components/EpochRange.vue +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/components/Epoch.vue
CHANGED
|
@@ -48,7 +48,8 @@ export default {
|
|
|
48
48
|
.replace(/:[0-9]+\.[0-9]+[A-Z]/, '');
|
|
49
49
|
} else if (this.format === 'Human') {
|
|
50
50
|
const day = String(date.getUTCDate());
|
|
51
|
-
|
|
51
|
+
let suffix = this.suffix[day.slice(day.length - 1)] || 'th';
|
|
52
|
+
if (['11', '12', '13'].includes(day)) suffix = 'th';
|
|
52
53
|
|
|
53
54
|
const res = `${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padEnd(2, '0')}, ${this.months[date.getUTCMonth()]} ${date.getUTCDate()}${suffix}`;
|
|
54
55
|
if (date.getFullYear() === new Date().getFullYear()) {
|
|
@@ -60,9 +60,11 @@ export default {
|
|
|
60
60
|
const end = new Date(this.end)
|
|
61
61
|
|
|
62
62
|
const start_day = String(start.getUTCDate());
|
|
63
|
-
|
|
63
|
+
let start_day_suffix = this.suffix[start_day.slice(start_day.length - 1)] || 'th';
|
|
64
|
+
if (['11', '12', '13'].includes(start_day)) start_day_suffix = 'th';
|
|
64
65
|
const end_day = String(end.getUTCDate());
|
|
65
|
-
|
|
66
|
+
let end_day_suffix = this.suffix[end_day.slice(end_day.length - 1)] || 'th';
|
|
67
|
+
if (['11', '12', '13'].includes(end_day)) end_day_suffix = 'th';
|
|
66
68
|
|
|
67
69
|
const start_month = `${this.months[start.getUTCMonth()]} ${start.getUTCDate()}${start_day_suffix}`;
|
|
68
70
|
const end_month = `${this.months[end.getUTCMonth()]} ${end.getUTCDate()}${end_day_suffix}`;
|