<?php
|
/*---------------------------------------------------------------*/
|
/*
|
Titre : Détermine le Saint du jour
|
|
URL : https://phpsources.net/code_s.php?id=383
|
Auteur : Olravet
|
Website auteur : http://olravet.fr/
|
Date édition : 05 Mai 2008
|
Date mise à jour : 11 Aout 2019
|
Rapport de la maj:
|
- fonctionnement du code vérifié
|
- maintenance du code
|
- modification de la description
|
*/
|
/*---------------------------------------------------------------*/
|
function saint($jour,$mois){
|
switch($mois)
|
{
|
case 1:
|
switch($jour)
|
{
|
case 1: $saint = "Jour de l'an";
|
break;
|
case 2: $saint = "St Basile";
|
break;
|
case 3: $saint = "Ste Geneviève";
|
break;
|
case 4: $saint = "St Odilon";
|
break;
|
case 5: $saint = "St Edouard";
|
break;
|
case 6: $saint = "Ste Mélanie";
|
break;
|
case 7: $saint = "St Raymond";
|
break;
|
case 8: $saint = "St Lucien";
|
break;
|
case 9: $saint = "Ste Alix";
|
break;
|
case 10: $saint = "St Guillaume";
|
break;
|
case 11: $saint = "St Paulin";
|
break;
|
case 12: $saint = "Ste Tatiana";
|
break;
|
case 13: $saint = "Ste Yvette";
|
break;
|
case 14: $saint = "Ste Nina";
|
break;
|
case 15: $saint = "St Remi";
|
break;
|
case 16: $saint = "St Marcel";
|
break;
|
case 17: $saint = "Ste Roseline";
|
break;
|
case 18: $saint = "Ste Prisca";
|
break;
|
case 19: $saint = "St Marius";
|
break;
|
case 20: $saint = "St Sébastien";
|
break;
|
case 21: $saint = "Ste Agnès";
|
break;
|
case 22: $saint = "St Vincent";
|
break;
|
case 23: $saint = "St Barnard";
|
break;
|
case 24: $saint = "St Franà §ois";
|
break;
|
case 25: $saint = "Conv de St Paul";
|
break;
|
case 26: $saint = "St Timothée";
|
break;
|
case 27: $saint = "Ste Angèle";
|
break;
|
case 28: $saint = "St Thomas d'Aquin";
|
break;
|
case 29: $saint = "St Gildas";
|
break;
|
case 30: $saint = "Ste Martine";
|
break;
|
case 31: $saint = "Ste Marcelle";
|
break;
|
|
|
}
|
break ;
|
case 2:
|
switch($jour)
|
{
|
case 1: $saint = "Ste Ella";
|
break;
|
case 2: $saint = "Présentation";
|
break;
|
case 3: $saint = "St Blaise";
|
break;
|
case 4: $saint = "Ste Véronique";
|
break;
|
case 5: $saint = "Ste Agathe";
|
break;
|
case 6: $saint = "St Gaston";
|
break;
|
case 7: $saint = "Ste Eugénie";
|
break;
|
case 8: $saint = "Ste Jacqueline";
|
break;
|
case 9: $saint = "Ste Apolline";
|
break;
|
case 10: $saint = "St Arnaud";
|
break;
|
case 11: $saint = "N-D de Lourdes";
|
break;
|
case 12: $saint = "St Félix";
|
break;
|
case 13: $saint = "Ste Béatrice";
|
break;
|
case 14: $saint = "St Valentin";
|
break;
|
case 15: $saint = "St Claude";
|
break;
|
case 16: $saint = "Ste Julienne";
|
break;
|
case 17: $saint = "St Alexis";
|
break;
|
case 18: $saint = "Ste Bernadette";
|
break;
|
case 19: $saint = "St Gabin";
|
break;
|
case 20: $saint = "Ste Aimée";
|
break;
|
case 21: $saint = "St Damien";
|
break;
|
case 22: $saint = "Ste Isabelle";
|
break;
|
case 23: $saint = "St Lazare";
|
break;
|
case 24: $saint = "St Modeste";
|
break;
|
case 25: $saint = "St Roméo";
|
break;
|
case 26: $saint = "St Nestor";
|
break;
|
case 27: $saint = "Ste Honorine";
|
break;
|
case 28: $saint = "St Romain";
|
break;
|
case 29: $saint = "St Auguste";
|
break;
|
}
|
break;
|
case 3:
|
switch($jour)
|
{
|
case 1: $saint = "St Aubin";
|
break;
|
case 2: $saint = "St Charles";
|
break;
|
case 3: $saint = "St Guénolé";
|
break;
|
case 4: $saint = "St Casimir";
|
break;
|
case 5: $saint = "Ste Olive";
|
break;
|
case 6: $saint = "Ste Colette";
|
break;
|
case 7: $saint = "Ste Félicité";
|
break;
|
case 8: $saint = "St Jean de Dieu";
|
break;
|
case 9: $saint = "Ste Franà §oise";
|
break;
|
case 10: $saint = "St Vivien";
|
break;
|
case 11: $saint = "Ste Rosine";
|
break;
|
case 12: $saint = "Ste Justine";
|
break;
|
case 13: $saint = "St Rodrigue";
|
break;
|
case 14: $saint = "Ste Mathilde";
|
break;
|
case 15: $saint = "Ste Louise";
|
break;
|
case 16: $saint = "Ste Bénédicte";
|
break;
|
case 17: $saint = "St Patrice";
|
break;
|
case 18: $saint = "St Cyrille";
|
break;
|
case 19: $saint = "St Joseph";
|
break;
|
case 20: $saint = "St Herbert";
|
break;
|
case 21: $saint = "Ste Clémence";
|
break;
|
case 22: $saint = "Ste Léa";
|
break;
|
case 23: $saint = "St Victorien";
|
break;
|
case 24: $saint = "Ste Catherine de Suède";
|
break;
|
case 25: $saint = "Annonciation";
|
break;
|
case 26: $saint = "Ste Larissa";
|
break;
|
case 27: $saint = "St Habib";
|
break;
|
case 28: $saint = "St Gontran";
|
break;
|
case 29: $saint = "Ste Gwladys";
|
break;
|
case 30: $saint = "St Amédée";
|
break;
|
case 31: $saint = "St Benjamin";
|
break;
|
}
|
break;
|
case 4:
|
switch($jour)
|
{
|
|
case 1: $saint = "St Hughes";
|
break;
|
case 2: $saint = "Ste Sandrine";
|
break;
|
case 3: $saint = "St Richard";
|
break;
|
case 4: $saint = "St Isidore";
|
break;
|
case 5: $saint = "Ste Irène";
|
break;
|
case 6: $saint = "St Marcellin";
|
break;
|
case 7: $saint = "St J-B de la Salle";
|
break;
|
case 8: $saint = "Ste Julie";
|
break;
|
case 9: $saint = "St Gautier";
|
break;
|
case 10: $saint = "St Fulbert";
|
break;
|
case 11: $saint = "St Stanislas";
|
break;
|
case 12: $saint = "Ste Jules";
|
break;
|
case 13: $saint = "Ste Ida";
|
break;
|
case 14: $saint = "St Maxime";
|
break;
|
case 15: $saint = "St Paterne";
|
break;
|
case 16: $saint = "St Benoit-Joseph";
|
break;
|
case 17: $saint = "St Anicet";
|
break;
|
case 18: $saint = "St Parfait";
|
break;
|
case 19: $saint = "Ste Emma";
|
break;
|
case 20: $saint = "Ste Odette";
|
break;
|
case 21: $saint = "St Anselme";
|
break;
|
case 22: $saint = "St Alexandre";
|
break;
|
case 23: $saint = "St Georges";
|
break;
|
case 24: $saint = "St Fidèle";
|
break;
|
case 25: $saint = "St Marc";
|
break;
|
case 26: $saint = "Ste Alida";
|
break;
|
case 27: $saint = "Ste Zita";
|
break;
|
case 28: $saint = "Ste Valérie";
|
break;
|
case 29: $saint = "Ste Cath. de Sienne";
|
break;
|
case 30: $saint = "St Robert";
|
break;
|
}
|
break;
|
case 5:
|
switch($jour)
|
{
|
|
case 1: $saint = "Fête du Travail";
|
break;
|
case 2: $saint = "St Boris";
|
break;
|
case 3: $saint = "SS Philippe Jacques";
|
break;
|
case 4: $saint = "St Sylvain";
|
break;
|
case 5: $saint = "Ste Judith";
|
break;
|
case 6: $saint = "Ste Prudence";
|
break;
|
case 7: $saint = "Ste Gisèle";
|
break;
|
case 8: $saint = "Victoire 1945";
|
break;
|
case 9: $saint = "Ste Pacà ´me";
|
break;
|
case 10: $saint = "Ste Solange";
|
break;
|
case 11: $saint = "Ste Estelle";
|
break;
|
case 12: $saint = "St Achille";
|
break;
|
case 13: $saint = "Ste Rolande";
|
break;
|
case 14: $saint = "St Mathias";
|
break;
|
case 15: $saint = "Ste Denise";
|
break;
|
case 16: $saint = "St Honoré";
|
break;
|
case 17: $saint = "St Pascal";
|
break;
|
case 18: $saint = "St Eric";
|
break;
|
case 19: $saint = "St Yves";
|
break;
|
case 20: $saint = "St Bernardin";
|
break;
|
case 21: $saint = "St Constantin";
|
break;
|
case 22: $saint = "St Emile";
|
break;
|
case 23: $saint = "St Didier";
|
break;
|
case 24: $saint = "St Donatien";
|
break;
|
case 25: $saint = "Ste Sophie";
|
break;
|
case 26: $saint = "St Béranger";
|
break;
|
case 27: $saint = "St Augustin";
|
break;
|
case 28: $saint = "St Germain";
|
break;
|
case 29: $saint = "St Aymard";
|
break;
|
case 30: $saint = "St Ferdinand";
|
break;
|
case 31: $saint = "Visitation";
|
break;
|
}
|
break;
|
case 6:
|
switch($jour)
|
{
|
case 1: $saint = "St Justin";
|
break;
|
case 2: $saint = "Ste Blandine";
|
break;
|
case 3: $saint = "St Kévin";
|
break;
|
case 4: $saint = "Ste Clotilde";
|
break;
|
case 5: $saint = "St Igor";
|
break;
|
case 6: $saint = "St Norbert";
|
break;
|
case 7: $saint = "St Gilbert";
|
break;
|
case 8: $saint = "St Médard";
|
break;
|
case 9: $saint = "Ste Diane";
|
break;
|
case 10: $saint = "St Landry";
|
break;
|
case 11: $saint = "St Barnabé";
|
break;
|
case 12: $saint = "St Guy";
|
break;
|
case 13: $saint = "St Antoine de P.";
|
break;
|
case 14: $saint = "St Elisée";
|
break;
|
case 15: $saint = "Ste Germaine";
|
break;
|
case 16: $saint = "St J-F Régis";
|
break;
|
case 17: $saint = "St Hervé";
|
break;
|
case 18: $saint = "St Léonce";
|
break;
|
case 19: $saint = "St Romuald";
|
break;
|
case 20: $saint = "St Silvère";
|
break;
|
case 21: $saint = "Eté";
|
break;
|
case 22: $saint = "St Alban";
|
break;
|
case 23: $saint = "Ste Audrey";
|
break;
|
case 24: $saint = "St Jean-Baptiste";
|
break;
|
case 25: $saint = "St Prosper";
|
break;
|
case 26: $saint = "St Anthelme";
|
break;
|
case 27: $saint = "St Fernand";
|
break;
|
case 28: $saint = "St Irénée";
|
break;
|
case 29: $saint = "SS Pierre: St Paul";
|
break;
|
case 30: $saint = "St Martial";
|
break;
|
}
|
break;
|
case 7:
|
switch($jour)
|
{
|
case 1: $saint = "St Thierry";
|
break;
|
case 2: $saint = "St Martinien";
|
break;
|
case 3: $saint = "St Thomas";
|
break;
|
case 4: $saint = "St Florent";
|
break;
|
case 5: $saint = "St Antoine-Marie";
|
break;
|
case 6: $saint = "Ste Mariette";
|
break;
|
case 7: $saint = "St Raoul";
|
break;
|
case 8: $saint = "St Thibaut";
|
break;
|
case 9: $saint = "Ste Amandine";
|
break;
|
case 10: $saint = "St Ulrich";
|
break;
|
case 11: $saint = "St Benoà ®t";
|
break;
|
case 12: $saint = "St Olivier";
|
break;
|
case 13: $saint = "SS Henri et Joà «l";
|
break;
|
case 14: $saint = "Fête Nationale";
|
break;
|
case 15: $saint = "St Donald";
|
break;
|
case 16: $saint = "N-D du Mt-Carmel";
|
break;
|
case 17: $saint = "Ste Charlotte";
|
break;
|
case 18: $saint = "St Frédéric";
|
break;
|
case 19: $saint = "St Arsène";
|
break;
|
case 20: $saint = "Ste Marina";
|
break;
|
case 21: $saint = "St Victor";
|
break;
|
case 22: $saint = "Ste Marie-Madeleine";
|
break;
|
case 23: $saint = "Ste Brigitte";
|
break;
|
case 24: $saint = "Ste Christine";
|
break;
|
case 25: $saint = "St Jacques";
|
break;
|
case 26: $saint = "SS Anne et Joachim";
|
break;
|
case 27: $saint = "Ste Nathalie";
|
break;
|
case 28: $saint = "St Samson";
|
break;
|
case 29: $saint = "Ste Marthe";
|
break;
|
case 30: $saint = "Ste Juliette";
|
break;
|
case 31: $saint = "St Ignace de Loyola";
|
break;
|
}
|
break;
|
case 8:
|
switch($jour)
|
{
|
case 1: $saint = "St Alphonse";
|
break;
|
case 2: $saint = "St Julien Eymard";
|
break;
|
case 3: $saint = "Ste Lydie";
|
break;
|
case 4: $saint = "St J-M Vianney";
|
break;
|
case 5: $saint = "St Abel";
|
break;
|
case 6: $saint = "Transfiguration";
|
break;
|
case 7: $saint = "St Gaà «tan";
|
break;
|
case 8: $saint = "St Dominique";
|
break;
|
case 9: $saint = "St Amour";
|
break;
|
case 10: $saint = "St Laurent";
|
break;
|
case 11: $saint = "Ste Claire";
|
break;
|
case 12: $saint = "Ste Clarisse";
|
break;
|
case 13: $saint = "St Hippolyte";
|
break;
|
case 14: $saint = "St Evrard";
|
break;
|
case 15: $saint = "Assomption";
|
break;
|
case 16: $saint = "St Armel";
|
break;
|
case 17: $saint = "St Hyacinthe";
|
break;
|
case 18: $saint = "Ste Hélène";
|
break;
|
case 19: $saint = "St Jean Eudes";
|
break;
|
case 20: $saint = "St Bernard";
|
break;
|
case 21: $saint = "St Christophe";
|
break;
|
case 22: $saint = "St Fabrice";
|
break;
|
case 23: $saint = "Ste Rose de Lima";
|
break;
|
case 24: $saint = "St Barthélémy";
|
break;
|
case 25: $saint = "St Louis";
|
break;
|
case 26: $saint = "Ste Natacha";
|
break;
|
case 27: $saint = "Ste Monique";
|
break;
|
case 28: $saint = "St Augustin";
|
break;
|
case 29: $saint = "Ste Sabine";
|
break;
|
case 30: $saint = "St Fiacre";
|
break;
|
case 31: $saint = "St Aristide";
|
break;
|
}
|
break;
|
case 9:
|
switch($jour)
|
{
|
case 1: $saint = "St Gilles";
|
break;
|
case 2: $saint = "Ste Ingrid";
|
break;
|
case 3: $saint = "St Grégoire";
|
break;
|
case 4: $saint = "Ste Rosalie";
|
break;
|
case 5: $saint = "Ste Raà ¯ssa";
|
break;
|
case 6: $saint = "St Bertrand";
|
break;
|
case 7: $saint = "Ste Reine";
|
break;
|
case 8: $saint = "Nativité de N-D";
|
break;
|
case 9: $saint = "St Alain";
|
break;
|
case 10: $saint = "Ste Inès";
|
break;
|
case 11: $saint = "St Adolphe";
|
break;
|
case 12: $saint = "St Apollinaire";
|
break;
|
case 13: $saint = "St Aimé";
|
break;
|
case 14: $saint = "La Ste-Croix";
|
break;
|
case 15: $saint = "St Roland";
|
break;
|
case 16: $saint = "Ste Edith";
|
break;
|
case 17: $saint = "St Renaud";
|
break;
|
case 18: $saint = "Ste Nadège";
|
break;
|
case 19: $saint = "Ste Emilie";
|
break;
|
case 20: $saint = "St Davy";
|
break;
|
case 21: $saint = "St Matthieu";
|
break;
|
case 22: $saint = "St Maurice";
|
break;
|
case 23: $saint = "St Constant";
|
break;
|
case 24: $saint = "St Thècle";
|
break;
|
case 25: $saint = "St Hermann";
|
break;
|
case 26: $saint = "St Cà ´me";
|
break;
|
case 27: $saint = "St Vincent de Paul";
|
break;
|
case 28: $saint = "St Venceslas";
|
break;
|
case 29: $saint = "St Michel";
|
break;
|
case 30: $saint = "St Jérà ´me";
|
break;
|
}
|
break;
|
case 10:
|
switch($jour)
|
{
|
case 1: $saint = "Ste Thérèse de l'E-J";
|
break;
|
case 2: $saint = "St Léger";
|
break;
|
case 3: $saint = "St Gérard";
|
break;
|
case 4: $saint = "St Franà §ois d'Assise";
|
break;
|
case 5: $saint = "Ste Fleur";
|
break;
|
case 6: $saint = "St Bruno";
|
break;
|
case 7: $saint = "St Serge";
|
break;
|
case 8: $saint = "Ste Pélagie";
|
break;
|
case 9: $saint = "St Denis";
|
break;
|
case 10: $saint = "St Ghislain";
|
break;
|
case 11: $saint = "St Firmin";
|
break;
|
case 12: $saint = "St Wilfrid";
|
break;
|
case 13: $saint = "St Géraud";
|
break;
|
case 14: $saint = "St Juste";
|
break;
|
case 15: $saint = "Ste Thérèse d'Avila";
|
break;
|
case 16: $saint = "Ste Edwige";
|
break;
|
case 17: $saint = "St Baudouin";
|
break;
|
case 18: $saint = "St Luc";
|
break;
|
case 19: $saint = "St René";
|
break;
|
case 20: $saint = "Ste Adeline";
|
break;
|
case 21: $saint = "Ste Céline";
|
break;
|
case 22: $saint = "Ste Elodie";
|
break;
|
case 23: $saint = "St Jean de Capistran";
|
break;
|
case 24: $saint = "St Florentin";
|
break;
|
case 25: $saint = "St Crépin";
|
break;
|
case 26: $saint = "St Dimitri";
|
break;
|
case 27: $saint = "Ste Emeline";
|
break;
|
case 28: $saint = "SS Simon et Juda";
|
break;
|
case 29: $saint = "St Narcisse";
|
break;
|
case 30: $saint = "St Bienvenu";
|
break;
|
case 31: $saint = "St Quentin";
|
break;
|
}
|
break;
|
case 11:
|
switch($jour)
|
{
|
case 1: $saint = "Toussaint";
|
break;
|
case 2: $saint = "Défunts";
|
break;
|
case 3: $saint = "St Hubert";
|
break;
|
case 4: $saint = "St Charles";
|
break;
|
case 5: $saint = "Ste Sylvie";
|
break;
|
case 6: $saint = "Ste Bertille";
|
break;
|
case 7: $saint = "Ste Carine";
|
break;
|
case 8: $saint = "St Geoffroy";
|
break;
|
case 9: $saint = "St Théodore";
|
break;
|
case 10: $saint = "St Léon";
|
break;
|
case 11: $saint = "St Martin";
|
break;
|
case 12: $saint = "St Christian";
|
break;
|
case 13: $saint = "St Brice";
|
break;
|
case 14: $saint = "St Sidoine";
|
break;
|
case 15: $saint = "St Albert";
|
break;
|
case 16: $saint = "Ste Marguerite";
|
break;
|
case 17: $saint = "Ste Elisabeth";
|
break;
|
case 18: $saint = "Ste Aude";
|
break;
|
case 19: $saint = "St Tanguy";
|
break;
|
case 20: $saint = "St Edmond";
|
break;
|
case 21: $saint = "Prés. de Marie";
|
break;
|
case 22: $saint = "Ste Cécile";
|
break;
|
case 23: $saint = "St Clément";
|
break;
|
case 24: $saint = "Ste Flora";
|
break;
|
case 25: $saint = "Ste Catherine";
|
break;
|
case 26: $saint = "Ste Delphine";
|
break;
|
case 27: $saint = "St Séverin";
|
break;
|
case 28: $saint = "St Jacques de la M.";
|
break;
|
case 29: $saint = "St Saturnin";
|
break;
|
case 30: $saint = "St André";
|
break;
|
}
|
break;
|
case 12:
|
switch($jour)
|
{
|
case 1: $saint = "Ste Florence";
|
break;
|
case 2: $saint = "Ste Viviane";
|
break;
|
case 3: $saint = "St Xavier";
|
break;
|
case 4: $saint = "Ste Barbara";
|
break;
|
case 5: $saint = "St Gérald";
|
break;
|
case 6: $saint = "St Nicolas";
|
break;
|
case 7: $saint = "St Ambroise";
|
break;
|
case 8: $saint = "Imm. Conception";
|
break;
|
case 9: $saint = "St P. Fourier";
|
break;
|
case 10: $saint = "St Romaric";
|
break;
|
case 11: $saint = "St Daniel";
|
break;
|
case 12: $saint = "Ste Jeanne F.-C.";
|
break;
|
case 13: $saint = "Ste Lucie";
|
break;
|
case 14: $saint = "Ste Odile";
|
break;
|
case 15: $saint = "Ste Ninon";
|
break;
|
case 16: $saint = "Ste Alice";
|
break;
|
case 17: $saint = "St Gaà «l";
|
break;
|
case 18: $saint = "St Gatien";
|
break;
|
case 19: $saint = "St Urbain";
|
break;
|
case 20: $saint = "St Abraham";
|
break;
|
case 21: $saint = "St P. Cenisius";
|
break;
|
case 22: $saint = "Ste Fr.-Xavière";
|
break;
|
case 23: $saint = "St Armand";
|
break;
|
case 24: $saint = "St Adèle";
|
break;
|
case 25: $saint = "Noà «l";
|
break;
|
case 26: $saint = "St Etienne";
|
break;
|
case 27: $saint = "St Jean";
|
break;
|
case 28: $saint = "St Innocents";
|
break;
|
case 29: $saint = "St David";
|
break;
|
case 30: $saint = "St Roger";
|
break;
|
case 31: $saint = "St Sylvestre";
|
break;
|
}
|
break;
|
}
|
return $saint;
|
}
|
?>
|
|
|
Administrateur
06 Juin 2020 à 09:34La on parle du saint du jour, par ex la St Laurent a lieu le 10 août depuis des siécles et c'est pas prés de changer :)
Invité
05 Juin 2020 à 15:38Quand les fêtes chrétiennes liées à Pâques bougent, les saint changent de place, idem pour fêtes des méres...
Invité
02 Sept 2011 à 11:10tres courageux !
fallais bien que quelqu'in s'y colle , merci !!
Mercier133
06 Jan 2010 à 14:39Il y en a qui ont de la patience ... pfff
Superpigeon
08 Mai 2008 à 11:41J'applaudis l'effort fourni, mais je m'interroge sur l'efficacité et la maintenabilité d'un tel code.
N'aurait-il pas été plus simple de déclarer un array contenant la liste des saints au début du script et ensuite avoir un parcours simple de ce tableau.
Sinon, je m'incline quand même, parce que ça a du être pénible à coder ^^.
Debian
06 Mai 2008 à 09:50Gros Merci
ca fait longtemps que je cherchais ce code