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

Decide on date/time formatting string syntax #1108

Closed
Tracked by #260 ...
seancolsen opened this issue Mar 1, 2022 · 1 comment · Fixed by #1350
Closed
Tracked by #260 ...

Decide on date/time formatting string syntax #1108

seancolsen opened this issue Mar 1, 2022 · 1 comment · Fixed by #1350
Assignees
Labels
type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory

Comments

@seancolsen
Copy link
Contributor

seancolsen commented Mar 1, 2022

Context

When displaying dates and times, the front end will recieve the following two pieces of info:

  • a string representation of the value in canonical form.
  • a "formatting string", containing information about how to display the value to the user.

The front end needs to take these two strings and combine them into a formatted value.

The front end has total control over setting the formatting string and reading it. The back end only validates that it's 255 characters or less (discussion).

To-do

We need to decide how our formatting strings will work.

Prior art

Considerations

  • We'll likely want to use a 3rd-party library to perform the formatting. As such, the work of evaluating and choosing that library may, in fact, be the only thing we need to do to close this ticket.
  • Once users have set their formatting strings, it will not be easy for us to make backwards-incompatible changes to the formatting algorithm. This means that it's important that we choose a library which is stable and likey to have long-term support.
@seancolsen seancolsen added ready Ready for implementation type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory labels Mar 1, 2022
@seancolsen seancolsen added this to the [07] Initial Data Types milestone Mar 1, 2022
@seancolsen seancolsen self-assigned this Mar 21, 2022
@seancolsen seancolsen added status: started and removed ready Ready for implementation labels Mar 21, 2022
@seancolsen seancolsen assigned pavish and unassigned seancolsen Apr 14, 2022
@seancolsen
Copy link
Contributor Author

seancolsen commented Apr 14, 2022

@pavish I've assigned this to you since you're taking the date/time portion of the data types milestone. I'm fine with picking either Luxon or date-fns. Probably whatever we pick, we'll end up regretting it later for some reason! 😜 So maybe flip a coin? That's where my thinking is currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants