소스 검색

Fix !registration on birthdays.

tags/v0.2
Ben Kurtovic 11 년 전
부모
커밋
1bde44b438
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      earwigbot/commands/registration.py

+ 1
- 1
earwigbot/commands/registration.py 파일 보기

@@ -69,7 +69,7 @@ class Registration(Command):
msg.append("{0} {1}".format(num, unit if num == 1 else unit + "s"))

now = datetime.utcnow()
bd_passed = (now.month, now.day) < (birth.month, birth.day)
bd_passed = now.timetuple()[1:-3] < birth.timetuple()[1:-3]
years = now.year - birth.year - bd_passed
delta = now - birth.replace(year=birth.year + years)
insert("year", years)


불러오는 중...
취소
저장