나는 유틸리티 클래스 인 Calender를 실제로 사용하려고합니다. 나는 자신에 혼란 찾을 ,Java에서 올해의 첫 주에 가장 적은 일
방법
getFirstDayOfWeek()
returns the first day of the week;
e.g., SUNDAY in the U.S., MONDAY in France.
및
getMinimalDaysInFirstWeek()
returns the minimal days required in the first week of the year. e.g.,
if the first week is defined as one that contains the first day of the
first month of a year, this method returns 1. If the minimal days required
must be a full week, this method returns 7.
내가 인도 (UTC + 05 : 30)에 살고 첸나이, 콜카타, 뭄바이, 뉴 델리. 일광 절약 시간제는이 시간대에서 관찰되지 않습니다. 자바 7이 될 수있는 일주일로 최소한의 일
WeekNumber FromDate ToDate
Week 01 December 30, 2013 January 5, 2014 // December 30 is Monday
Week 45 November 3, 2014(Monday) November 9, 2014
합니까 자바 소요를 취급하는 경우
올해의 주를 얻으려면, 내가이Calendar calendar = Calendar.getInstance();
System.out.println(calendar.get(Calendar.WEEK_OF_YEAR)); // returns 45
(45)처럼 코딩에만 가능 ? setMinimalDaysInFirstWeek()를 통해 변경할 수 있기 때문입니다. 그리고 그것은 어떤 영향을 미칠 것인가?
시도해 보셨습니까? – arcy