2014元旦放假通知

尊敬的用户:

您好!

值此2014年元旦来临之际,中国证书CHINASSL对于您长期以来给予的关心和支持,表示衷心的感谢!

根据国家规定:

此次元旦放假安排为2014年1月1日,为期一天。

放假期间,遇到问题请通过服务单系统联系我们:

服务单提交: https://billing.yahoohost.cn/submitticket.php

优惠:

元旦放假期间购买SSL证书给予9折优惠,可以享受9折的SSL证书产品有RapidSSL 证书 / COMODO PositiveSSL 证书,更多优惠请联系我们!

非常感谢您的配合和大力支持。

中国证书CHINASSL全体员工祝愿您:工作顺利!节日快乐!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是Java实现的万年历节日节气放假安排代码,你可以参考: ```java import java.util.Calendar; import java.util.Date; public class CalendarDemo { public static void main(String[] args) { Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); int year = calendar.get(Calendar.YEAR); // 获取当前年份 int month = calendar.get(Calendar.MONTH); // 获取当前月份 int day = calendar.get(Calendar.DAY_OF_MONTH); // 获取当前日期 int week = calendar.get(Calendar.DAY_OF_WEEK); // 获取当前星期几 System.out.println("今天是" + year + "年" + (month + 1) + "月" + day + "日,星期" + week); // 判断是否是法定节假日 if (isHoliday(year, month, day)) { System.out.println("今天是法定节假日,放假!"); } else { // 判断是否是周末 if (week == Calendar.SATURDAY || week == Calendar.SUNDAY) { System.out.println("今天是周末,休息!"); } else { System.out.println("今天是工作日,上班!"); } } // 判断是否是节气 String solarTerm = getSolarTerm(year, month * 2); if (solarTerm != null) { System.out.println("今天是" + solarTerm + ",放假!"); } } /** * 判断是否是法定节假日 * * @param year 年份 * @param month 月份(0~11) * @param day 日期 * @return 是否是法定节假日 */ public static boolean isHoliday(int year, int month, int day) { boolean isHoliday = false; if (month == 0 && day == 1) { // 元旦 isHoliday = true; } else if (month == 1 && (day == 4 || day == 5 || day == 6)) { // 春节 isHoliday = true; } else if (month == 4 && day == 1) { // 劳动节 isHoliday = true; } else if (month == 5 && (day == 25 || day == 26 || day == 27)) { // 端午节 isHoliday = true; } else if (month == 9 && (day == 1 || day == 2 || day == 3)) { // 国庆节 isHoliday = true; } return isHoliday; } /** * 获取指定年份指定节气的日期 * * @param year 年份 * @param solarTerm 节气(0~23) * @return 日期 */ public static int getSolarTermDate(int year, int solarTerm) { // 二十四节气(节气点到冬至点的角度,单位为度) int[] termAngles = new int[] { 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330, 345 }; // 二十四节气所在日数的修正值(单位为分钟) int[] termOffsets = new int[] { 0, 21208, 42467, 63836, 85337, 107014, 128867, 150921, 173149, 195551, 218072, 240693, 263343, 285989, 308563, 331033, 353350, 375494, 397447, 419210, 440795, 462224, 483532, 504758 }; // 冬至点的修正值(单位为分钟,当年的冬至点并不是恒定的) int winterSolsticeOffset = getWinterSolsticeOffset(year); // 计算指定节气的修正值(单位为分钟) int termOffset = termOffsets[solarTerm]; // 计算指定节气所在日数的修正值(单位为分钟) int dayOffset = (termAngles[solarTerm] * 4) * 60000; // 计算指定节气所在的时间点(单位为毫秒) long solarTermTime = winterSolsticeOffset + termOffset + dayOffset; // 将时间点转换为日期 Date date = new Date(solarTermTime); Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return calendar.get(Calendar.DAY_OF_MONTH); } /** * 获取指定年份的冬至点修正值(单位为分钟) * * @param year 年份 * @return 冬至点修正值 */ public static int getWinterSolsticeOffset(int year) { int century = year / 100 + 1; // 获取世纪数 int leapYears = (int) (century * 0.25); // 计算世纪闰年数 int yearOffset = (century - 1) * 365 + leapYears + (year % 100 - (century - 1) * 100) * 0.2422 + 21.94; int centuryOffset = (int) (0.2422 * (century - 1)); int winterSolsticeOffset = yearOffset + centuryOffset + 23 * 60; // 冬至点修正值 return winterSolsticeOffset * 60000; // 返回冬至点修正值(单位为分钟) } /** * 获取指定年份指定月份的节气名称 * * @param year 年份 * @param month 月份(0~23) * @return 节气名称 */ public static String getSolarTerm(int year, int month) { String solarTerm = null; int[] solarTermDates = new int[] { getSolarTermDate(year, month * 2), getSolarTermDate(year, month * 2 + 1) }; Calendar calendar = Calendar.getInstance(); calendar.set(year, month, 1); int days = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); for (int i = 0; i < solarTermDates.length; i++) { if (solarTermDates[i] <= days) { solarTerm = getSolarTermName(month * 2 + i); } } return solarTerm; } /** * 获取指定节气的名称 * * @param solarTerm 节气(0~23) * @return 节气名称 */ public static String getSolarTermName(int solarTerm) { String[] solarTermNames = new String[] { "小寒", "大寒", "立春", "雨水", "惊蛰", "春分", "清明", "谷雨", "立夏", "小满", "芒种", "夏至", "小暑", "大暑", "立秋", "处暑", "白露", "秋分", "寒露", "霜降", "立冬", "小雪", "大雪", "冬至" }; return solarTermNames[solarTerm]; } } ``` 这个程序可以判断当前日期是否是法定节假日、是否是周末,并且可以获取当前所处的节气。你可以根据需要修改节假日和节气的判断逻辑,以适应你的具体需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值