manage user credancial
This commit is contained in:
@@ -58,4 +58,23 @@ export const fetchUserProfile = async () => {
|
||||
console.error("❌ Error fetching profile:", error);
|
||||
Alert.alert("Error", "Could not connect to server");
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// src/utils/dateFormatter.ts
|
||||
|
||||
export const formatDate = (dateString: string): string => {
|
||||
const date = new Date(dateString);
|
||||
|
||||
if (isNaN(date.getTime())) return "Invalid Date";
|
||||
|
||||
const options: Intl.DateTimeFormatOptions = {
|
||||
day: "2-digit",
|
||||
month: "short",
|
||||
year: "numeric",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: true,
|
||||
};
|
||||
|
||||
return new Intl.DateTimeFormat("en-GB", options).format(date);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user