Ciao a tutti... sto facendo una conversione di una mia pagina asp...
sono arrivato ad una funzione che dati anno, mese, numero settimana e giorno ti restiuisce la data corrispondente...
qualcuno sa come fare questa operazione in java ??codice:' FUNZIONE CHE RESTITUISCE LA DATA DA MESE, ANNO, NUMERO SETTIMANA, GIORNO SETTIMANA Function dhNthWeekday(mese, anno, numeroSett, giornoSett ) ' Find the date of the specified day within the month. For If (giornoSett < vbSunday or giornoSett > vbSaturday) Or (numeroSett < 1) Then ' Invalid parameter values dhNthWeekday = "" Exit Function End If ' Get the first of the month. dtmTemp = DateSerial(Year(mese & "/" & anno), Month(mese & "/" & anno), 1) ' Get to the first giornoSett in the month. Do While WeekDay(dtmTemp) <> giornoSett dtmTemp = dtmTemp + 1 Loop ' Now you've found the first giornoSett in the month. ' Just add 7 for each numeroSett after that. dhNthWeekday = dtmTemp + ((numeroSett - 1) * 7) End Function


Rispondi quotando