Page MenuHomePhabricator

[e.cash] Add dates to blog
ClosedPublic

Authored by johnkuney on Jun 30 2023, 21:11.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABCbce9dc9a67e5: [e.cash] Add dates to blog
Summary

Add dates to /blog page tiles
The dates come in timestamp format from the api, so need to convert to a more readable version
with a dateconvert function
note the reason for the publish_date vs publishedAt check is because publishedAt is a field generated
by strapi when you publish a post. Afaik there wasnt a way force this value with the legacy timestamps
when I transfered the webflow data. The webflow timestamps were also in a diffent format from what strapi uses

Test Plan

npm run test to check new tests
preview the site and check the dates look good on the blog page

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman added a subscriber: bytesofman.
bytesofman added inline comments.
web/e.cash/data/blog.js
58 ↗(On Diff #41142)

formatTimestamp is a better name, tho open to other active names

dateConvert is kinda vague. what are we converting the date to?

image.png (726×700 px, 516 KB)

This revision now requires changes to proceed.Jun 30 2023, 22:39

lol fair enough, was a bad name

This revision is now accepted and ready to land.Jul 1 2023, 05:24
This revision was automatically updated to reflect the committed changes.