help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: EDB date display dies in 21.3


From: ChipsChap
Subject: Re: EDB date display dies in 21.3
Date: 11 Nov 2003 16:45:28 GMT
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (gnu/linux)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]