MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / formatDate

Function formatDate

client/src/component/Community.jsx:74–83  ·  view source on GitHub ↗
(dateString)

Source from the content-addressed store, hash-verified

72
73 // Function to format date
74 const formatDate = (dateString) => {
75 const date = new Date(dateString);
76 const year = date.getFullYear().toString().slice(-2);
77 const month = ("0" + (date.getMonth() + 1)).slice(-2);
78 const day = ("0" + date.getDate()).slice(-2);
79 const hours = ("0" + date.getHours()).slice(-2);
80 const minutes = ("0" + date.getMinutes()).slice(-2);
81
82 return `${day}/${month}/${year} | ${hours}:${minutes}`;
83 };
84
85 return (
86 <>

Callers 1

CommunityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected