Skip to content

Commit

Permalink
Merge pull request #5 from NEAR-DevHub/format-dates
Browse files Browse the repository at this point in the history
Format dates
  • Loading branch information
rubycop authored Jan 14, 2025
2 parents f62bc73 + 9fbb3bf commit b3aa0ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,11 @@ app.get("/api/token-balance-history", async (req: Request, res: Response) => {
blockData.result.header.timestamp / 1e6
).toLocaleDateString(
"en-US",
parsedPeriod < 24 * 31
parsedPeriod < 24 * 30
? { month: "short", day: "2-digit" }
: { year: "numeric", month: "short" }
: parsedPeriod === 24 * 30
? { month: "short", year: "2-digit" }
: { year: "numeric" }
),
balance:
balance && token_id
Expand Down

0 comments on commit b3aa0ae

Please sign in to comment.