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

update date format to YYYY-MM-DD-HH-mm and support review before due #614

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

newle
Copy link

@newle newle commented Jan 29, 2023

No description provided.

@newle newle requested a review from st3v3nmw as a code owner January 29, 2023 05:54
@@ -490,7 +490,9 @@ export class FlashcardModal extends Modal {
return;
}

const dueString: string = due.format("YYYY-MM-DD");
const dueString: string = due.format("YYYY-MM-DD-HH-mm");
Copy link
Owner

Choose a reason for hiding this comment

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

Isn't the YYYY-MM-DD HH:mm format better and more readable?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would probably suggest using one of the ISO 8601 formats, e.g. YYYY-MM-DDTHH:mm (i.e. the literal T between the date and time)

Copy link
Owner

@st3v3nmw st3v3nmw left a comment

Choose a reason for hiding this comment

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

Hi, thanks for the contribution 😄!

Sorry the underlying code has gone through a major refactor recently. I'm not sure if you're still available to help resolve the merge conflicts.

Stephen,

@@ -527,7 +527,7 @@ export default class SRPlugin extends Plugin {
ease = schedObj.ease;

const due = window.moment(now + interval * 24 * 3600 * 1000);
const dueString: string = due.format("YYYY-MM-DD");
const dueString: string = due.format("YYYY-MM-DD-HH-mm");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest that the time component is only included if necessary. This would keep the HTML commands in the current format, and only the longer format when needed.

@ronzulu
Copy link
Collaborator

ronzulu commented Feb 5, 2024

Hi @newle, nice idea in your PR.

There seems to be similarity in purpose between your PR and #569. Both aim to provide a mechanism so that newly learned cards can be reviewed the same day (or multiple times that day).

@st3v3nmw and I are hoping to work through the outstanding PR requests, but we might only want to incorporate either your PR or #569. Can you think of a case where your method gives a better user experience over #569?

Also I'm curious what value for reviewBeforeDue do you use, or do you find that you change it at times?

Thanks
Ronny

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.

None yet

3 participants