Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

QCAL / iso8601 holidays.ini - POLAND

Jun
98
0
Feel free to add:

[Poland]
*-01-01 ; Nowy Rok
(2011) *-01-06 ; Święto Trzech Króli
%@easter[] ; Pierwszy dzień Wielkiej Nocy
%@easter[,,,1] ; Drugi dzień Wielkiej Nocy
(1950) *-05-01 ; Święto Państwowe
(1990) *-05-03 ; Święto Narodowe Trzeciego Maja
%@easter[,,,50] ; Pierwszy dzień Zielonych Świątek
%@easter[,,,60] ; Dzień Bożego Ciała
*-08-15 ; Wniebowzięcie Najświętszej Marii Panny
*-11-01 ; Uroczystość Wszystkich Świętych
(1989) *-11-11 ; Narodowe Święto Niepodległości
*-12-25 ; Pierwszy dzień Bożego Narodzenia
*-12-26 ; Drugi dzień Bożego Narodzenia


Btw: Probably forum address was changed. For example: in http://prospero.unm.edu/plugins/popupfix.html#licensing

 
Below are the settings for the Republic of Hungary

Code:
[Hungary]
*-01-01                                ; Újév
*-01-06                                ; Vízkereszt
(1848) *-03-15                        ; Márciusi Forradalom
%@easter[,,,-47]                      ; Húshagyó kedd
%@easter[,,,-46]                      ; Hamvazó szerda
%@easter[,,,-7]                        ; Virágvasárnap
%@easter[,,,-5]                        ; Nagykedd
%@easter[,,,-4]                        ; Nagyszerda
%@easter[,,,-3]                        ; Nagycsütörtök
%@easter[,,,-2]                        ; Nagypéntek
%@easter[,,,-1]                        ; Nagyszombat
%@easter[]                            ; Húsvét
%@easter[,,,1]                        ; Húsvét hétfő
%@easter[,,,39]                        ; Áldozócsütörtök
%@easter[,,,49]                        ; Pünkösd
%@easter[,,,50]                        ; Pünkösd hétfő
*-05-01                                ; Munka ünnepe
*-08-20                                ; Szent István
(1849) *-10-06                        ; Aradi vértanúk
(1956) *-10-23                        ; 1956-os Forradalom
*-10-31                                ; Reformáció napja
*-11-01                                ; Mindszentek
*-11-02                                ; Halottak napja
(1956) *-11-04                        ; Nemzeti Gyász Emléknapja
*-12-06                                ; Mikulás
*-12-24                                ; Karácsony este
*-12-25                                ; Karácsony
*-12-26                                ; Karácsony másodnapja
*-12-31                                ; Szilveszter
 
Sorry the process of moving from ediitor to Forum mixed up the vertical alignment of the comments. Could not see until it was posted.
 
While we're at this, here goes Chile - straight from the fingers of the expert in the subject (which happens to be me).

[Chile]
; Only holidays from 1990 onwards are defined here. Information extracted
; from http://www.feriadoschilenos.cl/ by its author.
(1990) *-01-01 ; Año Nuevo
(1990) %@easter[,,,-2] ; Viernes Santo
(1990) %@easter[,,,-1] ; Sábado Santo
(1990) *-05-01 ; Día del Trabajo
(1990-1999) %@easter[,,,60] ; Corpus Christi
(2000-2006) %@easter[,,,57] ; Corpus Christi (trasladado)
(1990) *-05-21 ; Día de las Glorias Navales
(1990-1999) *-06-29 ; San Pedro y San Pablo
(2000) *-06-29 ; San Pedro y San Pablo (trasladado) XXX - See note 1.

(2007) *-07-16 ; Virgen del Carmen
(1990) *-08-15 ; Asunción de la Virgen
(1999-2001) %@holiday[1,1,9,*] ; Día de la Unidad Nacional [primer lunes de septiembre]
(1990-1998) *-09-11 ; Aniversario de la Liberación Nacional
(2007) *-09-17 MONDAY ; Día de la Libación Nacional XXX - See note 2.

(2007) *-09-20 FRIDAY ; Día de la Libación Nacional XXX - See note 2.
(1990) *-09-18 ; Día de la Independencia Nacional
(1990) *-09-19 ; Día de las Glorias del Ejército
(1990-1999) *-12-10 ; Aniversario del Descubrimiento de América
(2000) *-12-10 ; Encuentro de Dos Mundos (trasladado) XXX - See note 1.

