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

French_Vanilla_Dotted_Date2

Syntaxe

French_Vanilla_Dotted_Date2(theDate)
Retourne la date au format court Français. Le parametre est au format date, le résultat est au format texte.
par Nigel Garvey.

Exemple

French_Vanilla_Dotted_Date2(current date)
--> "16/10/03"

Script

on French_Vanilla_Dotted_Date2(the_date)
copy the_date to new_date
set month of new_date to January
tell (((year of the_date) * 10000 + (new_date - 2500000 - the_date) ¬
div -2500000 * 100 + (day of the_date)) as string) to return ¬
text 7 thru 8 & "/" & text 5 thru 6 & "/" & text 3 thru 4
end French_Vanilla_Dotted_Date2

Remarque

Pour obtenir l'année entière, changer le dernier "text X thru Y" dans la dernière ligne : text 7 thru 8 & "/" & text 5 thru 6 & "/" & text 1 thru 4

Pour obtenir le format anglais (le mois avant le jour), intervertir les deux premiers "text X thru Y" : text 5 thru 6 & "/" & text 7 thru 8 & "/" & text 3 thru 4

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