/lib/titanium/mobile/android/calendar/Calendar.hx

http://github.com/visup/haxe-titanium-api · Haxe · 99 lines · 17 code · 4 blank · 78 comment · 0 complexity · 10ece0c4ef5ccacf752458b9f8d81f2a MD5 · raw file

  1. package titanium.mobile.android.calendar;
  2. /**
  3. Calendar class
  4. Documentation available at:
  5. http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Android.Calendar.Calendar-object
  6. - namespace
  7. Titanium.Android.Calendar.Calendar
  8. - type
  9. object
  10. - description
  11. An object which represents a single calendar in Android.
  12. - since
  13. 1.5
  14. - platforms
  15. android
  16. - properties
  17. name[string]: The display name of the calendar.
  18. id[string]: The id of the calendar.
  19. selected[boolean]: Whether the calendar is selected.
  20. hidden[boolean]: Whether the calendar is hidden.
  21. - methods
  22. createEvent: Add an event to the calendar. Returns the created `Titanium.Android.Calendar.Event`.
  23. getEventsBetweenDates: Returns an array of `Titanium.Android.Calendar.Event` objects with all events in the given date range.
  24. getEventById: Returns the `Titanium.Android.Calendar.Event` object for the event with the given integer id.
  25. getEventsInDate: Returns an array of `Titanium.Android.Calendar.Event` objects with all events on the given date.
  26. getEventsInMonth: Returns an array of `Titanium.Android.Calendar.Event` objects with all events in the given month.
  27. getEventsInYear: Returns an array of `Titanium.Android.Calendar.Event` objects with all events in the given year.
  28. - method : createEvent, object
  29. properties[object]: An object defining the properties of the event. These correspond to properties of `Titanium.Android.Calendar.Event`.
  30. - method : getEventsBetweenDates, array
  31. date1[date]: The start date.
  32. date2[date]: The end date.
  33. - method : getEventById, object
  34. id[int]: The integer id of the event to return.
  35. - method : getEventsInDate, array
  36. year[int]: The year of the desired date.
  37. month[int]: The month of the desired date. The month is zero-based, therefore January is 0 and December is 11.
  38. day[int]: The day for which events should be returned.
  39. - method : getEventsInMonth, array
  40. year[int]: The year of the desired month.
  41. month[int]: The month for which events should be returned. The month is zero-based, therefore January is 0 and December is 11.
  42. - method : getEventsInYear, array
  43. year[int]: The year for which all events should be returned.
  44. - example : Events on December 5, 2015
  45. See `Titanium.Android.Calendar` for examples.
  46. **/
  47. #if androidos
  48. @:native("Titanium.Android.Calendar.Calendar")
  49. extern class Calendar
  50. {
  51. // properties
  52. public var name:String;
  53. public var id:String;
  54. public var selected:Bool;
  55. public var hidden:Bool;
  56. // methods
  57. public function createEvent(properties:Dynamic):Event;
  58. public function getEventsBetweenDates(date1:Date, date2:Date):Array<Event>;
  59. public function getEventById(id:Int):Event;
  60. public function getEventsInDate(year:Int, month:Int, day:Int):Array<Event>;
  61. public function getEventsInMonth(year:Int, month:Int):Array<Event>;
  62. public function getEventsInYear(year:Int):Array<Event>;
  63. }
  64. #end