Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14616] iOS: Ti.Calendar.getEventsInMonth uses 1-based months instead of 0-based

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsparity
ReporterAndrey Chirikba
AssigneeUnknown
Created2013-07-12T11:30:21.000+0000
Updated2018-02-28T20:03:43.000+0000

Description

Issue

Ti.Calendar.getEventsInMonth (and presumably its other variants) expect a 1-based month number instead of 0-based on iOS (Android version uses 0-based).

Sample

See a CalendarTestcase.zip attached. This is the date I use to create the event:
var date = new Date(2013, 7, 15);
I.e. should be 0-based month 7, i.e. August.
And this is what it finds:
[INFO] : Search date: Sun Sep 15 2013 00:00:00 GMT+0200 (CEST)
[INFO] : 52843A09-9283-4382-B33B-08F760BC4171:0D931267-2858-49C5-B657-00A74566354C at 2013-08-14T22:00:00.000+0000: Titanium iOS Calendar Testcase
I.e. it finds the newly-created event looking for month 8. It should be the problem in one of the two functions. Best would be if the behaviour were the same across platforms, of course.

Additional details

Moreover, the docs don't mention one should call event.save() after calendar.createEvent() in order to have the event be actually saved on iOS (Android doesn't need this).

Attachments

FileDateSize
CalendarTestcase.zip2013-07-12T11:30:21.000+0000125146

Comments

  1. Andrey Chirikba 2013-07-17

    [Moved to description]
  2. Bert Grantges 2014-08-02

    Confirming that this is still open - can we get this fixed please :)

JSON Source