Skip to content

Commit 67d3b7d

Browse files
committed
fix: cut v1.0.2 for abbreviated date normalization
1 parent db5cef4 commit 67d3b7d

11 files changed

Lines changed: 89 additions & 10 deletions

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## v1.0.2 - 2026-04-13
4+
5+
- Expanded default date normalization so abbreviated month-name values like `18-FEB-19` match equivalent ISO dates without requiring custom patterns.
6+
- Added regression coverage for the default abbreviated-month normalization path in both the comparison engine and cleanup-settings integration suites.
7+
38
## v1.0.1 - 2026-04-13
49

510
- Clarified local file-selection wording and renamed the local file-loading contract surfaces to keep the desktop and web flows aligned.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "csv-align"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
edition = "2021"
55
description = "CSV file comparison tool with modern web UI"
66
license = "MIT"

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "csv-align-frontend",
33
"private": true,
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src-tauri/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "csv-align-app"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
edition = "2021"
55
description = "CSV file comparison desktop application"
66
license = "MIT"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@
4848
"productName": "CSV Align",
4949
"mainBinaryName": "csv-align",
5050
"identifier": "com.csvalign.desktop",
51-
"version": "1.0.1"
51+
"version": "1.0.2"
5252
}

src/comparison/engine.rs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::collections::HashMap;
55

66
const DEFAULT_DATE_FORMATS: &[&str] = &[
77
"%Y-%m-%d", "%d-%m-%Y", "%m-%d-%Y", "%Y/%m/%d", "%d/%m/%Y", "%m/%d/%Y", "%Y.%m.%d", "%d.%m.%Y",
8-
"%m.%d.%Y", "%Y%m%d", "%d %b %Y", "%d %B %Y",
8+
"%m.%d.%Y", "%Y%m%d", "%d %b %Y", "%d %B %Y", "%d-%b-%y",
99
];
1010

1111
/// Compare two CSV datasets based on configuration
@@ -427,3 +427,33 @@ pub fn generate_summary(
427427

428428
summary
429429
}
430+
431+
#[cfg(test)]
432+
mod tests {
433+
use super::*;
434+
435+
#[test]
436+
fn default_date_normalization_matches_hyphenated_abbreviated_two_digit_year() {
437+
let mut normalization = ComparisonNormalizationConfig::default();
438+
normalization.date_normalization.enabled = true;
439+
440+
assert!(values_match_with_config(
441+
"18-FEB-19",
442+
"2019-02-18",
443+
&normalization,
444+
));
445+
}
446+
447+
#[test]
448+
fn default_date_normalization_preserves_iso_output_for_new_format() {
449+
let config = DateNormalizationConfig {
450+
enabled: true,
451+
formats: Vec::new(),
452+
};
453+
454+
assert_eq!(
455+
normalize_date_value("18-FEB-19", &config),
456+
Some("2019-02-18".to_string())
457+
);
458+
}
459+
}

tests/cleanup_settings_normalization_integration.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,20 @@ fn cleanup_settings_matches_different_date_formats_when_enabled() {
7272
assert_eq!(results.len(), 1);
7373
assert!(matches!(results[0], RowComparisonResult::Match { .. }));
7474
}
75+
76+
#[test]
77+
fn cleanup_settings_matches_default_month_name_date_format_without_custom_formats() {
78+
let (csv_a, csv_b) = create_csv_pair("18-FEB-19", "2019-02-18");
79+
let config = create_config(ComparisonNormalizationConfig {
80+
date_normalization: DateNormalizationConfig {
81+
enabled: true,
82+
formats: vec![],
83+
},
84+
..ComparisonNormalizationConfig::default()
85+
});
86+
87+
let results = compare_csv_data(&csv_a, &csv_b, &config);
88+
89+
assert_eq!(results.len(), 1);
90+
assert!(matches!(results[0], RowComparisonResult::Match { .. }));
91+
}

0 commit comments

Comments
 (0)