Skip to content

Commit 239a312

Browse files
committed
Small edits
1 parent 4b79653 commit 239a312

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

src/JavaScriptEngineSwitcher.Jint/JavaScriptEngineSwitcher.Jint.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Description>JavaScriptEngineSwitcher.Jint contains adapter `JintJsEngine` (wrapper for the Jint JavaScript Engine (http://github.com/sebastienros/jint) version 2.11.58).</Description>
1414
<PackageIconUrl>https://raw.githubusercontent.com/Taritsyn/JavaScriptEngineSwitcher/master/Icons/JavaScriptEngineSwitcher_Jint_Logo128x128.png</PackageIconUrl>
1515
<PackageTags>JavaScriptEngineSwitcher;JavaScript;ECMAScript;Jint</PackageTags>
16-
<PackageReleaseNotes>Added support of .NET Framework 4.7.1.</PackageReleaseNotes>
16+
<PackageReleaseNotes>In configuration settings of the Jint JS engine was added one new property - `LocalTimeZone` (default `TimeZoneInfo.Local`).</PackageReleaseNotes>
1717
</PropertyGroup>
1818

1919
<Import Project="../../build/common.props" />

src/JavaScriptEngineSwitcher.Jint/JintJsEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ public JintJsEngine(JintSettings settings)
8181
.AllowDebuggerStatement(jintSettings.AllowDebuggerStatement)
8282
.DebugMode(jintSettings.EnableDebugging)
8383
.LimitRecursion(jintSettings.MaxRecursionDepth)
84+
.LocalTimeZone(jintSettings.LocalTimeZone ?? TimeZoneInfo.Local)
8485
.MaxStatements(jintSettings.MaxStatements)
8586
.Strict(jintSettings.StrictMode)
8687
.TimeoutInterval(jintSettings.TimeoutInterval)
87-
.LocalTimeZone(jintSettings.LocalTimeZone ?? TimeZoneInfo.Local)
8888
);
8989
}
9090
catch (Exception e)

src/JavaScriptEngineSwitcher.Jint/JintSettings.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,18 @@ public bool EnableDebugging
2626
set;
2727
}
2828

29+
/// <summary>
30+
/// Gets or sets a local time zone for the <code>Date</code> objects in the script
31+
/// </summary>
32+
public TimeZoneInfo LocalTimeZone
33+
{
34+
get;
35+
set;
36+
}
37+
2938
/// <summary>
3039
/// Gets or sets a maximum allowed depth of recursion:
31-
/// -1 - recursion without limits;
40+
/// -1 - recursion without limits;
3241
/// N - one scope function can be called no more than N times.
3342
/// </summary>
3443
public int MaxRecursionDepth
@@ -74,15 +83,6 @@ public TimeSpan TimeoutInterval
7483
set;
7584
}
7685

77-
/// <summary>
78-
/// Gets or sets the local timezone for the dates in the script
79-
/// </summary>
80-
public TimeZoneInfo LocalTimeZone
81-
{
82-
get;
83-
set;
84-
}
85-
8686

8787
/// <summary>
8888
/// Constructs an instance of the Jint settings
@@ -91,11 +91,11 @@ public JintSettings()
9191
{
9292
AllowDebuggerStatement = false;
9393
EnableDebugging = false;
94+
LocalTimeZone = TimeZoneInfo.Local;
9495
MaxRecursionDepth = -1;
9596
MaxStatements = 0;
9697
StrictMode = false;
9798
TimeoutInterval = TimeSpan.Zero;
98-
LocalTimeZone = TimeZoneInfo.Local;
9999
}
100100
}
101101
}

src/JavaScriptEngineSwitcher.Jint/readme.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
=============
1818
RELEASE NOTES
1919
=============
20-
Added support of .NET Framework 4.7.1.
20+
In configuration settings of the Jint JS engine was added one new property -
21+
`LocalTimeZone` (default `TimeZoneInfo.Local`).
2122

2223
=============
2324
DOCUMENTATION

0 commit comments

Comments
 (0)