Skip to content
New issue

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

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

Already on GitHub? # to your account

Formatting launch time when the exact time is not yet known #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

squatica
Copy link

No description provided.

@warwickbuilds warwickbuilds self-assigned this Aug 10, 2020
Copy link
Owner

@warwickbuilds warwickbuilds left a comment

Choose a reason for hiding this comment

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

Really appreciate you showing how this could be done with dates, I've updated the page to use V4 of the API and implemented a few checks for non-locked in date/time similar to what you have shown.

Looking to see how I would like to implement your date formatting into the new version.

Thanks again!

@squatica
Copy link
Author

squatica commented Sep 5, 2020

Hi, I added the formatDate function also for the newest version. Currently it shows the launchpad local time in the upcoming list, although I'm not sure if that's really helpful for users. Maybe it would be better to clarify it somewhere, or always show the user's local time or always show UTC just to avoid confusion.

The imprecise dates are always constructed based on the UTC time, because for example if the launch should happen in December, the API will return midnight of December 1st as the UTC time, but the launchpad local time will be -5, so that will fall into November, therefore we cannot use that for the imprecise date formatting. The only case where a distinction between user's local time and launchpad local time is useful is if precision is "hour".

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

Successfully merging this pull request may close these issues.

2 participants