PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.17
Yatra – Travel Booking & Tour Operator Software v3.0.17
3.0.17 3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 All 85 releases
← All changes | resources/js/pages/Discounts.tsx +3 -1 3.0.6 → 3.0.17 View file →
@@ -25,8 +25,9 @@
25 25 BulkActionToolbar,
26 26 Table as SharedTable,
27 27 } from "../components/shared";
28 28 import { __ } from "../lib/i18n";
29 +import { toDateValue } from "../lib/dateFormat";
29 30 import { usePermissions } from "../hooks/usePermissions";
30 31 import { useToast } from "../components/ui/toast";
31 32 import { apiClient } from "../lib/api-client";
32 33 import { getErrorContext } from "../lib/errors";
@@ -285,9 +286,10 @@
285 286
286 287 const formatDate = (dateString: string) => {
287 288 if (!dateString) return __("N/A", "yatra");
288 289 try {
289 - const date = new Date(dateString);
290 + // toDateValue: a date-only expiry_date must not roll back a day in behind-UTC zones.
291 + const date = toDateValue(dateString);
290 292 return date.toLocaleDateString("en-US", {
291 293 month: "short",
292 294 day: "numeric",
293 295 year: "numeric",