Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000333 [Yate - Yet Another Telephony Engine] engine feature always 2013-02-11 13:34 2013-04-19 13:38
Reporter ximik777 View Status public  
Assigned To paulc
Priority normal Resolution open  
Status feedback   Product Version 4.x
Summary 0000333: Javascript routing
Description Hello i want get date and time in function new Date();
Log:

var a = new Date();
var b = {};
b['now'] = a.now();
b['getDate'] = a.getDate();
//b['getDay'] = a.getDay();
b['getFullYear'] = a.getFullYear();
b['getHours'] = a.getHours();
//b['getMilliseconds'] = a.getMilliseconds();
b['getMinutes'] = a.getMinutes();
b['getMonth'] = a.getMonth();
b['getSeconds'] = a.getSeconds();
//b['getTime'] = a.getTime();
//b['getUTCDate'] = a.getUTCDate();
//b['getUTCDay'] = a.getUTCDay();
//b['getUTCFullYear'] = a.getUTCFullYear();
//b['getUTCHours'] = a.getUTCHours();
//b['getUTCMilliseconds'] = a.getUTCMilliseconds();
//b['getUTCMinutes'] = a.getUTCMinutes();
//b['getUTCMonth'] = a.getUTCMonth();
//b['getUTCSeconds'] = a.getUTCSeconds();

Engine.print_r(b);
'b' = '[object Object]' (JsObject)
'freeze' = '[function freeze()]' (ExpFunction)
'isFrozen' = '[function isFrozen()]' (ExpFunction)
'toString' = '[function toString()]' (ExpFunction)
'hasOwnProperty' = '[function hasOwnProperty()]' (ExpFunction)
'now' = '-924612820' (NamedString)
'getDate' = '1' (NamedString)
'getFullYear' = '1970' (NamedString)
'getHours' = '0' (NamedString)
'getMinutes' = '0' (NamedString)
'getMonth' = '0' (NamedString)
'getSeconds' = '0' (NamedString)


Or I have something wrong?
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000522)
paulc (administrator)
2013-04-19 13:38

SVN Rev. 5469 (2013-04-17) fixed a lot of problems with the Date object.

Please note that "now" is a static method of the constructor, it should be invoked as Date.now(). This is just a (much) faster shortcut for:

  var x = new Date();
  return x.getTime();

- Issue History
Date Modified Username Field Change
2013-02-11 13:34 ximik777 New Issue
2013-04-19 13:38 paulc Note Added: 0000522
2013-04-19 13:38 paulc Assigned To => paulc
2013-04-19 13:38 paulc Status new => feedback


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker