From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Swedish calendar localization in official release (sv-kalender.el)? Date: Mon, 05 Jul 2021 22:58:05 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38878"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Emacs developers To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 05 23:05:00 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0Vm0-0009s5-A3 for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Jul 2021 23:05:00 +0200 Original-Received: from localhost ([::1]:39466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0Vlz-0000hl-3p for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Jul 2021 17:04:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0VkJ-00074R-Ss for emacs-devel@gnu.org; Mon, 05 Jul 2021 17:03:15 -0400 Original-Received: from mail-am6eur05olkn20822.outbound.protection.outlook.com ([2a01:111:f400:7e1b::822]:3169 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0VkG-0001rE-PO for emacs-devel@gnu.org; Mon, 05 Jul 2021 17:03:15 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AY7pxwLPrezN/SeJL6PtAgwIwSdAXHQj7ITG0jqyg7YBc55wfcWAqVaGVvIcpvt/Ai+j6GemqPyra/PWODdOAzRMr+JqQEkphB5YIQ3mRVQEVYAQGq6syw/KW4AX3Ogh0kd1m9Ry9YC0EncwwlxxpVAGLzsJ+IyrwWiEJquEG5qL7CV2RJBN3T7LHFj9GOVSK0EeAuYFhylyJuMBewtMYyNedYVczRFsrsJbYyiiGC2CPqjh6TBKqm7r1+aemKoWujKmJ6ny5U9j+3lcSm2RHpeeUMUzyUtcch6HajWC7A9pWjTxV1TUv5WvKt1sBebBGPPflpUVcYPcCSi8hFQdKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RLZGWPKfU7zpCztWqc1E9/K/Qhk2GOJQlKsQbTMP9hA=; b=jaztWL1E5jkCnzXUI86uKp7AcT00q2PNbp0cyDfXQUP0eULwUgOvSVFEpT5VR1K4PcFaLF2Q3DV/NhanaU/zPOu39/VOcwXt+pNcEj5AG6cQ0kdnG0hm+X4dAkQXhJftp3WSeZnZy17ajYRs9aPAnT4m2edNR0noERVZYAW+OZZt2fO3ZgVPHRxq7oNpy5DWjyTOGMcldOpL7HrV2iJPBHI1WdkJ2cTqetH5HWN/p6NTtKuvQ657BTTqmSzStr3GSHynOtI+5nmJNb734/GfPegwoPAGoQqqTJYoNnu2nLskQk9dG8nO4kxCI84OzBlyL1f1ZlhviCo+XOg6+xn0tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RLZGWPKfU7zpCztWqc1E9/K/Qhk2GOJQlKsQbTMP9hA=; b=SnZelY3PBCyraZUA6kuad4pVXIETTACx1bfyBIw+eoNliDL59JziRzlDGB/T8ZRGZAAtrEG1dLxXDnOpmkzz4JkQlcKo47MQNQqjrs/LYuudsShSolQnETS0cn8enydrci3cGPX2cvHuJoKUjNPQknXbsHBTQPRyxMXgIQu9f0ZA1CDqShVsiDI0UbZOuybHhKVsl5GMV9p4oAAgMtBCLS7Q8MF0KLsywZuKZtSXQu81xkeU0AT65EvOBxraja2I0jrFWKwa+m4ZDk2LgVQDJisfETigBZBu//1yAai1zcYxTceIBV/cd5LAnWtgtmghvJ8E/pjsryHXkRKrgaRzGw== Original-Received: from AM6EUR05FT036.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::46) by AM6EUR05HT072.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Mon, 5 Jul 2021 20:58:06 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:fc11::41) by AM6EUR05FT036.mail.protection.outlook.com (2a01:111:e400:fc11::478) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Mon, 5 Jul 2021 20:58:06 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:46061E64F65D294FC1979E3C1727B760D82E3E128EAACEA6E1D7EFFA36807D15; UpperCasedChecksum:28D4894EE1B84F0E21064F3D4B00BEF252175168BFA30400C8C5ACAC7A9E9BA6; SizeAsReceived:7619; Count:46 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::656a:1596:f5dc:12ea]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::656a:1596:f5dc:12ea%7]) with mapi id 15.20.4287.033; Mon, 5 Jul 2021 20:58:06 +0000 In-Reply-To: (Stefan Kangas's message of "Mon, 5 Jul 2021 13:51:42 +0200") X-TMN: [/+hGhnCjqzIr1zc8/wVxzjn/qWPyiu7s] X-ClientProxiedBy: AM5PR0402CA0016.eurprd04.prod.outlook.com (2603:10a6:203:90::26) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87wnq4bhr6.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AM5PR0402CA0016.eurprd04.prod.outlook.com (2603:10a6:203:90::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.21 via Frontend Transport; Mon, 5 Jul 2021 20:58:06 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 924bc2cf-bc96-4391-f3d0-08d93ff79669 X-MS-TrafficTypeDiagnostic: AM6EUR05HT072: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RZ5L5yCutG2G7lZ6YSxwRFzhH8zHxuPvat9dVBFTDVMVjTVpGzTmtOl0Y/EaCfSoasdFfcMs5osh+jN9b2FQ/dsbeC5+fjlIQUKMrTy9fWJAkR1XHajrkOg9Bd5KSA2gsuERfwuCk+Dg16V2lzVr00qfpIcVnFeVdYnYmeRADvTB190Cm26fPm/GiGVwBRq7aO2r2FRTR5gEvcbEhgtg5e5GsujoRph9fcTPmlz6S9c9hxYR8/YK12PXy8SfFPr9hy/WBiASlcBuK57jvbkv9TFOaVahSkH069wbYhpR5XDhEBgvnyDDDuWKNgeAVqrM89+vXjKriL43BL08e6/zveOffS/SfWM4cRBu1e0gBe//r7hr96Wcg+AB3MzGNEdH/Fq084SvWYi4CxukFm/aY3IxrB2j5R/oK2NOf429RWLNpWoiEED0EcPrryBB9JaNPkiMlm6vBbGT3qFHfwzgyw2ajoD0mmDQQPDEgyunel4= X-MS-Exchange-AntiSpam-MessageData: wG/QynXUGOGc6qR8RAe+GBZH+/NB2+czfpmJskNjOk/omFDIY/7DFOtCAV1XSvdYqWiQD8h4UJIzJc8ApNHZ6qtm6DVUYeZw5HWnNBRSz7oHMCT3pAwwYbDvJMRUe1ph25Mew0x/HaSkonIT25hIIQ== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 924bc2cf-bc96-4391-f3d0-08d93ff79669 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2021 20:58:06.8249 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM6EUR05FT036.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT072 Received-SPF: pass client-ip=2a01:111:f400:7e1b::822; envelope-from=arthur.miller@live.com; helo=EUR05-AM6-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271143 Archived-At: --=-=-= Content-Type: text/plain Stefan Kangas writes: > Arthur Miller writes: > >> Just a question/suggestion: can we get a localized calendar for swedish >> language into official release? There is a small file by Daniel Jensen, >> found at: http://bigwalter.net/daniel/elisp/. >> >> I did a small hack to it, just added names for abbreviated day names and >> header array since it seems to not be properly initialized if >> sv-kalender is loaded after the calender.el. >> >> In a short mail correspondence with Daniel, he says he has signed FSF >> copyrights, so I guess, legaly it shouldn't be a problem to include that >> file amongst few other localizations in lisp/calender? > > I support this proposal. If there are no legal issues, for me it's a > no-brainer that this file (and some similar ones) should be included > in Emacs itself. I don't know if others agree, but I have myself been > wondering why sv-kalender.el is not just part of Emacs. If you are > living in Sweden, the calendar is next to useless for many kinds of > planning if you don't have that library loaded. > > The only drawback I see is that sometimes people stop maintaining > things once they are merged into Emacs. I'm not sure what could be > done about that, or if others here even share that concern. Perhaps > we could set it up as a GNU ELPA core package? Or perhaps I'm worried > for no reason. > > In any case, we should specifically ask the current maintainer to > continue maintaining it inside of Emacs, and make it clear that we > have no extra resources or volunteers on our end that can really help > with that. Our motivation should be made clear: it is simply to > distribute this useful library to more users. Agree, but being part of Emacs gives advantage that potentially more people will use it, and thus more likely that someone will repport a bug or contribute fix/improvement. I have forgott to cc Daniel in this mail, so I filed a bug repport/suggest where I have CC him, so we can ask him. >> Maybe the >> name of the file itself should be adjusted, like calender-swedish.el or >> something? > > (I don't know which conventions could be useful here, but note that > Swedish is also spoken in Finland.) Yes of course, I meant something like calendar-LANGCODE.el, so say calendar-sv_SE.el or calendar-sv_FI.el, so Emacs could choose to load appropriate file based on value in LANG env. >> Also a side question about localizations as found on Emacs Wiki: >> >> https://www.emacswiki.org/emacs/CalendarLocalization >> >> I can't imagine that day and month names and few other bits related to >> that information can be copyrighted. Would ot be interesting to >> collect info from that wiki page into some file with localized names >> and maybe have Emacs auto load localized names when avialable based on >> value in LANG env (or whatever variable is suitable), and a variable to >> turn on/off that behaviour? > > From my perspective, the most useful part here is the code to > calculate when the national holidays are, as the rules for that can be > quite finicky. (See sv-kalender.el for example.) Indeed. I adapted yesterday Daniel's code to croatian language. Partly because I haven't seen it in the list on Wiki, partly to learn a bit more about calendar. What I have noticed immidiately about hollidays, even those that has to be calculated like Easter, are actually very same for different countries. I mean croats are mostly catholics, and catholic easter is same date as protestant's since it is calculated by the same calendar. I guess same follows for say Russian/Serbian/Greek calendar. So what really has to be translated are just names of those hollidays. Compare attached adaptation from sv-kalender to the attached calender-hr.el. > Including lists of month names and so on in various languages could > also be useful, but we should make sure to do it in a clean way. I was thinking bit of it today, and as I see, ther are mostly strings that needs to be localized, since for the most part calculations are already included in Emacs. As I see there are: 1) strings for the day and month names and their abbreviations that every language has to set. Those appear in the calendar buffer when user runs calendar. 2) date string has to be adapted to the locale. 3) names of religious hollidays, lunar/solar phases etc has to be translated. Calculations can be re-used (somehow). For catholic hollidays are same dates in most europian countries (? am I correct, I am not 100% but I have faith in this :)). Not all are celebrated or equally important in every country, but thay all have names. 4) country specific hollidays, usually official hollidays have to be calculated. This are usually fixed, and can't be translated since they are specific for each country 5) some hardcoded strings in calendar.el that appear in minibuffer or elsewhere. I haven't seen any of localizations translate those, but it would be icing on the cake if we that could be done too :). It would be nice if we could somehow translate only strings to avoid duplication of code as we see now in different translations. I am not sure how to do this. Easy one is to re-declare everything as it is done now by different localizations. That excludes hardcoded strings as in 5). I am though thinking of something else, but I am not sure if it would be possible: a minor mode that translates strings as found in symbols automatically. Say if I give it a function or a variable name, it would look up a list in the function value of a symbol and patch all the strings in that list by replacing list element with its translation? Say something like: (translate-var 'holliday-general-hollidays '((list-from1 . list-to1) (list-from2 . list-to2) ... (list-fromN . list-toN))) And similar `translate-fn'. A variation would be to populate some hash-map with strings list-to1, ... list-toN, and use list-from1, ... , list-fromN as keys for lookup. I could then define a minor mode,, say calendar-localize-hr, and call translate function on bunch of symbols where I just need to specify those pairs for translations. I mean that just as a rough sketch of the idea, I understand it would be complicated in practice, but would this be possible to do in Elisp? I mean, in interpreated code it should be possible, but I am not sure if it would work with native compiler? Thus a translation would specify name of symbol to translate and list of pairs to serve as a lookup/translation. It could also be used to undo translation if mode is unloaded. Would of course work only from/to the english language but wouldn't require existing code to be changed, and could be used elsewhere in Emacs for localizations? > Even just including sv-kalender.el (renamed to something suitable) so > that a person living in Sweden can just (require 'sv-kalender) and be > done with it is a useful step forward, I think. I agree. It would be even nicer it this could be required automatically by Emacs, say based on a value of some variable in customize. I see a lot of manual repetition which to me seems a bit unnecessary. Why should every user have to retype this, when it can be done once only. > Thanks for looking into this. I hope we can see some results for Emacs 28. Thanks for the input and response, I appolgozie for the very long mail. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=calendar-hr.el Content-Transfer-Encoding: quoted-printable ;;; calendar-hr.el --- Croatian calendar for Emacs -*- lexical-binding: t; = -*- ;; Copyright (C) 2021 Daniel Jensen, Arthur Miller ;; Author: Arthur Miller ;; Author: Daniel Jensen ;; Version: 1.0-hr ;; Keywords: calendar croatian localization ;; This file is not part of GNU Emacs. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; Croatian calendar localization. ;; This work is adapted versoio of the work by D. Jensen for the Swedish ;; calendar: http://bigwalter.net/daniel/elisp/ ;;=20 ;; The calendar modifies names of days, months, and their abbrevs from thei= r ;; English names to Croatian names. It also adds Croatian hollidays instead= of ;; US ones. ;; ;; To use this file, save it somewhere in Emacs load-path and (load ;; "calendar-hr") in your Emacs init file. ;;; Changelog ;; 1.0-hr - Adapted to Croatian version. ;; 1.9.1 - added provide statement ;; 1.9 - Update for Emacs 25 ;; 1.8 - Emacs 23 support. GPLv3. ;; 1.6 - Lunar phase names, sunrise/sunset ;; (m=C3=A5nfasernas namn, soluppg=C3=A5ng och -nedg=C3=A5ng) ;; 1.5 - Cleanup, introduce sv prefix (st=C3=A4dning, nytt hr-prefix) ;; 1.4 - Months and days use lower-case initials ;; (m=C3=A5nader och dagar med sm=C3=A5 begynnelsebokst=C3=A4ver) ;; 1.3 - New flag days, Easter bug fixes ;; (nya flaggdagar och en bugg i "mer p=C3=A5sk" fixad) (Alan Campbel= l) ;; 1.2 - Advent Sundays fixed (adventsdagarna justerade) (Alan Campbell) ;; 1.1 - Fat Tuesday moved back a week (fettisdagen flyttad en vecka bak=C3= =A5t). ;;; Code: (require 'calendar) (require 'holidays) (require 'solar) (require 'lunar) (defcustom calendar-hr-prefer-slavic-names t "If this variable is set to `t', names used for months are traditional sl= avic names as found in croatian language: Sije=C4=8Danj, Velja=C4=8Da, etc. If= this variable is nil, then names used are based on international names: Januar, Februar= etc." :type 'boolean :group 'calendar) (defvar calendar-month-names-genitive nil "Declension of month-names for genitive casus.") ;; The week starts with Monday (setq calendar-week-start-day 1) ;; Use Europian style when printed (setq calendar-date-style 'european) ;; Dateformat (setq calendar-date-display-form '((if dayname (concat dayname ", ")) day ". " (hr-month-filter monthname) " " year)) ;; 24-hour clock without a timezone (setq calendar-time-display-form '(24-hours ":" minutes)) ;; get genitive casus form for the month name (defun hr-month-filter (date) (catch 'done (let ((i 0)) (while (< i 12) (when (equal date (aref calendar-month-name-array i)) (throw 'done (aref calendar-month-names-genitive i))) (setq i (1+ i)))))) ;; Dagarnas namn (setq calendar-day-name-array ["nedjelja" "ponedjeljak" "utorak" "srijeda" "=C4=8Detvrtak" "petak" = "subota"] calendar-day-abbrev-array ["ned" "pon" "uto" "srj" "=C4=8Det" "pet" "sub"] calendar-day-header-array ["nd" "pn" "ut" "sr" "=C4=8Dt" "pt" "sb"]) ;; Month names (setq calendar-month-name-array (if calendar-hr-prefer-slavic-names ["sije=C4=8Danj" "velja=C4=8Da" "o=C5=BEujak" "travanj" "svibanj"= "lipanj" "srpanj" "kolovoz" "rujan" "listopad" "studeni" "prosinac"] ["januar" "februar" "mart" "april" "maj" "jun" "jul" "avgust" "septem= bar" "oktobar" "novembar" "decembar"])) (setq calendar-month-names-genitive (if calendar-hr-prefer-slavic-names ["sije=C4=8Dnja" "velja=C4=8De" "o=C5=BEujka" "travnja" "svibnja"= "lipnja" "srpnja" "kolovoza" "rujna" "listopada" "studenog" "prosinca"] ["januara" "februara" "marta" "aprila" "maja" "juna" "jula" "avgusta"= "septembra" "oktobra" "novembra" "decembra"])) (eval-after-load "solar" '(setq solar-n-hemi-seasons '("Proljetna ravnodnevica" "Ljetni suncostaj" "Jesenska ravnodnevica" "Zimski suncostaj"))) ;; Lunar phases (defadvice lunar-phase-name (around hr-lunar-phase-name activate) "Mjese=C4=8Deve mjene na hrvatskom." (setq ad-return-value (let ((phase (ad-get-arg 0))) (cond ((=3D 0 phase) "Mladi mjesec") ((=3D 1 phase) "Prva =C4=8Detvrt") ((=3D 2 phase) "Puni mjesec") ((=3D 3 phase) "Posljednja =C4=8Detvrt"))))) ;; Sunrise and sunset (defadvice solar-sunrise-sunset-string (around hr-solar-sunrise-sunset-stri= ng activate) "Izlazak i zalazak Sunca na hrvatskom." (setq ad-return-value (let ((l (solar-sunrise-sunset date))) (format "%s, %s u %s (%s sati dnevnog svijetla)" (if (car l) (concat "Sunce iza=C5=A1lo " (apply 'solar-time-string (car = l))) "bez sun=C4=8Devog izlaska") (if (car (cdr l)) (concat "Sunce za=C5=A1lo " (apply 'solar-time-string (car (= cdr l)))) "bez sun=C4=8Devog zalaska") (eval calendar-location-name) (car (cdr (cdr l))))))) ;; Do not show some holidays (defvar hr-hide-some-holidays nil "Non-nil means some holidays won't show in the calendar.") ;; Uskr=C5=A1nji dan (from holiday-easter-etc) (defun hr-easter (year) "Calculate the date for Easter in YEAR." (let* ((century (1+ (/ year 100))) (shifted-epact (% (+ 14 (* 11 (% year 19)) (- (/ (* 3 century) 4)) (/ (+ 5 (* 8 century)) 25) (* 30 century)) 30)) (adjusted-epact (if (or (=3D shifted-epact 0) (and (=3D shifted-epact 1) (< 10 (% year 19)))) (1+ shifted-epact) shifted-epact)) (paschal-moon (- (calendar-absolute-from-gregorian (list 4 19 year)) adjusted-epact))) (calendar-dayname-on-or-before 0 (+ paschal-moon 7)))) (setq holiday-general-holidays '((holiday-fixed 1 1 "Nova godina") (holiday-fixed 1 6 "Bogojavnljenje ili Sveta tri kralja") (holiday-fixed 5 1 "Praznik rada") (holiday-fixed 5 30 "Dan dr=C5=BEavnosti") (holiday-fixed 6 22 "Dan antifa=C5=A1isti=C4=8Dke borbe") (holiday-fixed 8 05 "Dan pobjede i Dan hrvatskih branitelja") (holiday-fixed 8 15 "Velika Gospa") (holiday-fixed 11 1 "Svi sveti") ;; fixed holliday in Croatia=20 (holiday-fixed 11 18 "Dan sje=C4=87anja na =C5=BErtve Domovinskog r= ata") (holiday-fixed 12 25 "Bo=C5=BEi=C4=87") (holiday-fixed 12 26 "Sveti Stjepan") ;; Uskrs i Duhovi (holiday-filter-visible-calendar (mapcar (lambda (dag) (list (calendar-gregorian-from-absolute (+ (hr-easter displayed-year) (car dag))) (cadr dag))) '(( -2 "Veliki petak") ( -1 "Velika subota") ( 0 "Uskrs") ( +1 "Uskrsni ponedjeljak") ( +39 "Tijelovo") ( +49 "Duhovi") ( +50 "Duhovski ponedjeljak")))))) (setq holiday-other-holidays '((holiday-fixed 2 14 "Valentinovo") (holiday-fixed 3 8 "Internactionalni dan =C5=BEena") ;; Jo=C5=A1 uskrsa (holiday-filter-visible-calendar (mapcar (lambda (dag) (list (calendar-gregorian-from-absolute (+ (hr-easter displayed-year) (car dag))) (cadr dag))) (if hr-hide-some-holidays '(( -3 "Veliki =C4=8Detvrtak")) '(( -7 "Cvjetnica") ( -3 "Veliki =C4=8Detvrtak"))))) (unless hr-hide-some-holidays (holiday-fixed 4 1 "Prvi april")) (holiday-float 5 0 -1 "Dan majki") (holiday-fixed 10 24 "Dan Ujedinjenih Nacija") (holiday-float 11 0 2 "Dan o=C4=8Deva") (holiday-fixed 11 10 "Martinje") (holiday-float 12 0 -4 "Prvi advent" 24) (holiday-float 12 0 -3 "Drugi advent" 24) (holiday-float 12 0 -2 "Tre=C4=87i advent" 24) (holiday-float 12 0 -1 "=C4=8Cetvrti advent" 24) (holiday-fixed 12 10 "Nobelov dan") (holiday-fixed 12 13 "Dan Svete Lucije") (holiday-fixed 12 24 "Bo=C5=BEi=C4=87") (holiday-fixed 12 31 "Novogodi=C5=A1nja ve=C4=8Der"))) (setq holiday-solar-holidays (if hr-hide-some-holidays nil '((if (fboundp 'atan) (solar-equinoxes-solstices)) (if (progn (require 'cal-dst) t) (funcall 'holiday-sexp calendar-daylight-savings-starts '(format "Ljetno vrijeme po=C4=8Dinje %s" (if (fboundp 'atan) (solar-time-string (/ calendar-daylight-savings-starts-ti= me (float 60)) calendar-standard-time-zone-name) "")))) (funcall 'holiday-sexp calendar-daylight-savings-ends '(format "Zimsko vrijeme po=C4=8Dinje %s" (if (fboundp 'atan) (solar-time-string (/ calendar-daylight-savings-ends-time (float 60)) calendar-daylight-time-zone-name) "")))))) (setq calendar-holidays (append holiday-general-holidays holiday-local-holidays holiday-other-holidays holiday-solar-holidays)) (provide 'calendar-hr) --=-=-=--