what is the correct behavior for the Calendar objected passed to the constructor of DateTime type?
I have the components year, month and day as the below example:
day = 1
month = 5
year = 1433 (which is the current Hijri year)
when creating a datetime object using the below code the result is a valid Greg Date
HijriCalendar hijri = new HijriCalendar();
//Get the First Day in the Month
DateTime firstDayInMonth = new DateTime(1433, month, 1, hijri);
while using the below code generates a valid Hijri date:
GregorianCalendar greg = new GregorianCalendar();
//Get the First Day in the Month
DateTime firstDayInMonth = new DateTime(1433, month, 1, greg);
is that a correct result?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…