From bccada7cbf7eea3c37c0243d95426d1a29d9121f Mon Sep 17 00:00:00 2001 From: yn147 <2270338776@qq.com> Date: 星期四, 23 十一月 2023 09:47:18 +0800 Subject: [PATCH] 缓存,及成绩管理 --- src/main/java/com/qxueyou/scc/base/util/DateTimeUtils.java | 216 +++++++++++++++++++++++++++--------------------------- 1 files changed, 108 insertions(+), 108 deletions(-) diff --git a/src/main/java/com/qxueyou/scc/base/util/DateTimeUtils.java b/src/main/java/com/qxueyou/scc/base/util/DateTimeUtils.java index efe7145..4ac91eb 100644 --- a/src/main/java/com/qxueyou/scc/base/util/DateTimeUtils.java +++ b/src/main/java/com/qxueyou/scc/base/util/DateTimeUtils.java @@ -16,16 +16,16 @@ import org.apache.commons.lang3.StringUtils; /** - * 扩展有关日期工具类的方法。 + * 鎵╁睍鏈夊叧鏃ユ湡宸ュ叿绫荤殑鏂规硶銆� * - * @author 邓志永 + * @author 閭撳織姘� * @since JDK1.6 - * @history 2014-11-28 邓志永 新建 + * @history 2014-11-28 閭撳織姘� 鏂板缓 */ public class DateTimeUtils { /** - * 设置 UTC time zone (often referred to as GMT)区域. + * 璁剧疆 UTC time zone (often referred to as GMT)鍖哄煙. */ public static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone("GMT"); @@ -35,22 +35,22 @@ public final static int YEAR_RANGE_SCOPE = 4; /** - * 设置毫秒和秒之间的对应关系 + * 璁剧疆姣鍜岀涔嬮棿鐨勫搴斿叧绯� */ public static final long MILLIS_PER_SECOND = 1000; /** - * 设置毫秒和分之间的关系. + * 璁剧疆姣鍜屽垎涔嬮棿鐨勫叧绯�. */ public static final long MILLIS_PER_MINUTE = 60 * MILLIS_PER_SECOND; /** - * 设置毫秒和分之间的约束关系。 + * 璁剧疆姣鍜屽垎涔嬮棿鐨勭害鏉熷叧绯汇�� */ public static final long MILLIS_PER_HOUR = 60 * MILLIS_PER_MINUTE; /** - * 设置一天为多少小时. + * 璁剧疆涓�澶╀负澶氬皯灏忔椂. */ public static final long MILLIS_PER_DAY = 24 * MILLIS_PER_HOUR; @@ -114,24 +114,24 @@ /** - * 根据配置的默认日期时间格式来获取指定的对象的字符串信息。 + * 鏍规嵁閰嶇疆鐨勯粯璁ゆ棩鏈熸椂闂存牸寮忔潵鑾峰彇鎸囧畾鐨勫璞$殑瀛楃涓蹭俊鎭�� * * @param value - * 需要被转换的日期时间对象引用。 - * @return 返回的是格式化后的字符串。 + * 闇�瑕佽杞崲鐨勬棩鏈熸椂闂村璞″紩鐢ㄣ�� + * @return 杩斿洖鐨勬槸鏍煎紡鍖栧悗鐨勫瓧绗︿覆銆� */ public static String formatDateTime(Timestamp value) { return formatDateTime(value, ISO_DATETIME_FORMAT); } /** - * 根据配置的默认日期时间格式来获取指定的对象的字符串信息。 + * 鏍规嵁閰嶇疆鐨勯粯璁ゆ棩鏈熸椂闂存牸寮忔潵鑾峰彇鎸囧畾鐨勫璞$殑瀛楃涓蹭俊鎭�� * * @param value - * 需要被转换的日期时间对象引用。 + * 闇�瑕佽杞崲鐨勬棩鏈熸椂闂村璞″紩鐢ㄣ�� * @param defaultFormat - * 按照指定的格式来处理当前的日期时间对象。 - * @return 返回的是格式化后的字符串。 + * 鎸夌収鎸囧畾鐨勬牸寮忔潵澶勭悊褰撳墠鐨勬棩鏈熸椂闂村璞°�� + * @return 杩斿洖鐨勬槸鏍煎紡鍖栧悗鐨勫瓧绗︿覆銆� */ public static String formatDateTime(Timestamp value, String defaultFormat) { if (value == null) { @@ -212,13 +212,13 @@ } /** - * 确定两个日期是否是同一天 + * 纭畾涓や釜鏃ユ湡鏄惁鏄悓涓�澶� * * @param dateSource - * 需要执行判断的第一个日期时间 + * 闇�瑕佹墽琛屽垽鏂殑绗竴涓棩鏈熸椂闂� * @param dateDesti - * 需要执行的第二个日期时间。 - * @return true 如果两个日期都代表了同一天,那么将会返回true。 + * 闇�瑕佹墽琛岀殑绗簩涓棩鏈熸椂闂淬�� + * @return true 濡傛灉涓や釜鏃ユ湡閮戒唬琛ㄤ簡鍚屼竴澶╋紝閭d箞灏嗕細杩斿洖true銆� */ public static boolean isSameDay(Date dateSource, Date dateDesti) { if (dateSource == null || dateDesti == null) { @@ -457,7 +457,7 @@ date.setTime(time); val.setTime(date); } - //子方法 + //瀛愭柟娉� modifyChild(val, field, round); throw new IllegalArgumentException("The field " + field + " is not supported"); @@ -516,10 +516,10 @@ } /** - * 得到指定周的第一天(周日)00:00:00秒,返回对应的Timestamp,可以用作时间区间的计算 + * 寰楀埌鎸囧畾鍛ㄧ殑绗竴澶�(鍛ㄦ棩)00:00:00绉掞紝杩斿洖瀵瑰簲鐨凾imestamp锛屽彲浠ョ敤浣滄椂闂村尯闂寸殑璁$畻 * * @param cal - * Calendar对象,如果为null,则使用本地JVM中的Calendar对象 + * Calendar瀵硅薄锛屽鏋滀负null锛屽垯浣跨敤鏈湴JVM涓殑Calendar瀵硅薄 * @param week * @return */ @@ -537,10 +537,10 @@ } /** - * 得到指定周的最后一天(周日)23:23:59秒,返回对应的Timestamp,可以用作时间区间的计算 + * 寰楀埌鎸囧畾鍛ㄧ殑鏈�鍚庝竴澶�(鍛ㄦ棩)23:23:59绉掞紝杩斿洖瀵瑰簲鐨凾imestamp锛屽彲浠ョ敤浣滄椂闂村尯闂寸殑璁$畻 * * @param cal - * Calendar对象,如果为null,则使用本地JVM中的Calendar对象 + * Calendar瀵硅薄锛屽鏋滀负null锛屽垯浣跨敤鏈湴JVM涓殑Calendar瀵硅薄 * @param week * @return */ @@ -558,10 +558,10 @@ } /** - * 得到当前周在一年中的周数 + * 寰楀埌褰撳墠鍛ㄥ湪涓�骞翠腑鐨勫懆鏁� * * @param cal - * Calendar对象,如果为null,则使用本地JVM中的Calendar对象 + * Calendar瀵硅薄锛屽鏋滀负null锛屽垯浣跨敤鏈湴JVM涓殑Calendar瀵硅薄 * @return */ public static int getCurrentWeek() { @@ -570,10 +570,10 @@ } /** - * 得到当前周在一年中的周数 + * 寰楀埌褰撳墠鍛ㄥ湪涓�骞翠腑鐨勫懆鏁� * * @param cal - * Calendar对象,如果为null,则使用本地JVM中的Calendar对象 + * Calendar瀵硅薄锛屽鏋滀负null锛屽垯浣跨敤鏈湴JVM涓殑Calendar瀵硅薄 * @return */ public static int getCurrentWeek(Calendar calen) { @@ -596,13 +596,13 @@ } /** - * 得到指定Timestamp代表的日期第一年中第几周 + * 寰楀埌鎸囧畾Timestamp浠h〃鐨勬棩鏈熺涓�骞翠腑绗嚑鍛� * * @param cal - * Calendar对象,如果为null,则使用本地JVM中的Calendar对象 + * Calendar瀵硅薄锛屽鏋滀负null锛屽垯浣跨敤鏈湴JVM涓殑Calendar瀵硅薄 * @param ts - * 指定Timestamp - * @return 周数 + * 鎸囧畾Timestamp + * @return 鍛ㄦ暟 */ public static int getWeekOfYear(Calendar cale, Timestamp ts) { Calendar cal =cale; @@ -614,9 +614,9 @@ } /** - * 得到当前年份 + * 寰楀埌褰撳墠骞翠唤 * - * @return 年 + * @return 骞� */ public static int getCurrentYear() { Calendar calendar = new GregorianCalendar(); @@ -631,9 +631,9 @@ } /** - * 得到当前月份 + * 寰楀埌褰撳墠鏈堜唤 * - * @return 月份 + * @return 鏈堜唤 */ public static int getCurrentMonth() { Calendar calendar = new GregorianCalendar(); @@ -654,7 +654,7 @@ } /** - * 获取指定时间的前后多少天的日期以分秒 + * 鑾峰彇鎸囧畾鏃堕棿鐨勫墠鍚庡灏戝ぉ鐨勬棩鏈熶互鍒嗙 */ public static Timestamp getTimestamp(Timestamp timestamp, int day, int hour, int minute) { Calendar calendar = new GregorianCalendar(); @@ -670,15 +670,15 @@ } /** - * 给出两个日期,计算他们之间相差的年数|月数|天数 + * 缁欏嚭涓や釜鏃ユ湡锛岃绠椾粬浠箣闂寸浉宸殑骞存暟|鏈堟暟|澶╂暟 * * @param c1 - * 日期1 + * 鏃ユ湡1 * @param c2 - * 日期2 + * 鏃ユ湡2 * @param what - * 比较模式,如果是Calendar.YEAR则在年份上比较; 如果是Calendar.MONTH则在月数上比较; 如果是Calendar.DATE则在天数上比较(默认情形) - * @return 相差的年数或月数或天数 + * 姣旇緝妯″紡锛屽鏋滄槸Calendar.YEAR鍒欏湪骞翠唤涓婃瘮杈冿紱 濡傛灉鏄疌alendar.MONTH鍒欏湪鏈堟暟涓婃瘮杈冿紱 濡傛灉鏄疌alendar.DATE鍒欏湪澶╂暟涓婃瘮杈冿紙榛樿鎯呭舰锛� + * @return 鐩稿樊鐨勫勾鏁版垨鏈堟暟鎴栧ぉ鏁� */ public static int compare(Calendar c1, Calendar c2, int what) { int number = 0; @@ -701,41 +701,41 @@ } /* - * 得到指定日期的所在年份的最后一天 + * 寰楀埌鎸囧畾鏃ユ湡鐨勬墍鍦ㄥ勾浠界殑鏈�鍚庝竴澶� */ public static Timestamp getLastOfYear(Timestamp t1) { Calendar a = new GregorianCalendar(); a.setTime(t1); a.set(Calendar.MONTH, 11); - a.set(Calendar.DATE, 1);// 把日期设置为12月第一天 - a.roll(Calendar.DATE, -1);// 日期回滚一天,也就是当年最后一天 + a.set(Calendar.DATE, 1);// 鎶婃棩鏈熻缃负12鏈堢涓�澶� + a.roll(Calendar.DATE, -1);// 鏃ユ湡鍥炴粴涓�澶╋紝涔熷氨鏄綋骞存渶鍚庝竴澶� return new Timestamp(a.getTimeInMillis()); } /* - * 得到指定日期的所在年份的第一天 + * 寰楀埌鎸囧畾鏃ユ湡鐨勬墍鍦ㄥ勾浠界殑绗竴澶� */ public static Timestamp getFirstOfYear(Timestamp t1) { Calendar a = new GregorianCalendar(); a.setTime(t1); a.set(Calendar.MONTH, 0); - a.set(Calendar.DATE, 1);// 把日期设置为12月第一天 + a.set(Calendar.DATE, 1);// 鎶婃棩鏈熻缃负12鏈堢涓�澶� return new Timestamp(a.getTimeInMillis()); } /* - * 得到指定日期的所在月份的最后一天 + * 寰楀埌鎸囧畾鏃ユ湡鐨勬墍鍦ㄦ湀浠界殑鏈�鍚庝竴澶� */ public static Timestamp getLastOfMonth(Timestamp t1) { Calendar a = new GregorianCalendar(); a.setTime(t1); - a.set(Calendar.DATE, 1);// 把日期设置为当月第一天 - a.roll(Calendar.DATE, -1);// 日期回滚一天,也就是最后一天 + a.set(Calendar.DATE, 1);// 鎶婃棩鏈熻缃负褰撴湀绗竴澶� + a.roll(Calendar.DATE, -1);// 鏃ユ湡鍥炴粴涓�澶╋紝涔熷氨鏄渶鍚庝竴澶� return new Timestamp(a.getTimeInMillis()); } /** - * 得到指定日期的所在月份的第一天 + * 寰楀埌鎸囧畾鏃ユ湡鐨勬墍鍦ㄦ湀浠界殑绗竴澶� * * @param t1 * @return @@ -743,20 +743,20 @@ public static Timestamp getFirstOfMonth(Timestamp t1) { Calendar a = new GregorianCalendar(); a.setTime(t1); - a.set(Calendar.DATE, 1);// 把日期设置为当月第一天 + a.set(Calendar.DATE, 1);// 鎶婃棩鏈熻缃负褰撴湀绗竴澶� return new Timestamp(a.getTimeInMillis()); } /** - * 给出两个日期,计算他们之间相差的年数|月数|天数 + * 缁欏嚭涓や釜鏃ユ湡锛岃绠椾粬浠箣闂寸浉宸殑骞存暟|鏈堟暟|澶╂暟 * * @param c1 - * 日期1 + * 鏃ユ湡1 * @param c2 - * 日期2 + * 鏃ユ湡2 * @param what - * 比较模式,如果是Calendar.YEAR则在年份上比较; 如果是Calendar.MONTH则在月数上比较; 如果是Calendar.DATE则在天数上比较(默认情形) - * @return 相差的年数或月数或天数 + * 姣旇緝妯″紡锛屽鏋滄槸Calendar.YEAR鍒欏湪骞翠唤涓婃瘮杈冿紱 濡傛灉鏄疌alendar.MONTH鍒欏湪鏈堟暟涓婃瘮杈冿紱 濡傛灉鏄疌alendar.DATE鍒欏湪澶╂暟涓婃瘮杈冿紙榛樿鎯呭舰锛� + * @return 鐩稿樊鐨勫勾鏁版垨鏈堟暟鎴栧ぉ鏁� */ public static int compare(Timestamp t1, Timestamp t2, int what) { @@ -798,11 +798,11 @@ } /** - * 把字符串的日期转成Timestamp + * 鎶婂瓧绗︿覆鐨勬棩鏈熻浆鎴怲imestamp * * @param time - * 字符串的日期 - * @return int Timestamp型日期 + * 瀛楃涓茬殑鏃ユ湡 + * @return int Timestamp鍨嬫棩鏈� */ public static Timestamp stringConvertTimestamp(String stime) { String time =stime; @@ -820,11 +820,11 @@ } /** - * 把字符串的日期转成Timestamp + * 鎶婂瓧绗︿覆鐨勬棩鏈熻浆鎴怲imestamp * * @param date - * 字符串的日期 - * @return int Timestamp型日期 + * 瀛楃涓茬殑鏃ユ湡 + * @return int Timestamp鍨嬫棩鏈� */ public static Date stringConvertDate(String sdate) { String date =sdate; @@ -845,11 +845,11 @@ } /** - * 把字符串的日期转成Timestamp + * 鎶婂瓧绗︿覆鐨勬棩鏈熻浆鎴怲imestamp * * @param date - * 字符串的日期 - * @return int Timestamp型日期 + * 瀛楃涓茬殑鏃ユ湡 + * @return int Timestamp鍨嬫棩鏈� */ public static Timestamp stringConvertTS(String sdate) { String date =sdate; @@ -873,24 +873,24 @@ /** - * 去除date的毫秒数 + * 鍘婚櫎date鐨勬绉掓暟 * * @param date - * 字符串的日期 - * @return int Timestamp型日期 + * 瀛楃涓茬殑鏃ユ湡 + * @return int Timestamp鍨嬫棩鏈� */ public static Date getCurrDateTime(Date date) { return stringConvertTS(formatDate(date, ISO_DATETIME_FORMAT)); } /** - * 比较两日期大小 + * 姣旇緝涓ゆ棩鏈熷ぇ灏� * * @param DATE1 * @param DATE2 * @param what - * 比较模式,如果是Calendar.YEAR则在年份上比较; 如果是Calendar.MONTH则在月数上比较; 如果是Calendar.DATE则在天数上比较(默认情形) - * @return date1 在date2前=1;date1在date2后=-1;否则=0; + * 姣旇緝妯″紡锛屽鏋滄槸Calendar.YEAR鍒欏湪骞翠唤涓婃瘮杈冿紱 濡傛灉鏄疌alendar.MONTH鍒欏湪鏈堟暟涓婃瘮杈冿紱 濡傛灉鏄疌alendar.DATE鍒欏湪澶╂暟涓婃瘮杈冿紙榛樿鎯呭舰锛� + * @return date1 鍦╠ate2鍓�=1;date1鍦╠ate2鍚�=-1;鍚﹀垯=0; * @throws ParseException */ public static int compareDate(String date1, String date2, int what) throws ParseException { @@ -901,13 +901,13 @@ } /** - * 比较两日期大小 + * 姣旇緝涓ゆ棩鏈熷ぇ灏� * * @param DATE1 * @param DATE2 * @param what - * 比较模式,如果是Calendar.YEAR则在年份上比较; 如果是Calendar.MONTH则在月数上比较; 如果是Calendar.DATE则在天数上比较(默认情形) - * @return date1 在date2前=1;date1在date2后=-1;否则=0; + * 姣旇緝妯″紡锛屽鏋滄槸Calendar.YEAR鍒欏湪骞翠唤涓婃瘮杈冿紱 濡傛灉鏄疌alendar.MONTH鍒欏湪鏈堟暟涓婃瘮杈冿紱 濡傛灉鏄疌alendar.DATE鍒欏湪澶╂暟涓婃瘮杈冿紙榛樿鎯呭舰锛� + * @return date1 鍦╠ate2鍓�=1;date1鍦╠ate2鍚�=-1;鍚﹀垯=0; */ public static int compareDate(Date date1, Date date2, int what) { Calendar objCalendar1 = Calendar.getInstance(); @@ -925,20 +925,20 @@ } /** - * 和当前日期比较大小 + * 鍜屽綋鍓嶆棩鏈熸瘮杈冨ぇ灏� * * @param currentDate - * @return currentDate 在当前日期前=1;date1在当前日期后=-1;否则=0; + * @return currentDate 鍦ㄥ綋鍓嶆棩鏈熷墠=1;date1鍦ㄥ綋鍓嶆棩鏈熷悗=-1;鍚﹀垯=0; */ public static int compareCurrentDate(Date currentDate) { return compareDate(currentDate, nowAsDate(), Calendar.DATE); } /** - * 和当前日期比较大小 + * 鍜屽綋鍓嶆棩鏈熸瘮杈冨ぇ灏� * * @param currentDate - * @return currentDate 在当前日期前=1;date1在当前日期后=-1;否则=0; + * @return currentDate 鍦ㄥ綋鍓嶆棩鏈熷墠=1;date1鍦ㄥ綋鍓嶆棩鏈熷悗=-1;鍚﹀垯=0; * @throws ParseException */ public static int compareCurrentDate(String currentDate) throws ParseException { @@ -949,10 +949,10 @@ } /** - * 根据日期,输出日期对应的月份 + * 鏍规嵁鏃ユ湡锛岃緭鍑烘棩鏈熷搴旂殑鏈堜唤 * * @param date - * @return month + * @return銆�month */ public static int getMonth(Date date) { if (null == date) { @@ -966,11 +966,11 @@ } /** - * 封装每月的最后一天 + * 灏佽姣忔湀鐨勬渶鍚庝竴澶� * * @param date - * @author 伍升存 - * @history 2012-03-13 伍升存 + * @author 浼嶅崌瀛� + * @history 2012-03-13 浼嶅崌瀛� * @return */ public static Date lastDayOfMonth(Date date) { @@ -982,7 +982,7 @@ } /** - * 当前时间的前几个小时 + * 褰撳墠鏃堕棿鐨勫墠鍑犱釜灏忔椂 * * @return */ @@ -993,7 +993,7 @@ } /** - * 当前时间的后几个小时 + * 褰撳墠鏃堕棿鐨勫悗鍑犱釜灏忔椂 * * @return */ @@ -1003,7 +1003,7 @@ return calendar.getTime(); } - // 计算时间 + // 璁$畻鏃堕棿 public static String showTime(Date ctime, String sformat) { String format = sformat; String r = ""; @@ -1017,25 +1017,25 @@ long nowtime = nowtimelong; long ctimelong = ctime.getTime(); long result = nowtime - ctimelong; - if (result - (long) 60 * 1000 < (long) 0)// 一分钟内 + if (result - (long) 60 * 1000 < (long) 0)// 涓�鍒嗛挓鍐� { BigDecimal seconds = cal(new BigDecimal(result), (long) 1000, 0); - r = seconds + "秒钟前"; - } else if (result - (long) 60 * 1000 >= (long) 0 && result - (long) 60 * 60 * 1000 < (long) 0)// 一小时内 + r = seconds + "绉掗挓鍓�"; + } else if (result - (long) 60 * 1000 >= (long) 0 && result - (long) 60 * 60 * 1000 < (long) 0)// 涓�灏忔椂鍐� { BigDecimal seconds = cal(new BigDecimal(result), (long) (60 * 1000), 0); - r = seconds + "分钟前"; - } else if (result - (long) 60 * 60 * 1000 >= (long) 0 && result - (long) 24 * 60 * 60 * 1000 < (long) 0)// 一天内 + r = seconds + "鍒嗛挓鍓�"; + } else if (result - (long) 60 * 60 * 1000 >= (long) 0 && result - (long) 24 * 60 * 60 * 1000 < (long) 0)// 涓�澶╁唴 { BigDecimal seconds = cal(new BigDecimal(result), (long) (60 * 60 * 1000), 0); - r = seconds + "小时前"; - } else if (result - (long) 24 * 60 * 60 * 1000 >= (long) 0 && result - (long) 30 * 24 * 60 * 60 * 1000 < (long) 0) {// 一个月内 + r = seconds + "灏忔椂鍓�"; + } else if (result - (long) 24 * 60 * 60 * 1000 >= (long) 0 && result - (long) 30 * 24 * 60 * 60 * 1000 < (long) 0) {// 涓�涓湀鍐� BigDecimal seconds = cal(new BigDecimal(result), (long) (24 * 60 * 60 * 1000), 0); - r = seconds + "天前"; - } else if (result - (long) 30 * 24 * 60 * 60 * 1000 >= (long) 0 && result - (long) 12 * 30 * 24 * 60 * 60 * 1000 < (long) 0) {// 一年内 + r = seconds + "澶╁墠"; + } else if (result - (long) 30 * 24 * 60 * 60 * 1000 >= (long) 0 && result - (long) 12 * 30 * 24 * 60 * 60 * 1000 < (long) 0) {// 涓�骞村唴 BigDecimal seconds = cal(new BigDecimal(result), new BigDecimal(30).multiply(new BigDecimal(24)).multiply(new BigDecimal(60)).multiply(new BigDecimal(60)).multiply(new BigDecimal(1000)).longValue(), 0); - r = seconds + "个月前"; - } else{// 日期格式 + r = seconds + "涓湀鍓�"; + } else{// 鏃ユ湡鏍煎紡 SimpleDateFormat sdf = new SimpleDateFormat(format,Locale.CHINA); r = sdf.format(ctime); } @@ -1049,7 +1049,7 @@ public static String transForm(Date beginTime, Date endTime) { Calendar cal = Calendar.getInstance(); String trans = ""; - SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日-HH:mm",Locale.CHINA); + SimpleDateFormat sdf = new SimpleDateFormat("MM鏈坉d鏃�-HH:mm",Locale.CHINA); String str_begin = sdf.format(beginTime); String str_end = sdf.format(endTime); cal.setTime(beginTime); @@ -1063,12 +1063,12 @@ String str_end_hour = str_end.substring(str_end.indexOf('-') + 1); if (str_begin_month.equals(str_end_month)) { - trans = str_begin_month + " (" + str_begin_week + ") " + str_begin_hour + " 至 " + str_end_hour; + trans = str_begin_month + " (" + str_begin_week + ") " + str_begin_hour + " 鑷� " + str_end_hour; } else { cal.setTime(endTime); int end_week = cal.get(Calendar.DAY_OF_WEEK); String str_end_week = getWeek(end_week); - trans = str_begin_month + " (" + str_begin_week + ") " + str_begin_hour + " 至 " + str_end_month + " (" + str_end_week + ") " + str_end_hour; + trans = str_begin_month + " (" + str_begin_week + ") " + str_begin_hour + " 鑷� " + str_end_month + " (" + str_end_week + ") " + str_end_hour; } return trans; } @@ -1076,25 +1076,25 @@ public static String getWeek(int week) { String str_week = ""; if (week == 2) { - str_week = "周一"; + str_week = "鍛ㄤ竴"; } if (week == 3) { - str_week = "周二"; + str_week = "鍛ㄤ簩"; } if (week == 4) { - str_week = "周三"; + str_week = "鍛ㄤ笁"; } if (week == 5) { - str_week = "周四"; + str_week = "鍛ㄥ洓"; } if (week == 6) { - str_week = "周五"; + str_week = "鍛ㄤ簲"; } if (week == 7) { - str_week = "周六"; + str_week = "鍛ㄥ叚"; } if (week == 1) { - str_week = "周日"; + str_week = "鍛ㄦ棩"; } return str_week; -- Gitblit v1.8.0