I am trying to define the equivalent of DateTime.MaxValue (C#) but in Objective C.
I don't want to keep creating NSDates every time I use it so I wish I had it as const.
The problem, the compiler returns "Initializer element is not constant"
Here is the code
static NSDate* DateTimeMinValue = [NSDateFormatter dateFromString:@"00:00:00.0000000, January 01, 1984"];
I also tried
NSDate* const DateTimeMinValue = [NSDateFormatter dateFromString:@"00:00:00.0000000, January 01, 1984"];
Also, what would the difference between the static and const be?