<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>LocalDate on 얼쑤 · Team Edo</title><link>https://team-edo.github.io/tags/localdate/</link><description>Recent content in LocalDate on 얼쑤 · Team Edo</description><generator>Hugo</generator><language>ko-kr</language><lastBuildDate>Wed, 28 Oct 2026 00:00:00 +0900</lastBuildDate><atom:link href="https://team-edo.github.io/tags/localdate/index.xml" rel="self" type="application/rss+xml"/><item><title>형식이 맞는 날짜가 500을 낸 이유</title><link>https://team-edo.github.io/posts/2026/10/reject-out-of-range-calendar-dates/</link><pubDate>Wed, 28 Oct 2026 00:00:00 +0900</pubDate><guid>https://team-edo.github.io/posts/2026/10/reject-out-of-range-calendar-dates/</guid><description>&lt;p>얼쑤의 연습 통계 API는 시작일과 종료일을 받아 해당 기간의 연습 시간과 횟수를 돌려줍니다. 요약 API는 바로 앞 기간의 통계도 함께 제공합니다. 두 날짜를 Spring의 &lt;code>@DateTimeFormat(iso = ISO.DATE)&lt;/code>로 받아 &lt;code>LocalDate&lt;/code>로 변환했습니다. 그러면 &lt;code>2026/10/01&lt;/code>처럼 형식이 어긋난 날짜는 컨트롤러가 실행되기 전에 400으로 거절됩니다.&lt;/p>
&lt;p>리뷰에서 날짜 형식 검사를 통과하는 값이 500을 냈습니다. 요약 API에 시작일과 종료일을 모두 **&lt;code>-999999999-01-01&lt;/code>**로 보내면 두 값은 &lt;code>LocalDate&lt;/code>로 변환됐습니다. 길이도 하루여서 기존 기간 제한을 통과했습니다. 직전 기간을 구하려고 시작일에서 하루를 빼는 순간 &lt;code>LocalDate&lt;/code>의 범위를 벗어났고, &lt;code>DateTimeException&lt;/code>이 500으로 이어졌습니다.&lt;/p></description></item></channel></rss>