What is the equivalent of the Javas Joda Time LocalDate class in cocoa touch?

Time Joda provides the java world to the class LocalDate. It provides you a date only without time information that translates to the same date, regardless of the time zone on which the mobile phone or users computer is installed. This allows you to count.

Apparently, it is supported using a regular object DateTimethat is set at 13.00 UTC.

Is there an equivalent in the world of cocoa or cocoa -touch?

Or did I limit myself to using NSDate and set it at 13:00, and the locale for UTC to achieve the same? This should work the same, but it looks more like a hack than a solution. I could, of course, introduce a subclass for it NSDate.

+4
source share
1 answer

The foundation has these classes when processing dates:

The time zone and locale for NSCalendarand NSDateFormattercan be set to any value.

See the Date and Time Programming Guide for more information .

0
source

Source: https://habr.com/ru/post/1614421/


All Articles