objective c - NSDate. Creating new date with same time -
i have existing nsdate
object represents date , time of event. task make copying function of existing event other date attributes except day , month(but saving of hours , minutes). see nsdate
documentation here no direct method this. can add few days standard methods or nsdatecomponents
new date set calendar, not adding or substracting quantity days.
is right way extract "hh:mm" string previous date, set formatted string , convert new nsdate?
converting , string not best way. suggestion make nsdatecomponents date. can set month , day directly, , convert date.
Comments
Post a Comment