Skip to content
Snippets Groups Projects
Commit 1a724a5a authored by Ramesh Kumar's avatar Ramesh Kumar
Browse files

TMSS-577: Updated Regex for decimal point

parent 61ec3fcf
No related branches found
No related tags found
1 merge request!406Resolve TMSS-577
...@@ -115,15 +115,15 @@ const UnitConverter = { ...@@ -115,15 +115,15 @@ const UnitConverter = {
return 'dms'; return 'dms';
} else if (input.match(/^([0-1]?\d|2[0-3])h([0-5]?\d)m([0-5]?\d)(\.\d{1,4})?s$/)) { } else if (input.match(/^([0-1]?\d|2[0-3])h([0-5]?\d)m([0-5]?\d)(\.\d{1,4})?s$/)) {
return 'hms'; return 'hms';
} else if (input.match(/^-?((\d0(.0{1,4})?)|([0-8]?\d)(.\d{1,4})?) ?d(egree)?s?$/)) { } else if (input.match(/^-?((\d0(.0{1,4})?)|([0-8]?\d)(\.\d{1,4})?) ?d(egree)?s?$/)) {
return 'degrees'; return 'degrees';
} else if (input.match(/^([0-1]?\d|2[0-3])(.\d{1,4})? ?h(our)?s?$/)) { } else if (input.match(/^([0-1]?\d|2[0-3])(\.\d{1,4})? ?h(our)?s?$/)) {
return 'hours'; return 'hours';
} else if (input.match(/^\-?((\d0?:(00:)(00))|(([0-8]\d):(([0-5]\d):)(([0-5]\d)(\.\d{1,4})?))) ?d(egree)?s?$/)) { } else if (input.match(/^\-?((\d0?:(00:)(00))|(([0-8]\d):(([0-5]\d):)(([0-5]\d)(\.\d{1,4})?))) ?d(egree)?s?$/)) {
return 'deg_format'; return 'deg_format';
} else if (input.match(/^([0-1]?\d|2[0-3]):([0-5]?\d):([0-5]?\d)(\.\d{1,4})? ?h(our)?s?$/)) { } else if (input.match(/^([0-1]?\d|2[0-3]):([0-5]?\d):([0-5]?\d)(\.\d{1,4})? ?h(our)?s?$/)) {
return 'hour_format'; return 'hour_format';
} else if (input.match(/^\-?[0-6](.\d{1,20})?$/)) { } else if (input.match(/^\-?[0-6](\.\d{1,20})?$/)) {
return 'radians'; return 'radians';
} else { } else {
return null; return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment