Return value based on date

[ad_1]

Hello. Is it possible to return a yes / no value when a selected date is before or after a set date. Something like,

(function(){

var purchaseDate = fieldname6;

var fromDate = 11/30/2024;

if (purchaseDate < fromDate) {

  alert(“Current date is before November 30th.”);

} else {

  alert(“Current date is after or equal to November 30th.”);

})();

Thank you.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer