-
Notifications
You must be signed in to change notification settings - Fork 1
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
ADAPT-2752: Change date string format #204
Conversation
@yvonnetangsu Looks like YYYY-DD-MM is not a valid format in safari and your solutions works great! Just wanted to make sure that it's intended for the date to be treated as utc time? Should there be some sort of clarification for the content creators? |
@Lyafel Glad that fix works! And good point about the UTC time 😄 The published date isn't a very important item on this site (the stories aren't particularly time sensitive), and our clients haven't brought that up as the issue. Let's scope this ticket to just fixing the invalid date bug, and if the clients raise the issue about timezone later on, we can deal with that then. Thanks for asking! |
const startJsDateString = props.blok.publishedDate.replace(" ", "T"); | ||
const startUTCDate = new Date(`${startJsDateString}:00Z`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rename the variables to something a bit more relevant. Apologize I copied over the code from the other site where the time string is a start time. Let's replace "start" with "published" here. Thanks! After that should be good to go 😄
@Lyafel I'm going to go ahead and merge this in since it is working. Would be great if you could do the variable name tweak the campaign card PR 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GTG
* main: ADAPT-2091: Quote card slideshow (#200) ADAPT-2752: Change date string format (#204) # Conflicts: # src/scss/utilities/variables/_color-maps.scss
* main: ADAPT-2091: Quote card slideshow (#200) ADAPT-2752: Change date string format (#204) ADAPT-2558: Hero Component (#199) ADAPT-2727: Search button redesign (#203) # Conflicts: # src/components/cards/oodCampaignCard.js # src/components/components.js # src/components/page-types/oodCampaignPage.js # src/scss/page-types/_campaign-page--fullwidth-image.scss # src/scss/page-types/_campaign-page--left-image.scss # src/scss/page-types/_campaign-page.scss # src/scss/utilities/variables/_color-maps.scss
NOT READY FOR REVIEW
Summary
Review By (Date)
Criticality
Review Tasks
Setup tasks and/or behavior to test
Front End Validation
Backend / Functional Validation
Code
Code security
General
Affected Projects or Products
Associated Issues and/or People
@mention
them here)Resources