51 routines :

*AppleScriptsVanilla*
ascii_to_HTML
Average
Calculator
Calendar
Count_item
cut_text
days_week
EAN13
Encrypt-Decrypt
FactPremier
French_Vanilla_Dotted_Date
French_Vanilla_Dotted_Date2
Hexa_to_Bin
Last_month
list_erase
list_insert
list_replace
ListeDiviseurs
ListePremiers
Minuscule
NombreLong
NombreLong2
NomExtension
num_item
num_month
num_month2
num_week
number_format
number_format2
Paques
PGCD
PGCD2
reverse_string
Roman_to_Arab
round_decimal
search_email
search_replace
search_URL
SepNbre
SepNbre2
snip_text
stat
TauxPermut
TauxTransform
the_left
the_right
TriBulle
TriLineaire
week_and_year
XOR
ZeroDouble

Paques

Syntaxe

Paques(an)
Retourne la date du jour de Pâques au format "JJ/MM/AAAA". Le paramètre est au format nombre, le résultat est au format texte.

Exemple

Paques(2003)
---> "20/04/2003"

Script

on Paques(an)
copy an mod 19 to a
copy an div 100 to b
copy an mod 100 to c
copy b div 4 to d
copy b mod 4 to e
copy (b + 8) div 25 to f
copy (b - f + 1) div 3 to g
copy (19 * a + b - d - g + 15) mod 30 to h
copy c div 4 to i
copy c mod 4 to k
copy (32 + 2 * e + 2 * i - h - k) mod 7 to q
copy (a + 11 * h + 22 * q) div 451 to m
copy (h + q - 7 * m + 114) to z
copy z div 31 to n
copy (z mod 31) + 1 to p
if n = 3 then
copy "03" to n
else
copy "04" to n
end if
return p & "/" & n & "/" & an as string
end Paques

Remarque

Adaptation AppleScript d'un algorithme cité par J. Meeus d'après "Ecclesastical Calendar" de Butcher publié en 1876.

Site scripté avec HyperCard ©1987-1998 Apple Computer, Inc.
Mise à jour le 19/01/10 à 08:45:57