Skip to content

Organize date utility functions

Coung Ngo requested to merge cngo-organise-date-utilities into master

What does this MR do and why?

Organize date utility functions

  • Move isValidDateString from its own file to date_calculation_utility.js
  • Move tests from datetime_utility_spec.js to either date_calculation_utility_spec.js or date_format_utility_spec.js.

datetime_utility.js just imports other files:

export * from './datetime/date_calculation_utility';
export * from './datetime/date_format_utility';
export * from './datetime/locale_dateformat';
export * from './datetime/timeago_utility';

Since datetime_utility.js doesn't contain any utility functions itself so it's confusing for it to have a spec file, hence tests in datetime_utility_spec.js are moved to more appropriate spec files

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

How to set up and validate locally

Edited by Coung Ngo

Merge request reports

Loading