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

refactor: extract time-picker formatTime and parseTime helpers #8073

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

web-padawan
Copy link
Member

Description

Extracted default implementations of formatTime and parseTime to get rid of the following Polymer API usage:

/** @private */
__formatISO(time) {
// The default i18n formatter implementation is ISO 8601 compliant
return TimePicker.properties.i18n.value().formatTime(time);
}
/** @private */
__parseISO(text) {
// The default i18n parser implementation is ISO 8601 compliant
return TimePicker.properties.i18n.value().parseTime(text);
}

This is a pre-requisite for extracting vaadin-time-picker logic into a mixin for using in LitElement version.

Type of change

  • Refactor

Copy link

sonarcloud bot commented Nov 1, 2024

@web-padawan web-padawan merged commit 770e683 into main Nov 1, 2024
9 checks passed
@web-padawan web-padawan deleted the refactor/time-picker-helper branch November 1, 2024 09:07
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