[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mhc:00184] Re: mhc does not work



On Thu, 30 Sep 1999 10:33:57 +0900,
	Takeshi Tomaru <ken@xxxxxxxxxxxxxxxxxxxxxxxx> said:

> 確かにM-x help f で探しても,format-time-stringなる関数はないようです。
:
> Emacs 19.28.1 / Mule 2.3上でmew-1.94 releaseを使っています。
> で,00usage.jisに従ってインストールしました。

あら、format-time-string って 19.2x にはないのかもしれませんね。
ddate.el で定義している ddate-now を以下の定義に置き換えるとどう
でしょう。

(defun ddate-now ()
  (let (week mon day hour min sec year (now (current-time-string)))
  ; current-time-string is "Thu Jun 30 01:58:16 1994"
  (string-match (concat 
                 "^\\([^ ]+\\) +\\([^ ]+\\) +\\([^ ]+\\) +"
                 "\\([^: ]+\\):\\([^: ]+\\):[^ ]+ +"
                 "\\([^ ]+\\)$")
                 (current-time-string))
  (setq 
   week (substring now (match-beginning 1) (match-end 1))
   mon  (substring now (match-beginning 2) (match-end 2))
   day  (substring now (match-beginning 3) (match-end 3))
   hour (substring now (match-beginning 4) (match-end 4))
   min  (substring now (match-beginning 5) (match-end 5))
   year (substring now (match-beginning 6) (match-end 6))
   week (/ (string-match week "SunMonTueWedThuFriSat") 3)
   mon  (/ (string-match mon "   JanFebMarAprMayJunJulAugSepOctNovDec") 3)
   year (string-to-int year))
  (list  year
         mon
         (string-to-int day)
         (string-to-int hour)
         (string-to-int min))))
--
nom