/** * fonction qui retourne l'annee courante * @return l'annee courante */ public int getAnneeCourante(){ Calendar c = Calendar.getInstance(); int res = c.get(Calendar.YEAR); return res; }
int currentYear(void) { time_t timestamp; struct tm * t; timestamp = time(NULL); t = localtime(×tamp); return 1900 + t->tm_year; }
Function AnneeCourante() As Integer Return DateTime.Now.Year End Function
Function CurrentYear() As Integer CurrentYear = DatePart("yyyy", Now) End Function
proc CurrentYear {clock format [clock seconds] -format "%Y"}