* Re: EDB date display dies in 21.3
2003-11-10 22:40 ` EDB date display dies in 21.3 Jesper Harder
@ 2003-11-11 16:45 ` ChipsChap
0 siblings, 0 replies; 2+ messages in thread
From: ChipsChap @ 2003-11-11 16:45 UTC (permalink / raw)
Jesper Harder <harder@myrealbox.com> writes:
> The problem is that EDB defines its own date functions in the global
> name space (i.e. without a proper package prefix). This is bound to
> break sooner or later. The solution would be to go through EDB and
> replace them with the built-in Emacs date & time functions.
This turns out to be not *quite* the problem I encountered (although it's
surely a problem) but I will discuss that in the other newsgroup, as you
suggest below.
> NB: Please use gnu.emacs.sources for source code _only_. Questions
> and discussion should go to gnu.emacs.help.
Point noted and will do. However, I think it is appropriate to post a patch
in this newsgroup and here is something that seems to work for the problem at
hand, as opposed to a total, global solution. I also decided to get rid of a
small Y2K problem at the same time. It is a patch to the EDB file db-time.el,
and someone please inform me by e-mail if this is not the proper format for
patches:
;;;;;;;;;;;;;;begin patch to db-time.el
57,58c57,59
< "Extract the year and return it modulo 1900."
< (% (date-year date) 1900))
---
> "Extract the year and return it with the right two digits.
> Makes no sense for years in early 1900s or late 2000s."
> (% (date-year date) 100))
443c444
< ("d" . ((date-day date) . (date-day date)))
---
> ("d" . ((date-day date) . (format "%d" (date-day date))))
447,448c448,449
< ("m" . ((date-month date) . (date-month date)))
< ("year" . ((date-year date) . (date-year-long date)))
---
> ("m" . ((date-month date) . (format "%d" (date-month date))))
> ("year" . ((date-year date) . (format "%d" (date-year-long date))))
;;;;;;;;;;;;;;;; end patch to db-time.el
^ permalink raw reply [flat|nested] 2+ messages in thread