From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: Help Date: Thu, 24 Oct 2002 15:01:51 +0200 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <3DB261D7.5060306@hananet.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035464798 31156 80.91.224.249 (24 Oct 2002 13:06:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 24 Oct 2002 13:06:38 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 184hh6-00086L-00 for ; Thu, 24 Oct 2002 15:06:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 184hgp-0001No-00; Thu, 24 Oct 2002 09:06:19 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2882 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2882 swk writes: > Each line starts with a modified ISO date e.g., 19991203 (YYYYMMDD) > > Is there any way to pull the ISO Dates to a file and then append the > equivilant Chinese dates to a file? I don't think there's any predefined functionality for that. Here's a suggestion for a way you could implement it. Evaluate the following, load the file with the ISO dates in a buffer and do `M-x jh-iso-to-chinese', which will put the Chinese dates in another buffer. (defun jh-iso-to-chinese () (interactive) (goto-char (point-min)) (while (re-search-forward "^\\([[:digit:]]\\{4\\}\\)\\([[:digit:]]\\{2\\}\\)\\([[:digit:]]\\{2\\}\\)" nil t) (let ((str (format "%s\n" (calendar-chinese-date-string (mapcar 'string-to-int (list (match-string 1) (match-string 2) (match-string 3))))))) (with-current-buffer (get-buffer-create "*chinese output*") (insert str)))) (switch-to-buffer "*chinese output*"))