The way I did it is necessary to hardcode the future date and the MQTT topic name inside the function node.
I did not test the boundary conditions so the calculation might (eventually) result in one day difference.
Also, I could not test the MQTT node as the public server that I normally use is down at the time of this writing.
[{"id":"8412dbe9.287618","type":"function","z":"46e18adc.8d3cc4","name":"Initialize","func":"// Hardcode the future date - Example: 08-May-2018\n// Date(year, month, day, hour, minute, second, millisecond)\n// Jan =0, Feb = 1, Mar=2, etc..\nvar d = new Date(2018, 4, 8, 0, 0, 0, 0);\n// Calculate days left from today until future date\nvar daysLeft;\ndaysLeft = Math.floor((d-msg.payload)/(1000*60*60*24));\n// send formated msg to node MQTT\nmsg={topic:\"reminder/date\", payload:daysLeft};\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":140,"wires":[["bcec1998.9976c8","d4275afd.734df8"]]}]