From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5579 Path: news.gmane.org!not-for-mail From: "writeonce@midipix.org" Newsgroups: gmane.linux.lib.musl.general Subject: Re: Locale bikeshed time Date: Wed, 23 Jul 2014 22:59:15 -0400 Message-ID: <53D07683.9010209@midipix.org> References: <20140722184932.GA4914@brightrain.aerifal.cx> <20140722201008.GC16795@example.net> <20140722203540.GA11570@brightrain.aerifal.cx> <20140723095031.GE16795@example.net> <20140723163907.GC11570@brightrain.aerifal.cx> <53D043C9.8020102@midipix.org> <20140723233832.GF11570@brightrain.aerifal.cx> <53D05C4A.5070307@midipix.org> <20140724015719.GG11570@brightrain.aerifal.cx> <53D06C88.2010506@midipix.org> <20140724022408.GH11570@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406170778 15345 80.91.229.3 (24 Jul 2014 02:59:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jul 2014 02:59:38 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5584-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jul 24 04:59:31 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XA9Fh-0003ac-8C for gllmg-musl@plane.gmane.org; Thu, 24 Jul 2014 04:59:29 +0200 Original-Received: (qmail 32125 invoked by uid 550); 24 Jul 2014 02:59:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32112 invoked from network); 24 Jul 2014 02:59:28 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <20140724022408.GH11570@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:5579 Archived-At: On 07/23/2014 10:24 PM, Rich Felker wrote: > On Wed, Jul 23, 2014 at 10:16:40PM -0400, writeonce@midipix.org wrote: >>>> implementation of %E? could use weak aliases and standardized hooks, >>>> then applications or calendar-specific libraries could provide these >>>> hooks and still use the libc strftime, rather than a complex system >>>> of wrappers and conditionals. >>> That's now how weak symbols work -- they're not a way to add plug-in >>> code. >>> >> Thanks for the clarification. This leaves a query to a local >> service the more likely solution since for at least the Hijri >> (Muslim) and Hebrew (Jewish) calendars, accurate conversion cannot >> be based on data or tables alone. > How so? All code is fundamentally data/tables. Is your point that the > current data is not sufficient to compute all future times (in which > case updated data would be needed but sufficient) or just that the > algorithms are moderately complex (in which case a the data would have > to represent a nontrivial computational language). For one thing, the algorithms for past dates are moderately (or somehow more than moderately) complex. This pertains to both the Hijri and Hebrew calendars. With respect to future dates, in the most traditional Muslim countries the first day of the month is predicted via astronomic, yet confirmed via traditional means (observation of the new moon). In those countries you might therefore find out "in real time" whether tonight is the 1st of the next month, or the 30th of the current one. For date conversion to be accurate, then, you would have to get your data updated on a monthly basis, which at least for me makes a local service the better solution. Obviously, things would have been much easier if the wise and elderly had designed their calendars with an ISO libc in mind (a bug in the prophet utility?), but I personally wouldn't dare trying to change them;-) > > > In any case this is probably quite low priority. I'm not aware of any > other libc supporting these features or any significant demand for > them. So it's a neat topic to discuss, but getting pretty far off > topic from the topic at hand (locale support in 1.1.4). > > Rich > > Of course. That's why I suggested to define only the interfaces (or hooks, which now I understand are not an option), and not worry about the implementation. zg