Accueil > DATE et HEURE

version v5

14/11/2006

ceci affiche l'heure

PROJET AVEC AFFICHAGE DATE et HEURE

ceci affiche la date


Dans le fichier zip:
prog heure_V7.phi
et l'utiliser en "Importez groupe" dans votre projet

Accès aux Téléchargements


Dans le fichier zip:
prog date_V7.phi
l'utiliser en "Importez groupe" dans votre projet

le groupe heureV7.phi :
// transfert heure dans la variable
phhours=GetHours() ;
<= getHours
if ( phhours<10 ){
_root.heures_text =("0"+ toString(phhours) );
}else{
_root.heures_text =(toString(phhours) );
}
// -------------------------------------------
// transfert minute dans la variable

phminuts=GetMinutes();
if ( phminuts<10 ){
_root.minutes_text =( "0"+ toString(phminuts) );
}else{
_root.minutes_text =( toString(phminuts) );
}
// -------------------------------------------
// transfert seconde dans la variable

phsecondes=GetSeconds();
if ( phsecondes<10 ){
_root.secondes_text =( "0"+ toString(phsecondes) );
}else{
_root.secondes_text =( toString(phsecondes) );
}
// -------------------------------------------
// transfert milliseconde dans la variable

phmilli=GetMilliseconds();
if ( phmilli<10 ){
_root.msecondes_text =( "0"+ toString(phmilli) );
}else{
_root.msecondes_text =( toString(phmilli) );
}

le groupe dateV7.phi :
// jour de la semaine
"phday";
0;
0; "Date";code_40( );
"getDay";
code_52( );
code_1D( );
// ----------------------------------------
// jour dans le mois

"phdate";
0;
0; "Date";code_40( );
"getDate";
code_52( );
code_1D( );
// ----------------------------------------
// mois

"phmonth";
0;
0; "Date";code_40( );
"getMonth";
code_52( );
code_1D( );
// ----------------------------------------
// annee

"phyear";
0;
0; "Date";code_40( );
"getFullYear";
code_52( );
code_1D( );
/
/ ------------------------------------------------------
// transfert des infos dans les variables

_root.jour_text =( toString(phday) );
// --------------------------
if ( phdate<10 ){
_root.jourm_text =( "0"+toString(phdate) );
}else{
_root.jourm_text =( toString(phdate) );
}
// --------------------------
if ( (phmonth+1)<10 ){
_root.mois_text =("0"+ toString(phmonth+1) );
}else{
_root.mois_text =( toString(phmonth+1) );
}
// ----------------------------------------------------------
_root.annee_text =( toString(phyear ));
// ------------------------------------------------------
// affichage du jour de la semaine

if (phday == 1){
_root.journee_text = "Lundi"; }
if (phday == 2){
_root.journee_text = "Mardi"; }
if (phday == 3){
_root.journee_text = "Mercredi"; }
if (phday == 4){
_root.journee_text = "Jeudi"; }
if (phday == 5){
_root.journee_text = "Vendredi"; }
if (phday == 6){
_root.journee_text = "Samedi"; }
if (phday == 0){
_root.journee_text = "Dimanche"; }