0

What is the iOS equivalent for these three Win32 functions? I'm finding a lot of answers on how to return the date & time as a string on iOS, but I just want the individual integers. I want the LOCAL date/time, not UTC time. Found a few iOS examples on that, but they seem excessively and needlessly complicated. There's got to be an easier way.

int GetCurrentMonth(void)
{
    SYSTEMTIME date;
    GetLocalTime(&date);

    return date.wMonth;
}

int GetCurrentDay(void)
{
    SYSTEMTIME date;
    GetLocalTime(&date);

    return date.wDay;
}

int GetCurrentYear(void)
{
    SYSTEMTIME date;
    GetLocalTime(&date);

    return date.wYear;
}
user1054922
  • 2,101
  • 2
  • 23
  • 37

0 Answers0