mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
format date as long date string by locale. eg. Friday 21 December 2025
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { Text, View } from "@react-pdf/renderer";
|
||||
|
||||
import { longDateLocaleString } from "@/utils/formatDate";
|
||||
|
||||
import { styles } from "./styles";
|
||||
|
||||
interface IProps {
|
||||
@@ -20,7 +22,7 @@ const InfoTable = ({ date, lieu, ronde }: IProps) => (
|
||||
{/* Data Row */}
|
||||
<View style={styles.infoRow}>
|
||||
<Text style={styles.infoCell}>
|
||||
{date ? new Date(date).toLocaleDateString("fr-FR") : " "}
|
||||
{date ? longDateLocaleString({ date, locale: "fr-FR" }) : ""}
|
||||
</Text>
|
||||
<Text style={styles.infoCell}>{lieu || " "}</Text>
|
||||
<Text style={[styles.infoCell, styles.lastCell]}>{ronde || " "}</Text>
|
||||
|
||||
Reference in New Issue
Block a user