tripstorekrabi-shared 1.10.4 → 1.10.6
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/booking.js +5 -3
- package/package.json +1 -1
package/booking.js
CHANGED
|
@@ -134,13 +134,15 @@ export function getStartingPointMessage(booking) {
|
|
|
134
134
|
text += ' at ' + booking.pickupTime;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
let
|
|
137
|
+
let now = dayjs.tz("Asia/Bangkok");
|
|
138
|
+
let dayjs = dayjs.tz(booking.departureDate.toDate(), "Asia/Bangkok");
|
|
139
|
+
let date = dayjs.format('Do MMM');
|
|
138
140
|
|
|
139
141
|
if (
|
|
140
|
-
|
|
142
|
+
now.add(1, 'day').isSame(dayjs, 'day')
|
|
141
143
|
) {
|
|
142
144
|
text += ' tomorrow the ' + date;
|
|
143
|
-
} else if (
|
|
145
|
+
} else if (now.isSame(dayjs, 'day')) {
|
|
144
146
|
text += ' today the ' + date;
|
|
145
147
|
} else {
|
|
146
148
|
text += ' on the ' + date;
|