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 | 블로그: transdate 0.1

내용으로 바로 넘어 가기


TokigunStudio3

228 / 3282   


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

transdate 0.1

2004/09/24 PM 10:57 | 개발/파이썬 | 0 comments | 0 trackbacks | AllBlog: vote, to pocket

일단 대충 구현. 소스 코드가 매우 날렵해짐. 앞으로 데이터 부분은 줄이려면 얼마든지 줄일 수 있으니 (유니코드 문자열을 써 볼까 -_-) 이것만으로도 절반의 성공이다. 앗싸!

http://sapzil.info/tmp/transdate.py에서 보시라. 소스 코드 바로 이해간다면 얼마나 깔끔한 구현인 지 알 만할 듯. (어렵지도 않고 :) 역시 있는 모듈은 갖다 써야 하는 거야... (pykug의 solunar.py는 c 코드 번역이라서 datetime 같은 거 안 쓰고 자체 구현하는데 세상에 그 짓을 파이썬으로 또 하라고?)

이렇게 해서 O(n)을 O(lg n)으로 줄이는 작업은 앗싸구리하게 종료. 다음 목표는 datetime.date처럼 클래스 형태로 transdate.{sol2lun,lun2sol} 함수들을 wrapping하는 것.

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

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