`isBeforeMoment` / `isAfterMoment` / `isBetweenMoments` are broken
sndrm opened this issue · comments
sndrm commented
Example :
YLMoment *m1 = [YLMoment momentWithDateAsString:@"01/01/2016 01:00:00" format:@"dd/MM/yyyy hh:mm:ss"];
YLMoment *m2 = [YLMoment momentWithDateAsString:@"01/01/2017 00:00:00" format:@"dd/MM/yyyy hh:mm:ss"];
[m1 isBeforeMoment:m2] // Should be true but it's false because the hour component from second moment is smaller than the one from first moment
isAfterMoment
and isBetweenMoments
are broken too because they use isBeforeMoment
to work
Darren Tong commented
@syndr0m-sxb Thanks for finding this, should be fixed now.