Get java.util.Calendar from days since epoch

后端 未结 3 1655
清酒与你
清酒与你 2021-01-18 15:53

I have a variable containing the days since the epoch reference date of 1970-01-01 for a certain date.

Does someone know the way to convert this variabl

3条回答
  •  深忆病人
    2021-01-18 15:57

    Calendar cal = new GregorianCalendar();
    cal.setTimeInMillis(0);
    cal.add(Calendar.DAY_OF_MONTH, daysSinceEpoch);
    

提交回复
热议问题