Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 03 2015 11:20

    revolter on custom-day-color

    Fix performance decrease Added… (compare)

  • Apr 03 2015 10:54

    revolter on readme

    (compare)

  • Apr 03 2015 10:47

    revolter on custom-day-color

    Add partial documentation for c… Add day circle color properties… (compare)

  • Apr 03 2015 07:47

    revolter on documentation

    (compare)

  • Apr 03 2015 07:46

    revolter on readme

    Update README.md Fixed syntax … (compare)

  • Apr 02 2015 15:59

    revolter on documentation

    Update README.md Corrected sma… (compare)

  • Apr 02 2015 08:24

    revolter on documentation

    Add partial documentation for c… (compare)

  • Apr 01 2015 15:47

    revolter on patch-2

    (compare)

  • Apr 01 2015 15:46

    revolter on master

    Update README.md Fixed syntax … (compare)

Iulian Onofrei
@revolter
Iulian Onofrei
@revolter

Also, why don't you use

[self.date compare:date] == NSOrderedSame

instead of the function isSameDate:?

Jonathan Vukovich-Tribouharet
@jonathantribouharet
For the compare:date, I want to compare only the date (day, month, year) and not the datetime (hour, minutes). I know NSDateFormatter are slow, I didn't search another way to do it.
The loop while is used because NSDateComponents month property return an integer between 1 and 13 and I need an integer between 0 and 12 because standaloneMonthSymbols is an array. Also I tried to use module currentMonthIndex = currentMonthIndex % 12 but it doesn't work like I expected.
Iulian Onofrei
@revolter
Then, if the month ranges from 1 to 13, doesn't that mean that it won't enter the while loop? Wouldn't it be easier to just subtract 1 from it, like NSInteger currentMonthIndex = comps.month - 1;?
Jonathan Vukovich-Tribouharet
@jonathantribouharet
Sorry, I think I'm wrong in what I just said, there is an offset between month and standaloneMonthSymbols. And you're right, but be careful I remember there is a "trap" about this. I just copy past this code from another part in the lib where the while is useful.
Iulian Onofrei
@revolter
A comment would have helped in this case, I'll try to figure out, maybe I can help optimize it without breaking it.
For the first thing, could this work? Also, i remember finding a method at work but I can't find it in the docs anymore, and I'm in vacation now.
Jonathan Vukovich-Tribouharet
@jonathantribouharet
There is nothing to optimise in this case, the optimisation must be done on the view, I know what to do it just I don't have the time to work on it.
Iulian Onofrei
@revolter
Oh yes, you're right, sorry.
Iulian Onofrei
@revolter
This message was deleted
Iulian Onofrei
@revolter
@jonathantribouharet, what does this line do?
Jonathan Vukovich-Tribouharet
@jonathantribouharet
It allows me to use JTCalendar class without doing the import in the JTCalendarAppearance.h. JTCalendar import JTCalendarAppearance and JTCalendarAppearance import JTCalendar, so it create a cyclic dependency. I let you search about cyclic dependency.
Iulian Onofrei
@revolter
I didn't know that it has a name, so now I know what to research, thanks!