git gc 명령 실행 시 bad ref, bad object 오류 발생시

1) .git/logs/refs/remotes/origin/해당 브랜치명 ==> 파일을 다른 경로로 이동

2) git gc 명령 실행

하면 해결된다.

LocalDate Java version 8 이상만 가능

개념 : 로컬 날짜 클래스로 날짜 정보만 필요할 때 사용

 

LocalDate <->  Date 변환

private final Function<Date, LocalDate> convertDateToLocalDate
date -> date.toInstant().atZone(ZONE_SEOUL).toLocalDate();

private final Function<LocalDateTime, Date> convertLocalDateTimeToDate
localDateTime -> Date.from(localDateTime.atZone(ZONE_SEOUL).toInstant());

LocalDate localDate = convertDateToLocalDate.apply(dateType);

Date date = convertLocalDateTimeToDate.apply(date.atTime(LocalTime.MIN))

 

'JAVA > Java' 카테고리의 다른 글

[RegExp] 전화번호, 휴대폰번호, 주민번호 정규식  (0) 2021.09.10

1. string to datetime

   * cast('20210611021310' as datetime)

   * cast('2021-06-11 02:13:10' as datetime)

   * STR_TO_DATE('2021-06-11 02:13:10','%Y-%m-%d %H:%i:%s')

2. string to number

  (signed : 부호를 가지는 값 양수 음수 구별 가능, unsigned : 부호를 가지지 않는 값)

  * cast('202123.4545' as unsigned)

 * float 형태 소수점 있는 숫자

 * cast('202123.4545' as decimal(10,2))

+ Recent posts