Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java转换:dddd格式到mm/dd_Java_Date - Fatal编程技术网

Java转换:dddd格式到mm/dd

Java转换:dddd格式到mm/dd,java,date,Java,Date,如何从dddd 1-365查找当年的mm/dd。 我可以找到那个月,但我很难找到那个月的哪一天 使用: 请编辑您的问题,并向我们展示您迄今为止编写的代码。我会特别感兴趣的是你是否在使用这个课程。你需要知道年份,或者至少知道是闰年,在2月之后还是在一年中的第59天之后进行转换。 import java.time.LocalDate; public class Test { public static void main(String[] args) { LocalDate

如何从dddd 1-365查找当年的mm/dd。 我可以找到那个月,但我很难找到那个月的哪一天

使用:


请编辑您的问题,并向我们展示您迄今为止编写的代码。我会特别感兴趣的是你是否在使用这个课程。你需要知道年份,或者至少知道是闰年,在2月之后还是在一年中的第59天之后进行转换。
import java.time.LocalDate;

public class Test {
    public static void main(String[] args) {
        LocalDate date = LocalDate.ofYearDay(2019, 107);

        System.out.println(date.getMonth()); // "APRIL"
        System.out.println(date.getDayOfMonth()); // "17"
    }
}