# Gestion jour ferrier / Iron day management

**URL:** <https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392>\
**Category:** General\
**Created:** [27 May 2020 22:38 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392 "2020-05-27T22:38:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [27 May 2020 22:38 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/1 "2020-05-27T22:38:18Z")

</div>

Salut à tous

j'ai installé ce node:

> **[node-red-contrib-german-holidays](https://flows.nodered.org/node/node-red-contrib-german-holidays)**
>
> NodeRED nodes to get holidays or special days (not even german holidays)

mais je n'arrive pas à le faire fonctionnée

merci pour votre aide

Hi all

I installed this node: [https://flows.nodered.org/node/node-red-contrib-german-holidays](https://flows.nodered.org/node/node-red-contrib-german-holidays)

but i can't get it to work

Thanks for your help

---

<div class="post-metadata">

**Author:** ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)\
**Post date:** [28 May 2020 01:18 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/2 "2020-05-28T01:18:37Z")

</div>

What hardware are you running Node-RED on?  
What operating system are you using?  
Did you try and install the node?  
Were there any errors when you installed the node?  
What did the errors say?  
Did try and use their example flow?  
Were there any errors?  
Did you use any debug nodes?  
Were there any errors or helpful messages in the debug nodes?  
What flows have you tried? (Reminder to use three ``` marks to post your flows to the forums).

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 01:42 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/3 "2020-05-28T01:42:02Z")

</div>

Sur : Radpberry Pi 3  
Et j’ai pas d’erreurs.

Mai quand je crée un jour férié pour tester , j’ai comme résultat faux

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 01:47 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/4 "2020-05-28T01:47:09Z")

</div>

Pour les jours fériée: c’est France GUADELOUPE

---

<div class="post-metadata">

**Author:** ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)\
**Post date:** [28 May 2020 01:48 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/5 "2020-05-28T01:48:11Z")

</div>

Did you try and add a 'pre defined non-holiday' or an existing holiday in your test?  
Did you note that you can only add one pre defined holiday?

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 02:07 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/6 "2020-05-28T02:07:09Z")

</div>

| Guadeloupe | 2020 | 2021 | 2022 |
| --- | --- | --- | --- |
| Jour de l'an | mercredi 1er janvier | vendredi 1er janvier | samedi 1er janvier |
| Lundi de Pâques | lundi 13 avril | lundi 5 avril | lundi 18 avril |
| Fête du Travail | vendredi 1er mai | samedi 1er mai | dimanche 1er mai |
| Victoire des alliés | vendredi 8 mai | samedi 8 mai | dimanche 8 mai |
| Jeudi de l'Ascension | jeudi 21 mai | jeudi 13 mai | jeudi 26 mai |
| Lundi de Pentecôte | lundi 1er juin | lundi 24 mai | lundi 6 juin |
| Abolition de l'esclavage | mercredi 27 mai | jeudi 27 mai | vendredi 27 mai |
| Fête nationale | mardi 14 juillet | mercredi 14 juillet | jeudi 14 juillet |
| Assomption | samedi 15 août | dimanche 15 août | lundi 15 août |
| La Toussaint | dimanche 1er novembre | lundi 1er novembre | mardi 1er novembre |
| Armistice | mercredi 11 novembre | jeudi 11 novembre | vendredi 11 novembre |
| Noël | vendredi 25 décembre | samedi 25 décembre | dimanche 25 décembre |

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 02:24 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/7 "2020-05-28T02:24:38Z")

</div>

![oli01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/7/47f4b35ea9f85f14656d41b5bf2d6a97dfe63fd9.jpeg)

yesterday: object

today: object

id: "05-27"

name: "Wednesday"

nameAlt: "Wed"

character: 0

dayOfWeek: 3

day: 27

month: 4

naturalMonth: 5

year: 2020

date: "2020-05-28T02:23:03.175Z"

ts: 1590552000000

tsUTC: 1590624000000

dateString: "2020-05-27"

dateISOString: "2020-05-28T02:23:03.175Z"

characteristics: array[0]

equals: function

type: array[1]

isSunday: false

isSaturday: false

isHoliday: false

isSpecialday: false

isWeekend: false

isSunOrHoliday: false

isWeekendOrHoliday: false

isHolidayOrSpecialday: false

isBetweenSundayAndHoliday: false

isBetweenHolidayAndSaturday: false

isBetweenWeekendOrHoliday: false

isCurrentOrBetweenWeekendOrHoliday: false

---

<div class="post-metadata">

**Author:** ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)\
**Post date:** [28 May 2020 03:19 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/8 "2020-05-28T03:19:32Z")

</div>

I imported the node and the test flow.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/3/d3381a6fc26aea1396fa78230e05fbe1af076795.png)

The node seems to work fine.

What is the error you are seeing?

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 04:14 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/9 "2020-05-28T04:14:19Z")

</div>

N’importe quelle date, comme  
Vous voulez

---

<div class="post-metadata">

**Author:** ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)\
**Post date:** [28 May 2020 10:46 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/10 "2020-05-28T10:46:54Z")

</div>

I added any date I wanted, and it works fine.  
You still have not told us what is not working for you.  
You still have not provided any debug information on what is not working for you.

Here is my add any date test as you requested.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/5/1574f408aee58e214abe3bd74dfc611c7bbbc594.png)

---

<div class="post-metadata">

**Author:** ![Hypnos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hypnos/32/7566_2.png) [@Hypnos](https://discourse.nodered.org/u/Hypnos)\
**Post date:** [28 May 2020 15:46 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/11 "2020-05-28T15:46:13Z")

</div>

Hallo,

Maybe you have to specify a name for the day.

Regards  
Hypnos

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 16:20 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/12 "2020-05-28T16:20:02Z")

</div>

> [@thebaldgeek](#):
>
> I added any date I wanted, and it works fine.  
> You still have not told us what is not working for you.  
> You still have not provided any debug information on what is not working for you.

Quel est la variable déclencheur ?

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 16:39 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/13 "2020-05-28T16:39:16Z")

</div>

```auto
[{"id":"b1534891.5c6008","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"11086773.f2e2c9","type":"function","z":"b1534891.5c6008","name":"Relais n°7","func":"if(flow.get(\"updatingNow1\") === true) {\n flow.set(\"updatingNow1\",false);\n return;\n}\nif(flow.get(\"updatingNow2\") === true) {\n flow.set(\"updatingNow2\",false);\n return;\n}\n\n\nmsg.host = flow.get(\"host\");\nmsg.community = flow.get(\"password\");\nmsg.varbinds = [\n {\n \"oid\": msg.payload.indexOf(\"54\") != -1 ? \"1.3.6.1.4.1.42505.9.2.2.7.0\" : \"1.3.6.1.4.1.42505.9.2.2.7.0\",\n \"type\": \"Integer\",\n \"value\": msg.payload.indexOf(\"ON\") != -1 ? 1 : 0\n }\n\n\n\n]\n\nreturn msg;","outputs":2,"noerr":0,"x":650,"y":140,"wires":[[],[]]},{"id":"54512de8.c05314","type":"inject","z":"b1534891.5c6008","name":"","topic":"","payload":"msg.payload.today","payloadType":"str","repeat":"","crontab":"05 00 * * *","once":false,"onceDelay":0.1,"x":220,"y":140,"wires":[["189228a.9f0c2d7"]]},{"id":"189228a.9f0c2d7","type":"german-holidays","z":"b1534891.5c6008","name":"","topic":"","region":"","holidays":[],"specialdays":[{"id":"tes jmd","name":"tes jmd","nameAlt":"tes jmd","character":0,"month":5,"day":28,"nth":4,"dow":1},{"id":"test 2","name":"test 2","nameAlt":"","character":0,"month":5,"day":30,"nth":4,"dow":2}],"x":440,"y":140,"wires":[["11086773.f2e2c9"]]}]

```

54=ON \>\>\> ON  
54=OFF \>\>\> OFF

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 17:50 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/14 "2020-05-28T17:50:11Z")

</div>

![oli02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/8111b95dbf6138094b48105eb014eeed05a41c49.jpeg)

---

<div class="post-metadata">

**Author:** ![Hypnos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hypnos/32/7566_2.png) [@Hypnos](https://discourse.nodered.org/u/Hypnos)\
**Post date:** [28 May 2020 17:54 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/15 "2020-05-28T17:54:48Z")

</div>

For me it will take a few days before I can test that. For me the node runs without problems and so far nobody else has reported a problem to me.

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 18:10 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/16 "2020-05-28T18:10:29Z")

</div>

J’ai pas de problème de fonctionnement, mai un problème d’utilisation.

Je cherche la variable Déclencheur. true ou false

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [28 May 2020 18:42 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/17 "2020-05-28T18:42:07Z")

</div>

msg.payload.isSpecialday = day-object\* only available if the day is a special day. ( `isSpecialday` is true.)

![oli03](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1d6281eb68d9049329e79476fc5b6cc5e1eb0a43.jpeg)

---

<div class="post-metadata">

**Author:** ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)\
**Post date:** [29 May 2020 02:01 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/18 "2020-05-29T02:01:25Z")

</div>

Correct.  
You are only checking for one condition in your switch node.  
You should check for both and handle if the today is not special.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/4668cc80b788dddc5f540130f71166b8502e8d97.png)

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [29 May 2020 04:22 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/19 "2020-05-29T04:22:07Z")

</div>

Question

j'ai fait test pour le 29 mai 2020

à 0:clock10: isHoliday = false  
Je ne comprends pas

 ![oli05](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/7/d77e6a8f1fe40fe95f43d31cb4758ec0650c193d.jpeg)

---

<div class="post-metadata">

**Author:** ![971JMD](https://avatars.discourse-cdn.com/v4/letter/9/b77776/32.png) [@971JMD](https://discourse.nodered.org/u/971JMD)\
**Post date:** [30 May 2020 03:54 UTC](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392/20 "2020-05-30T03:54:41Z")

</div>

sorry to bother you  
I'm starting to understand the beast

What is the difference between define holidays and define special days

 ![oli07](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/db8aff681c606d5f1e8b201c3057752c2023c0f6.jpeg)

If I understand correctly in my example Jun 10 is = vacancy from Jun 9 until midnight

![oli08](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/2/6235b961c1ba8d5c85e4aeb7b0b69398c56d3fca.jpeg)

I can't create a function for,

if(msg.payload.today.isHoliday === "true"){  
msg.payload = ("54=ON");

}

return msg;

[Next page](https://discourse.nodered.org/t/gestion-jour-ferrier-iron-day-management/27392.md?page=2)
