Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: changed date formatting and pr fixes #176

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

atepem
Copy link
Collaborator

@atepem atepem commented Nov 29, 2024

Proposed changes

  • Added video page fixes based on this PR
  • Changed date formatting for video and blogs as req by Mohan

Screenshots/Recordings

Before:
image
image

After:
image
image

Copy link

vercel bot commented Nov 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
olas-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 29, 2024 5:08pm

truemiller
truemiller previously approved these changes Nov 29, 2024
common-util/formatDate.js Outdated Show resolved Hide resolved
components/Content/Article.jsx Outdated Show resolved Hide resolved
@@ -22,20 +23,21 @@ const Article = ({ article, href, showReadTime, showDate }) => {

const { title, datePublished, readTime } = article.attributes;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { title, datePublished, readTime } = article.attributes;
const { title, datePublished: unFormattedDatePublished, readTime } = article.attributes;

components/HomepageSection/Media.jsx Outdated Show resolved Hide resolved
month: 'long',
year: '2-digit',
};
const formattedDate = newDate.toLocaleDateString('en-GB', options);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const formattedDate = newDate.toLocaleDateString('en-GB', options);
const formattedDate = newDate.toLocaleDateString('en-US', options);

as we use American english, afaik the order of the day and month is different

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm I think GB works better as it displays it as 11-Nov-24 instead of Nov-28,-24

Copy link
Collaborator

@truemiller truemiller Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the replace call below makes this weird

would remove the - replacement, and set as en-US, not 100% on product preference, but US > GB in market share

- dates tend~ to be for numeric dates

minor either way, clock still ticks haha

Copy link
Collaborator

@mohandast52 mohandast52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work, thanks @atepem 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants