12.07.2015 Views

Calculer un calendrier avec LATEX, le dessiner en 3D avec PSTricks

Calculer un calendrier avec LATEX, le dessiner en 3D avec PSTricks

Calculer un calendrier avec LATEX, le dessiner en 3D avec PSTricks

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2. Une année ordinaire compr<strong>en</strong>d 365 jours, or 365 = 52 × 7 + 1. Il y a donc <strong>un</strong> décalage de 1 jour dans <strong>le</strong>nom des jours pour l’année suivante si el<strong>le</strong> est ordinaire el<strong>le</strong> aussi. Autrem<strong>en</strong>t dit <strong>le</strong> 1 janvier 2 001 devraitêtre <strong>un</strong> dimanche (6 + 1 = 7). Or l’an 2 000 est bissexti<strong>le</strong> et comporte 366 jours : <strong>le</strong> décalage sera de 2, <strong>le</strong>1 janvier 2 001 correspondra au numéro 6 + 2 = 8 = 1 (modulo 7).3. Sur la période ret<strong>en</strong>ue 2 000/2 099 <strong>le</strong>s années divisib<strong>le</strong>s par 4 : 2 000, 2 004, 2 008 etc. sont bissexti<strong>le</strong>s. Ondéterminera donc si l’année choisie est bissexti<strong>le</strong> <strong>en</strong> testant si el<strong>le</strong> est <strong>un</strong> multip<strong>le</strong> de 4.% test d’<strong>un</strong>e année bissexti<strong>le</strong>\FPeval{\YearBissextil}{(\psk@Ca<strong>le</strong>ndrierA)/4}\FPtr<strong>un</strong>c{\YearBissextil}{\YearBissextil}{0}\FPeval{\YearBissextil}{(\YearBissextil)*4}\FPtr<strong>un</strong>c{\YearBissextil}{\YearBissextil}{0}\ifnum\YearBissextil=\psk@Ca<strong>le</strong>ndrierAetc.4. Pour <strong>un</strong>e année choisie, on calcu<strong>le</strong>ra <strong>le</strong> décalage par rapport à 2 000, <strong>en</strong> comptant <strong>le</strong>s années et <strong>en</strong> ajoutant1 chaque fois qu’il y aura dans cet interval<strong>le</strong> <strong>un</strong>e année bissexti<strong>le</strong> (<strong>en</strong> t<strong>en</strong>ant compte de 2 000).5. On reti<strong>en</strong>t pour <strong>le</strong> début de chaque mois :2 L’utilisationmois année ordinaire année bissexti<strong>le</strong>janvier 1 1février 32 32mars 60 61avril 91 92mai 121 122juin 152 153juil<strong>le</strong>t 182 183août 213 214septembre 244 245octobre 274 275novembre 305 306décembre 335 3362.1 Utilisation simp<strong>le</strong>Si on veut voir <strong>un</strong>iquem<strong>en</strong>t <strong>le</strong> mois de l’année choisie, on fera, par exemp<strong>le</strong> :\psCa<strong>le</strong>ndar[An=2099,Mois=12,Jour=25,MoisChoisi=12]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!