Skip to content

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

Merged
web-padawan merged 1 commit into
mainfrom
refactor/time-picker-helper
Nov 1, 2024
Merged

web-padawan merged 1 commit into
mainfrom
refactor/time-picker-helper

Conversation

@web-padawan

Copy link
Copy Markdown
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

@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2024

Copy link
Copy Markdown

@web-padawan
web-padawan merged commit 770e683 into main Nov 1, 2024
@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