{"id":1894,"date":"2024-07-31T16:58:52","date_gmt":"2024-07-31T15:58:52","guid":{"rendered":"https:\/\/blog.univ-angers.fr\/mathsinfo\/?p=1894"},"modified":"2024-08-04T13:36:40","modified_gmt":"2024-08-04T12:36:40","slug":"representation-du-temps-les-calendriers","status":"publish","type":"post","link":"https:\/\/blog.univ-angers.fr\/mathsinfo\/2024\/07\/31\/representation-du-temps-les-calendriers\/","title":{"rendered":"Repr\u00e9sentation du temps : Calendriers"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Repr\u00e9sentation du temps - Les calendriers\" width=\"584\" height=\"329\" src=\"https:\/\/www.youtube.com\/embed\/YEyAHekEK5c?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Phases de la lune<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>cycle_lunaire = 29.53058853\ndelta = cycle_lunaire \/ 8\nphases = \"Nouvelle lune\",\"Premier croissant\",\"Premier quartier\", \"Gibbeuse croissante\",\"Pleine lune\",\"Gibbeuse d\u00e9croissante\",\"Dernier quartier\",\"Dernier croissant\"\nvisuel = &#091;'\ud83c\udf11','\ud83c\udf12','\ud83c\udf13','\ud83c\udf14','\ud83c\udf15','\ud83c\udf16','\ud83c\udf17','\ud83c\udf18']\n\ndef phase_lune(nb_jours):\n nb_cycles = int(nb_jours \/ cycle_lunaire)\n reste = nb_jours - nb_cycles * cycle_lunaire\n tranche = int(round(reste \/ delta, 0) % 8)\n return phases&#091;tranche], visuel&#091;tranche]\n\n&gt;&gt;&gt; phase_lune(365)\n('Gibbeuse croissante', '\ud83c\udf14')<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Calendrier chinois &#8211; signes du zodiaque<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>def zodiaque_chinois(annee):\n elements = \"Bois\", \"Feu\", \"Terre\", \"M\u00e9tal\", \"Eau\"\n aspects = \"Yang\", \"Yin\"\n signes_zodiaque = (\n        \"Rat\", \"Buffle\", \"Tigre\", \"Lapin\", \"Dragon\", \"Serpent\",\n        \"Cheval\", \"Ch\u00e8vre\", \"Singe\", \"Coq\", \"Chien\", \"Cochon\"\n    )\n annee_ref = 1924 # Ann\u00e9e du Rat, d\u00e9but d'un cycle de 60 ans\n diff_annees = annee - annee_ref\n ind_signe_zodiaque = diff_annees % 12\n ind_aspect = diff_annees % 2\n ind_element = (diff_annees % 10) \/\/ 2\n signe_zodiaque = signes_zodiaque&#091;ind_signe_zodiaque]\n aspect = aspects&#091;ind_aspect]\n element = elements&#091;ind_element]\n annee_chinoise = annee_ref + (diff_annees % 60)\n return f\"{annee_chinoise} : {signe_zodiaque} ({element} {aspect})\"\n \n&gt;&gt;&gt; zodiaque_chinois(2024)\n1964 : Dragon (Bois Yang)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Comparaison JULIEn | GREGORIEN | Personnel<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>def bissextile_julien(annee):\n return annee % 4 == 0\n \ndef bissextile_gregorien(annee):\n return (annee % 4 == 0 and annee % 100 != 0) or (annee % 400 == 0)\n \ndef bissextile_perso(annee):\n return annee % 4 == 0 and annee % 128 != 0\n \ndef compare(ans, methode):\n total = 0\n for an in range(ans):\n  total += 365\n  if methode(an): total += 1\n return total - 365.2421904482 * ans\n\n&gt;&gt;&gt; compare(10000, bissextile_julien)\n78.09551799995825\n\n&gt;&gt;&gt; compare(10000, bissextile_gregorien)\n3.095517999958247\n\n&gt;&gt;&gt; compare(10000, bissextile_perso)\n-0.904482000041753<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Phases de la lune Calendrier chinois &#8211; signes du zodiaque Comparaison JULIEn | GREGORIEN | Personnel<\/p>\n","protected":false},"author":4913,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1894","post","type-post","status-publish","format-standard","hentry","category-youtube"],"_links":{"self":[{"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/posts\/1894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/users\/4913"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/comments?post=1894"}],"version-history":[{"count":7,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/posts\/1894\/revisions"}],"predecessor-version":[{"id":1902,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/posts\/1894\/revisions\/1902"}],"wp:attachment":[{"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/media?parent=1894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/categories?post=1894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/tags?post=1894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}