Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue]
int getDateInfo(int option)
{
struct tm *tm_struct;
time_t tm_num;
time(&tm_num);
tm_struct=localtime(&tm_num);
int a=tm_struct->tm_mon+1; [green]//MONTH[/green]
int b=tm_struct->tm_mday; [green]//DAY[/green]
int c=tm_struct->tm_year+1900; [green]//YEAR[/green]
if (option==1) return a;
if (option==2) return b;
if (option==3) return c;
return 0;
}
[/blue]
[green]I forgot why I put the 1900 on the year but I do belive it takes the difference between the current year and 1900, so you would get 104 instead of 2004[/green]