Julian day of the year in Java

后端 未结 9 1038
挽巷
挽巷 2020-11-30 12:12

I have seen the \"solution\" at http://www.rgagnon.com/javadetails/java-0506.html, but it doesn\'t work correctly. E.g. yesterday (June 8) should have been 159, but it said

9条回答
  •  情话喂你
    2020-11-30 13:07

    DateFormat d = new SimpleDateFormat("D");
    System.out.println(d.format(date));
    

提交回复
热议问题