取得日期是某年的第几周

    xiaoxiao2026-08-16  2

    根据日期入得日期是某年的第几周。   [java]   //取得日期是某年的第几周    public static int getWeekOfYear(Date date){   Calendar cal = Calendar.getInstance();   cal.setTime(date);   int week_of_year = cal.get(Calendar.WEEK_OF_YEAR);   return week_of_year;   }
    转载请注明原文地址: https://ju.6miu.com/read-1311253.html
    最新回复(0)