ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: Yihan Song <syhannnn@gmail.com>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Support Chinese Date Conversion
Date: Wed, 29 Nov 2023 10:24:38 +0100	[thread overview]
Message-ID: <0d617461-a804-4c77-b40c-fc9037f01739@xs4all.nl> (raw)
In-Reply-To: <CAP0Toj-XFai1=cHsNQ6a6=bi0bj0oVOEn5e6JYW0XGBySLX-UQ@mail.gmail.com>

On 11/29/2023 7:56 AM, Yihan Song wrote:
> Dears,
> 
> I am opening a PR <https://github.com/contextgarden/context/pull/1> to 
> improve the Chinese date conversion but it seems that repo is just a 
> mirror site without development activities, can someone help to review 
> this one?

sending patched files is faster (i need to check and diff anyway)

can you test with this:

     if name == "date" then
         -- We could do some number juggling instead but this is fast 
enough. There is
         -- no error checking here so we assume a proper year. Maybe a 
better name is
         -- asis (so that it can be used for more than dates).
         local vector = vector.normal
         for s in gmatch(tostring(n),".") do
             r = r + 1 ; result[r] = vector[tonumber(s)]
         end
         return concat(result)
     end

(btw, we also need to adapt the lmt file ... once mkiv is frozen we only 
add to lmtx)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2023-11-29  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  6:56 [NTG-context] " Yihan Song
2023-11-29  9:24 ` Hans Hagen [this message]
2023-11-29 10:19   ` [NTG-context] " Yihan Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d617461-a804-4c77-b40c-fc9037f01739@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=syhannnn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).