department-of-veterans-affairs/vets-website

View on GitHub
src/applications/personalization/dashboard/utils/date-formatting/helpers.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 *
 * @param {string} date in the format of 'year-month-day' e.g. 2023-12-07
 * @returns {string} in the format of 'year/month/day' e.g. 2023/12/07
 */

export const replaceDashesWithSlashes = date => {
  return date.replace(/-/g, '/');
};