Closed mohsinalimat closed 8 years ago
Hi @mohsinalimat
I didn't know much about islamic calendar. I've try to change the NSCalendar
instance inside:
_calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSIslamicCalendar];
NSDateComponents *components = [_calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:[NSDate date]];
NSLog(@"%d,%d,%d",components.year,components.month,components.day);
But it prints 1436,11,25
as today
. It seems that Islamic calendar is quite different.
Hi,
which screen i have to put above code? and what are the changes i have to made?
In NSDate+FSExtension
, there is a NSCalendar
category. I've create the calendar instance with NSIslamicCalendar identifier, but there comes some issues after that change. Haven't got the time to find the reason yet.
Hi @mohsinalimat I'm trying to adapt this to other calendar types, but here comes a weird problem that I can't figure out the reason. Could you explain this?
Hello @WenchaoIOS
1437 = year 01 = month 30 = day
That's not what I am asking. But still thanks
can you please send me code then i will check and find out solution?
It's solved actually. Q is why 1437-1-1 adding 1 month resulting 1437-1-30 rather than 1437-2-1. It's turns out it's the problem of NSTimeZone. I'll push there changes ASAP and let the calendar identifier being skinnable.
Fixed. To show a islamic calendar
_calendar.identifier = NSCalendarIdentifierIslamic;
Thanks your coding style is amazing... :+1:
on bug is found your latest code weekday bar days got wrong in your latest code....
Sorry, fixed it.
:+1: again you are awsome
Hello,
i want to show islamic calendar in your calendar demo.
how to show islamic calendar?
Thanks, Mohsinali Matiya