x
 
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
var today, someday, text;
today = new Date();
someday = new Date();
someday.setFullYear(2100, 0, 15);
if (someday > today) {
  text = "今天在 2100 年 1 月 15 日之前。";
} else {
  text = "今天在 2100 年 1 月 15 日之后。";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>