We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bf1d2d commit 094371cCopy full SHA for 094371c
src/lib/torch/index.ts
@@ -193,13 +193,16 @@ export const formatAddress = (address: Address) => {
193
}
194
195
export const formatDate = (timestamp: number) => {
196
- return new Date(timestamp * 1000).toLocaleDateString("en-US", {
197
- year: "numeric",
198
- month: "short",
199
- day: "numeric",
200
- hour: "2-digit",
+ const date = new Date(timestamp * 1000)
+ const month = date.toLocaleDateString("en-US", { month: "long" })
+ const day = date.getDate().toString().padStart(2, "0")
+ const time = date.toLocaleTimeString("en-US", {
+ hour: "numeric",
201
minute: "2-digit",
202
+ hour12: true,
203
})
204
+
205
+ return `${month} ${day}, ${time}`
206
207
208
export const getEtherscanUrl = (txHash: string) => {
0 commit comments