[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[mhc:01632] Re: カレンダのフォーマット
しまった.
On Thu, 19 Sep 2002 13:39:17 +0900,
Yoshinari Nomura <nom@xxxxxxxxxxxxx> said:
> %U is the week number starting on Sunday, %W starting on Monday,
> %V according to ISO 8601.
>
> これをそのまま使って,
>
> ;;; XXX: It has the Y2038 problem.
> (defsubst mhc-date-cw (date)
> (cond
> ((= mhc-calendar-start-day-of-week 1)
> (string-to-number (format-time-string "%W" (mhc-date-to-second date))))
> (t
> (string-to-number (format-time-string "%V" (mhc-date-to-second date))))))
すんません.%V は月曜始まりだった.
;;; XXX: It has the Y2038 problem.
(defsubst mhc-date-cw (date)
(cond
((= mhc-calendar-start-day-of-week 1)
(string-to-number (format-time-string "%V" (mhc-date-to-second date))))
(t
(string-to-number (format-time-string "%U" (mhc-date-to-second date))))))
こうかしら.
--
nom