diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
| commit | c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c (patch) | |
| tree | 3e4f42f93c7ae89a364e4d51fff6e5cec4e55fa9 /graphs/js/replace/replace.js | |
add: graphs et rushs
Diffstat (limited to 'graphs/js/replace/replace.js')
| -rw-r--r-- | graphs/js/replace/replace.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/graphs/js/replace/replace.js b/graphs/js/replace/replace.js new file mode 100644 index 0000000..24b79e4 --- /dev/null +++ b/graphs/js/replace/replace.js @@ -0,0 +1,8 @@ +function replace(str) { + const captureDateRegex = new RegExp("(\\d{2})/(\\d{2})/(\\d{4})", "g"); + + return str.replaceAll(captureDateRegex, "$3-$1-$2"); +} +module.exports = { + replace, +}; |
