You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
397 B
13 lines
397 B
package com.gaotao.common.utils;
|
|
|
|
import java.time.LocalDate;
|
|
import java.time.temporal.ChronoUnit;
|
|
|
|
public class GenDate {
|
|
public static String dateToJuLian(LocalDate currentDate) {
|
|
LocalDate excelStartDate = LocalDate.of(1904, 1, 1);
|
|
long days = ChronoUnit.DAYS.between(excelStartDate, currentDate);
|
|
int excelDate = (int) days;
|
|
return excelDate+"09";
|
|
}
|
|
}
|