js 判断所有节假日

// JavaScript Document

calendar = new Date();
month = calendar.getMonth();
date = calendar.getDate(); if ((month == 0) && (date == 1)) document.write("元旦");
if ((month == 1) && (date ==13 )) document.write("除夕");
if ((month == 1) && (date ==14 )) document.write("春节/情人节");
if ((month == 2) && (date == 1)) document.write("国际海豹日");
if ((month == 2) && (date == 8)) document.write("国际劳动妇女节/中国保护母亲河日");
if ((month == 2) && (date == 12)) document.write("植树节"); if ((month == 3) && (date == 1)) document.write("愚人节");
if ((month == 3) && (date == 5)) document.write("清明节");
if ((month == 4) && (date == 1)) document.write("国际劳动节");
if ((month == 4) && (date == 9)) document.write("母亲节"); if ((month == 5) && (date == 1)) document.write("国际儿童节");
if ((month == 5) && (date == 26)) document.write("国际禁毒日"); if ((month == 7) && (date == 1)) document.write("建军节");
if ((month == 7) && (date == 15)) document.write("日本无条件投降日/世纪婚纱日");
if ((month == 7) && (date == 16)) document.write("七夕情人节"); if ((month == 9) && (date == 20)) document.write("世界厨师日");
if ((month == 9) && (date == 22)) document.write("世界传统医药日");
if ((month == 9) && (date == 24)) document.write("联合国日/世界发展信息日");
if ((month == 9) && (date == 25)) document.write("世界骨质疏松日/抗美援朝纪念日/环卫工人节");
if ((month == 9) && (date == 31)) document.write("世界勤俭日/中国男性健康日"); if ((month == 11) && (date == 24)) document.write("平安夜");
if ((month == 11) && (date == 25)) document.write("圣诞节");

个别细节不对,仅供参考

上一篇:Oracle 10g 物理Dataguard日常操作维护(二)


下一篇:[CareerCup] 16.1 Thread and Process 线程和进程