1.键盘录入你的生日字符串 (如:"1998年08月08日") 2.计算当前日期距离生日那天有多少天?
public static void main(String[] args) {
System.out.println("请输入您的生日(xxxx年xx月xx日):");
TemporalAccessor accessor = DateTimeFormatter.ofPattern("yyyy年MM月dd日").parse(new Scanner(System.in).nextLine());
int i = LocalDate.from(accessor).getDayOfYear() - LocalDate.now().getDayOfYear();
System.out.println("距离生日还有:" + (i < 0 ? i + 365 : i));
}