@@ -82,8 +82,8 @@ public override IValue Evaluate()
82
82
// "If L and M are numbers and R is not present:"
83
83
if ( L . dateValueNumber ( ) != null && M . dateValueNumber ( ) != null && R == null )
84
84
{
85
- var LNumber = int . Parse ( L . GetText ( ) ) ;
86
- var MNumber = int . Parse ( M . GetText ( ) ) ;
85
+ var LNumber = int . Parse ( L . GetText ( ) , CultureInfo . InvariantCulture ) ;
86
+ var MNumber = int . Parse ( M . GetText ( ) , CultureInfo . InvariantCulture ) ;
87
87
if ( legalMonth ( LNumber ) && legalDay ( LNumber , MNumber , CY ) )
88
88
{
89
89
month = LNumber ;
@@ -116,9 +116,9 @@ public override IValue Evaluate()
116
116
// "If L, M, and R are numbers:"
117
117
else if ( L . dateValueNumber ( ) != null && M . dateValueNumber ( ) != null && R != null && R . dateValueNumber ( ) != null )
118
118
{
119
- var LNumber = int . Parse ( L . GetText ( ) ) ;
120
- var MNumber = int . Parse ( M . GetText ( ) ) ;
121
- var RNumber = int . Parse ( R . GetText ( ) ) ;
119
+ var LNumber = int . Parse ( L . GetText ( ) , CultureInfo . InvariantCulture ) ;
120
+ var MNumber = int . Parse ( M . GetText ( ) , CultureInfo . InvariantCulture ) ;
121
+ var RNumber = int . Parse ( R . GetText ( ) , CultureInfo . InvariantCulture ) ;
122
122
if ( legalMonth ( LNumber ) && legalDay ( LNumber , MNumber , yearFunc ( RNumber ) ) )
123
123
{
124
124
month = LNumber ;
@@ -149,12 +149,12 @@ public override IValue Evaluate()
149
149
string monthName ;
150
150
if ( L . dateValueNumber ( ) != null )
151
151
{
152
- N = int . Parse ( L . GetText ( ) ) ;
152
+ N = int . Parse ( L . GetText ( ) , CultureInfo . InvariantCulture ) ;
153
153
monthName = M . GetText ( ) ;
154
154
}
155
155
else
156
156
{
157
- N = int . Parse ( M . GetText ( ) ) ;
157
+ N = int . Parse ( M . GetText ( ) , CultureInfo . InvariantCulture ) ;
158
158
monthName = L . GetText ( ) ;
159
159
}
160
160
int monthNameNumber ;
@@ -188,20 +188,20 @@ public override IValue Evaluate()
188
188
if ( L . dateValueNumber ( ) == null )
189
189
{
190
190
monthName = L . GetText ( ) ;
191
- N1 = int . Parse ( M . GetText ( ) ) ;
192
- N2 = int . Parse ( R . GetText ( ) ) ;
191
+ N1 = int . Parse ( M . GetText ( ) , CultureInfo . InvariantCulture ) ;
192
+ N2 = int . Parse ( R . GetText ( ) , CultureInfo . InvariantCulture ) ;
193
193
}
194
194
else if ( M . dateValueNumber ( ) == null )
195
195
{
196
196
monthName = M . GetText ( ) ;
197
- N1 = int . Parse ( L . GetText ( ) ) ;
198
- N2 = int . Parse ( R . GetText ( ) ) ;
197
+ N1 = int . Parse ( L . GetText ( ) , CultureInfo . InvariantCulture ) ;
198
+ N2 = int . Parse ( R . GetText ( ) , CultureInfo . InvariantCulture ) ;
199
199
}
200
200
else
201
201
{
202
202
monthName = R . GetText ( ) ;
203
- N1 = int . Parse ( L . GetText ( ) ) ;
204
- N2 = int . Parse ( M . GetText ( ) ) ;
203
+ N1 = int . Parse ( L . GetText ( ) , CultureInfo . InvariantCulture ) ;
204
+ N2 = int . Parse ( M . GetText ( ) , CultureInfo . InvariantCulture ) ;
205
205
}
206
206
int monthNameNumber ;
207
207
if ( monthName . Length == 3 )
@@ -240,22 +240,22 @@ public override IValue Evaluate()
240
240
else
241
241
{
242
242
var timeValue = dateOrTime . timeValue ( ) ;
243
- hours = int . Parse ( timeValue . timeValuePart ( ) [ 0 ] . GetText ( ) ) ;
243
+ hours = int . Parse ( timeValue . timeValuePart ( ) [ 0 ] . GetText ( ) , CultureInfo . InvariantCulture ) ;
244
244
if ( timeValue . timeValuePart ( ) . Count == 1 )
245
245
{
246
246
mins = 0 ;
247
247
}
248
248
else
249
249
{
250
- mins = int . Parse ( timeValue . timeValuePart ( ) [ 1 ] . GetText ( ) ) ;
250
+ mins = int . Parse ( timeValue . timeValuePart ( ) [ 1 ] . GetText ( ) , CultureInfo . InvariantCulture ) ;
251
251
}
252
252
if ( timeValue . timeValuePart ( ) . Count < 3 )
253
253
{
254
254
seconds = 0 ;
255
255
}
256
256
else
257
257
{
258
- seconds = int . Parse ( timeValue . timeValuePart ( ) [ 2 ] . GetText ( ) ) ;
258
+ seconds = int . Parse ( timeValue . timeValuePart ( ) [ 2 ] . GetText ( ) , CultureInfo . InvariantCulture ) ;
259
259
}
260
260
var amPm = timeValue . AMPM ( ) ;
261
261
if ( amPm != null && ( amPm . GetText ( ) . ToUpper ( ) == "P" || amPm . GetText ( ) . ToUpper ( ) == "PM" ) && hours >= 0 && hours <= 11 )
0 commit comments