I want it to remain open from the specified date onwards. This is the code I have.

<script type="text/javascript"> 
function newPopup(url) {
  popupWindow = window.open(url,'popUpWindow','...');

var date = new Date();
var formatedDate = date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear();

if (formatedDate == "27/010/2018 ") {

How to improve it?

closed as off-topic by John Conde Sep 12 '18 at 18:52

  • This question does not appear to be about webmastering within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • This question appears to be off-topic because it is about web development which is off-topic at Pro Webmasters. Web development questions may be asked at Stack Overflow but be sure to read their FAQ before posting to ensure your question meets their guidelines. In its current form, this question does not meet their guidelines. – John Conde Sep 12 '18 at 18:52

Browse other questions tagged or ask your own question.