(2008) *-10-31 ; Día Nacional de las Iglesias Evangélicas y Protestantes XXX - See note 3.
(1990) *-11-01 ; Día de Todos los Santos
(1990) *-12-08 ; Inmaculada Concepción de la Virgen
(1990) *-12-25 ; Navidad
1992-04-22 ; XVI censo nacional de población y V de vivienda
1999-12-31 ; celebraciones por la llegada del nuevo milenio [sic]
2002-04-24 ; XVII censo nacional de población y VI de vivienda
2004-09-17 ; sandwich dieciochero
2007-09-17 ; sandwich dieciochero
2010-09-17 ; fiestas patrias en el bicentenario
2010-09-20 ; fiestas patrias en el bicentenario

; NOTE 1: I don't know how to write the proper rule for these two holidays:
; in both cases you start with the base date (29 June or 12 October), then,
; if that day is a Tuesday, Wednesday or Thursday, the holiday is moved to
; the preceding Monday; if it's a Friday, it's moved to the following Monday
; (if it's Monday, Saturday or Sunday, no change is made).
;
; NOTE 2: Another problem here. the law declares this holiday if it's a
; MONDAY 17 September or a FRIDAY 20 September.
;
; NOTE 3: Similar to note 1. Start with the 31 October base date. If it's a
; Tuesday, move it to the preceding Friday; if it's a Wednesday, move it to
; the following Friday.


Seems to me the five rules with problems will need extra coding in the plugin.
 
My submission for Hungary is only for currently observed "special days". Many are not legal holidays, such as most of the days of "holy week" (Palm Sunday to Easter Monday). During communist rule (approx. 1948-1989) there had been many communist holidays added, some others renamed, some (esp. religious ones) not observed in the state's legal calendar, but Hungarians in exile observed those listed.
 
; NOTE 1: I don't know how to write the proper rule for these two holidays:
; in both cases you start with the base date (29 June or 12 October), then,
; if that day is a Tuesday, Wednesday or Thursday, the holiday is moved to
; the preceding Monday; if it's a Friday, it's moved to the following Monday
; (if it's Monday, Saturday or Sunday, no change is made).
;
; NOTE 2: Another problem here. the law declares this holiday if it's a
; MONDAY 17 September or a FRIDAY 20 September.
;
; NOTE 3: Similar to note 1. Start with the 31 October base date. If it's a
; Tuesday, move it to the preceding Friday; if it's a Wednesday, move it to
; the following Friday.


Seems to me the five rules with problems will need extra coding in the plugin.

Miguel:

I've uploaded an updated build which I think should handle this stuff correctly. Please test! Once you're satisfied that it works correctly, I'll document the changes to @INLIEU. Thanks!
 
Miguel:

I've uploaded an updated build which I think should handle this stuff correctly. Please test! Once you're satisfied that it works correctly, I'll document the changes to @INLIEU. Thanks!

I've begun testing this. I've already detected two errors (mine, actually):

(1990-1999) *-12-10 ; Aniversario del Descubrimiento de América
(2000) %@inlieu[*-12-10,,4] ; Encuentro de Dos Mundos (trasladado)

Both should say 10-12 (October 12, not December 10).

I'll publish a full report in a couple days.

Thanks!
 
I've begun testing this. I've already detected two errors (mine, actually):

(1990-1999) *-12-10 ; Aniversario del Descubrimiento de América
(2000) %@inlieu[*-12-10,,4] ; Encuentro de Dos Mundos (trasladado)

Both should say 10-12 (October 12, not December 10).

I'll publish a full report in a couple days.

Thanks!

I've done more testing, and I have a serious problem: how do I tell QCAL to use my country? QCAL is using the default definitions instead of the Chile ones. So is %@isholiday[].

What is the proper way to explicitly state the country? Is it %@isholiday[22-04-2004,,"Chile"] ? For my first test, I'm running this small BTM:

@echo off

echo ============

do i = 0 to 364
echo %@dateplus[01-01-2013, %i] %@isholiday[%@dateplus[01-01-2013, %i]]
enddo

echo ============

do i = 0 to 364
echo %@dateplus[01-01-2013, %i] %@isholiday[%@dateplus[01-01-2013, %i],,"Chile"]
enddo

echo ============


Executing it as qcc | grep 1$ yields:

01/01/2013 1
21/01/2013 1
18/02/2013 1
31/03/2013 1
12/05/2013 1
27/05/2013 1
16/06/2013 1
04/07/2013 1
02/09/2013 1
14/10/2013 1
31/10/2013 1
11/11/2013 1
28/11/2013 1
25/12/2013 1
31/12/2013 1
01/01/2013 1
21/01/2013 1
18/02/2013 1
31/03/2013 1
12/05/2013 1
27/05/2013 1
16/06/2013 1
04/07/2013 1
02/09/2013 1
14/10/2013 1
31/10/2013 1
11/11/2013 1
28/11/2013 1
25/12/2013 1
31/12/2013 1


This seems to correspond to the default holidays in both cases. I even commented out the [United States] sections without luck.

Also: I haven't been able to test this yet, but I suspect the three %@inlieu rules will output incorrect results.

Also also: Chilean law states that all Sundays are holidays. That means that a rule like %@if[%@dowi[*-*-*] == 1,*-*-*,] (did I get this right?) should be added.

Also also also: comment nitpicking: the "XXX" string should be erased; both rules with %@dowi should say "Libación", not "Liberación".
 
I've done more testing, and I have a serious problem: how do I tell QCAL to use my country? QCAL is using the default definitions instead of the Chile ones. So is %@isholiday[].

What do you get if you do
Code:
echo %@winapi[kernel32.dll,GetLocaleInfoW,1024,4098,BUFFER,128]

What is the proper way to explicitly state the country? Is it %@isholiday[22-04-2004,,"Chile"] ?

Yes, that's good. For QCAL, you can use the (undocumented?) /C option: QCAL /C:CHILE

Also also also: comment nitpicking: the "XXX" string should be erased; both rules with %@dowi should say "Libación", not "Liberación".

Sorry, my error -- I had assumed those were typos and "corrected" them.
 
What do you get if you do
Code:
echo %@winapi[kernel32.dll,GetLocaleInfoW,1024,4098,BUFFER,128]

servero 0 C:\Program Files\JPSoft\TCMD15x64>echo %@winapi[kernel32.dll,GetLocaleInfoW,1024,4098,BUFFER,128]
Chile

servero 0 C:\Program Files\JPSoft\TCMD15x64>echo _%@winapi[kernel32.dll,GetLocaleInfoW,1024,4098,BUFFER,128]_

_Chile_

servero 0 C:\Program Files\JPSoft\TCMD15x64>


Yes, that's good. For QCAL, you can use the (undocumented?) /C option: QCAL /C:CHILE

I erased the plugin and associated files, and tried it again from scratch. Now it works! I guess the first time around something went bonkers and the DLL couldn't "see" the INI file.

I've corrected the Oct. 12 rules and will do my tests now.
 
What am I doing wrong now?

I'm running this BTM:

@echo off

do i = 0 to 146096
echo %@dateplus[1990-01-01, %i, 4] %@isholiday[%@dateplus[1990-01-01, %i, 4]]
enddo


and getting:

ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-01 1
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-02 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-03 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-04 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-05 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-06 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-07 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-08 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-09 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-10 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-11 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-12 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-13 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-14 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-15 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-16 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-17 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-18 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-19 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-20 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-21 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-22 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-23 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-24 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-25 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-26 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-27 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-28 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-29 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-30 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-01-31 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-02-01 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-02-02 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-02-03 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-02-04 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-02-05 0
ISO8601 plugin: C:\Users\Miguel\Documents\qc.btm [4] Invalid date "1990-1990-1990"
1990-02-06 0
^C

Huh?
 
I think you have a "*-*-*" in Holidays.ini somewhere.

Yup. I added this rule:

(1990) %@if[%@dowi[*-*-*] == 1,*-*-*,]

in an attempt to mark all Sundays as holidays (Chilean law says so). Should it be: (1990) %@if[%@dowi[*] == 1,*,] ?

I've done my tests. Besides the above, and the October 12 errors in my submission, everything is fine (contrary to my expectations, as I expected the %@inlieu-based rules to have problems). Good work, Charles!
 
Last edited:
While we're at it, we should add three (commented-out) extra rules for Chilean bank holidays. For financial institutions (banks, etc.), bank holidays are to be treated just as regular holidays - users with a financial background will want to uncomment them.

(1990) %@if[%@dowi[*] == 6,*,] ; feriado bancario sabatino
(1990-1996) *-12-31 ; feriado bancario de fin de año
(1998) *-12-31 ; feriado bancario de fin de año


(6 is Saturday, right?)
 
Yup. I added this rule:

(1990) %@if[%@dowi[*-*-*] == 1,*-*-*,]

in an attempt to mark all Sundays as holidays (Chilean law says so). Should it be: (1990) %@if[%@dowi[*] == 1,*,] ?

I don't have any good way to do that, but QCAL should highlight Sundays by default. (The Holidays.ini mechanism is limited to 64 holidays per year for performance reasons -- QCAL calls that function a lot. And a year has at least 52 Sundays....)

If you want to test a date for Chilean holiday-hood in a batch file, I guess you'd need to check both @ISHOLIDAY and @DOWI.
 
Back
Top