Strict Standards: Non-static method Soojung::addReferer() should not be called statically in /home/lifthrasiir/sites/sapzil.info/soojung/settings.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/lifthrasiir/sites/sapzil.info/soojung/settings.php:79) in /home/lifthrasiir/sites/sapzil.info/soojung/classes/Counter.class.php on line 63

Strict Standards: Non-static method Entry::getEntry() should not be called statically in /home/lifthrasiir/sites/sapzil.info/soojung/entry.php on line 51

Strict Standards: Non-static method Soojung::entryIdToFilename() should not be called statically in /home/lifthrasiir/sites/sapzil.info/soojung/classes/Entry.class.php on line 182

Strict Standards: Non-static method Soojung::queryFilenameMatch() should not be called statically in /home/lifthrasiir/sites/sapzil.info/soojung/classes/Soojung.class.php on line 55
TokigunStudio3 | 블로그: 오늘은 삼일절.

내용으로 바로 넘어 가기


TokigunStudio3

228 / 3282   


더 이상 이 블로그는 운영되지 않습니다. 새 블로그로 가 주세요.

오늘은 삼일절.

2005/03/01 AM 03:18 | 일상/헛소리 | 2 comments | 0 trackbacks | AllBlog: vote, to pocket

$ python
>>> import datetime, transdate
>>> class mydate(datetime.date):
...     def iskoreanholiday(self):
...         mmdd = self.month * 100 + self.day
...         if date in (101, 301, 405, 505, 606, 717, 815, 1003, 1225): return True
...         ldate = transdate.lunardate.fromsolardate(self) + datetime.timedelta(1)
...         mmdd = ldate.lunarmonth * 100 + ldate.lunarday
...         return mmdd in (101, 102, 103, 409, 815, 816, 817)
...
>>> mydate.today()
mydate(2005, 3, 1)
>>> mydate.today().iskoreanholiday()
True
나 같은 학생 백수(...)한테는 위와 같이 노는 날로 요긴하게(....) 쓰이는 날이지만, 아무튼 이 나라를 지키기 위해 희생하신 많은 분들을 위하여 묵념.

덤: 저 코드를 진짜로 돌리고 싶다면 transdate.py를 받아서 테스트해 보실 것. (돌아 가는 코드 맞음 -_-)

TrackBack URL: http://sapzil.info/soojung/trackback.php?blogid=517

Comment: daybreaker (2005/03/01 PM 07:34)

iskoreanholiday 함수의 압박 (.....)

Comment: 토끼군 (2005/03/01 PM 07:39)

daybreaker: ...뭐 나쁘진 않잖아; 그나저나 transdate 다음 버전 나와야 하는데 ㄱ-

Copyright (c) 1995-2005, Kang Seonghoon (Tokigun).