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