Skip to content

DateRangeToStringConverter#109

Open
maxwell-jordan wants to merge 1 commit intomainfrom
feature/date-range-to-string-converter
Open

DateRangeToStringConverter#109
maxwell-jordan wants to merge 1 commit intomainfrom
feature/date-range-to-string-converter

Conversation

@maxwell-jordan
Copy link
Contributor

adds DateRangeToStringConverter which takes (startDate, endDate, locales, options) as parameters to output a stringified date in the specified format

Copy link
Contributor

@marchant marchant left a comment

Choose a reason for hiding this comment

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

Refactor needed

* @param {Object} [options] - An object with formatting options for Intl.DateTimeFormat
* @returns {string} The formatted date range string
*/
convert: {
Copy link
Contributor

Choose a reason for hiding this comment

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

This wasn't my guidance: converters only take one argument in the convert method, and since it's a DateRangeToStringConverter, the argument passed to convert has to be a Range instance. locales and options needs to be properties of the converter itself

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