Fixed require for nodejs and added date type.