• I think this is solved.

    In the module file:

    function Date() 
    {
    // Constructor code
    }
    
    exports.constructor=Date;
    

    In the referring file

    var Date=require("Date.js").constructor;
    
    var d1=new Date();
    var d2=new Date(2014,10,1,12,0,0,0);
    
About

Avatar for mgg1010 @mgg1010 started