almost 7 years ago
Hello Friends,
To create an array of dates between two dates you may use the following code:
1.Create an NSMutableArray
NSMutableArray *datesArray = [NSMutableArray new];
2.Set the date formatter according to your requirement.
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"MM-dd-yyyy"]; [dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]]; NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier: NSCalendarIdentifierGregorian]; [gregorianCalendar setTimeZone:[NSTimeZone systemTimeZone]];
3.Create two date variables for minimum and maximum date
NSDate *minDate = [dateFormatter dateFromString:@"MinimumDate"]; NSDate *maxDate = [dateFormatter dateFromString:@"MaximumDate"];
4. Create a copy of minimum Date .
NSMutableArray *datesArray = [NSMutableArray new]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"MM-dd-yyyy"]; [dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]]; NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier: NSCalendarIdentifierGregorian]; [gregorianCalendar setTimeZone:[NSTimeZone systemTimeZone]];
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)