Browse Source

Fixing Date.now rounding

Fixes #226
Sebastien Ros 10 years ago
parent
commit
bdc51a459f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Jint/Native/Date/DateConstructor.cs

+ 1 - 1
Jint/Native/Date/DateConstructor.cs

@@ -97,7 +97,7 @@ namespace Jint.Native.Date
 
 
         private JsValue Now(JsValue thisObj, JsValue[] arguments)
         private JsValue Now(JsValue thisObj, JsValue[] arguments)
         {
         {
-            return (DateTime.UtcNow - Epoch).TotalMilliseconds;
+            return System.Math.Floor((DateTime.UtcNow - Epoch).TotalMilliseconds);
         }
         }
 
 
         public override JsValue Call(JsValue thisObject, JsValue[] arguments)
         public override JsValue Call(JsValue thisObject, JsValue[] arguments)