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

Feature: add custom date format #93

Merged
merged 16 commits into from
Sep 13, 2023
Merged

Conversation

skngetich
Copy link
Contributor

This feature enable a user to add a custom date format.
i.e yyy-MM-dd HH:mm:ss result to 2023-02-28 14:25:57.
dd/MM/YYY HH:mm:ss (O) results to 28/02/2023 14:25:57 (GMT +3),

This is based on the date-fns format

Copy link
Collaborator

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

Thank you for this PR, I tested it locally and it works well.

The format string configuration may be cumbersome and error-prone without a reference and input validation handling. I made two suggestions inline, let me know what you think or have any questions.

There are also some typos in the settings, and I would suggest reverting the yarn.lock changes.

schema/settings.json Outdated Show resolved Hide resolved
schema/settings.json Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
src/ExecuteTimeWidget.ts Outdated Show resolved Hide resolved
skngetich and others added 4 commits September 6, 2023 23:34
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
src/ExecuteTimeWidget.ts Outdated Show resolved Hide resolved
src/formatters.ts Outdated Show resolved Hide resolved
src/formatters.ts Outdated Show resolved Hide resolved
src/formatters.ts Show resolved Hide resolved
schema/settings.json Outdated Show resolved Hide resolved
schema/settings.json Outdated Show resolved Hide resolved
skngetich and others added 2 commits September 9, 2023 00:49
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
@krassowski
Copy link
Collaborator

Needs actually importing showErrorMessage and a lint pass.

@skngetich
Copy link
Contributor Author

I have imported the showErrorMessage from the @jupyterlab/apputils

I also include where the error is from in the title of the dialog box. This will help the user identify where the error is from when they refresh the browser.

Copy link
Collaborator

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

Thank you @skngetich! Tested locally, works well.

@krassowski krassowski merged commit 8da85c7 into deshaw:master Sep 13, 2023
2 checks passed
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.

2 participants