Author: Stephan <step...@stzal.com> Branch: Changeset: r324:c24ab50436a7 Date: 2012-12-21 18:46 +0100 http://bitbucket.org/pypy/lang-js/changeset/c24ab50436a7/
Log: implemented Date.now diff --git a/js/builtins_date.py b/js/builtins_date.py --- a/js/builtins_date.py +++ b/js/builtins_date.py @@ -88,6 +88,8 @@ put_native_function(w_Date, u'parse', parse) + put_native_function(w_Date, u'now', now) + put_native_function(w_Date, u'UTC', parse) # 15.9.5.1 @@ -95,6 +97,12 @@ @w_return +def now(this, args): + import time + return int(time.time() * 1000) + + +@w_return def to_string(this, args): if not we_are_translated(): d = w_date_to_datetime(this) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit