-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix date formatting #56124
Fix date formatting #56124
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
@dominictb @sakluger One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
A preview of your ExpensifyHelp changes have been deployed to https://db3d1863.helpdot.pages.dev ⚡️ |
afc760e
to
40d29a0
Compare
@dominictb can you please go through the reviewer checklist when you get a chance? |
Removing my reviewer assignment because this is not Help Site related. |
…nto stites-fixDateFormatting
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chrome |
@stitesExpensify Can I be added to Travel beta to test this one? |
FYI Eslint is failing @stitesExpensify |
Whoops sorry about that. updated! |
@aldo-expensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
src/libs/DateUtils.ts
Outdated
} | ||
return `${translateLocal('travel.departs')} ${format(date, 'EEEE, MMM d, yyyy')} ${translateLocal('common.conjunctionAt')} ${format(date, 'HH:MM')}`; | ||
return `${translateLocal('travel.departs')} ${format(date, 'EEEE, MMM d, yyyy')} ${translateLocal('common.conjunctionAt')} ${format(date, 'HH:mm a')}`; |
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.
@aldo-expensify @stitesExpensify Hmm as we are adding AM/PM
postfix here (a
flag), I wonder if it's redundant to use 24-hour format (HH
flag). So it could be something like 16:40 PM
which is not standard to me.
Should it be 12-hour format only (hh
)? That would align more to the current convention in App codebase (i.e. if we had a
flag, we always used 12-hour format):
Line 485 in 40d29a0
return format(date, isFullFormat ? 'hh:mm:ss.SSS a' : 'hh:mm a'); |
Line 497 in 40d29a0
return format(date, 'yyyy-MM-dd hh:mm a'); |
Line 589 in 40d29a0
const tempTime = parse(updatedTime, 'hh:mm a', new Date()); |
Line 641 in 40d29a0
const parsedTime = parse(dateTime, isFullFormat ? 'hh:mm:ss.SSS a' : 'hh:mm a', new Date()); |
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.
Agreee
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.
Yes I agree. I will fix that!
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.
Updated!
@nkuoch We can merge now. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.0.95-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.95-6 🚀
|
Explanation of Change
We were trying to do
hours:month
instead ofhours:minutes
😂Fixed Issues
$#56069
PROPOSAL:n/a
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop