Skip to content

Commit af50a2f

Browse files
authored
Handle currency pattern parsing with TODO for negative sub-pattern (#6065)
# Description: Adds a temporary handling of currency pattern parsing by taking the first part of the pattern before any semicolon. Includes a TODO comment to address handling of negative sub-patterns in the future.
1 parent 08b682e commit af50a2f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

provider/source/src/currency/essentials.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ fn currency_pattern_selection(
4747
return Err(DataError::custom("Place holder value must not be empty"));
4848
}
4949

50+
// TODO(#6064): Handle the negative sub pattern.
51+
let pattern = pattern.split(';').next().unwrap();
52+
5053
let currency_sign = '¤';
5154
let currency_sign_index = pattern.find(currency_sign).unwrap();
5255
let first_num_index = pattern.find(['0', '#']).unwrap();

0 commit comments

Comments
 (0)