I am working on C++ Addon and am trying to set the various DATE fields

CallDateMethod (date, "setUTCFullYear", year).;
CallDateMethod(date, "setUTCMonth", month);
CallDateMethod (date, "setUTCDate", date);
CallDateMethod (date, "setUTCHours", hours);
CallDateMethod (date, "setUTCMinutes", mins);
CallDateMethod (date, "setUTCSeconds", secs);

where the CallDateMethod is as follows:

void CallDateMethod (v8::Local::<v8::Date> date, const char *method, int v)
{
  Handle<Value> args[1];

  args[0] = v8::Number::New (v);
  Local<Function>::Cast (date->Get(String::New (method)))->Call (date, 1, 
args);
}


year, month, date, hours, mins, secs are good, have verified,

and printing this in js script, consistently shows a wrong value.

Any suggestion how to set values in v8::Date?

Thanks,
-P. Venkatraman.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/6eecde62-74c1-4a86-b04b-80bbae4bd1cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to