**DONOTDELETE**
(Lurker)
2001-07-23 08:33 PM
@Macro langage

Hi guys,

i wish to know if there a way to got the macro result @day and @month in french.

i tough that was OS langage dependant but it's not the case.

all my server are english and User OS are in french.

thanks for your help!

Nyx

MCA
(KiX Supporter)
2001-07-24 07:17 AM
Re: @Macro langage

Dear,

Welcome to the board.

We have write some code, which will return two variables:
- $current_day
and
- $current_month
By replacing the macros call @day and @month you will
get the wanted result.
You only need to call the subroutines at the beginning of your script.

code:

GOSUB get_current_day
GOSUB get_current_month
? $current_day
? $current_month
RETURN
EXIT
:get_current_day
$number_of_days=7
DIM $days[$number_of_days+1]
$days[1]="dimanche"
$days[2]="lundi"
$days[3]="mardi"
$days[4]="mercredi"
$days[5]="jeudi"
$days[6]="vendredi"
$days[7]="samedi"
;
$current_day=$days[@wdayno]
RETURN

:get_current_month
$number_of_months=12
DIM $months[$number_of_months+1]
$months[ 1]="janvier"
$months[ 2]="février"
$months[ 3]="mars"
$months[ 4]="avril"
$months[ 5]="mai"
$months[ 6]="juin"
$months[ 7]="juillet"
$months[ 8]="août"
$months[ 9]="septembre"
$months[10]="octobre"
$months[11]="novembre"
$months[12]="décembre"
;
$current_month=$months[@monthno]
RETURN



Greetings.


**DONOTDELETE**
(Lurker)
2001-07-24 03:28 PM
Re: @Macro langage

Thanks a lot!! Nice code and it work like a charm!

Nyx