瀏覽代碼

sanity check for advent day count

Vyacheslav Shebanov 5 年之前
父節點
當前提交
284b5cbe2b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/aoc.lisp

+ 1 - 1
plugins/aoc.lisp

@@ -26,7 +26,7 @@
   (poller-call :aoc ""))
 
 (defun get-advent-days-active ()
-  (- 25 (ceiling (/ (- +advent-time+ (get-universal-time)) 86400))))
+  (max 0 (min 25 (- 25 (ceiling (/ (- +advent-time+ (get-universal-time)) 86400))))))
 
 (defun format-stars(completions)
   (format nil "~{~a~^ ~}" (loop for daynum from 1 to (get-advent-days-active)