calendar.stub.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <?php
  2. /** @generate-class-entries */
  3. class IntlCalendar
  4. {
  5. private function __construct() {}
  6. /**
  7. * @param IntlTimeZone|DateTimeZone|string|null $timezone
  8. * @tentative-return-type
  9. * @alias intlcal_create_instance
  10. */
  11. public static function createInstance($timezone = null, ?string $locale = null): ?IntlCalendar {}
  12. /**
  13. * @tentative-return-type
  14. * @alias intlcal_equals
  15. */
  16. public function equals(IntlCalendar $other): bool {}
  17. /**
  18. * @tentative-return-type
  19. * @alias intlcal_field_difference
  20. */
  21. public function fieldDifference(float $timestamp, int $field): int|false {}
  22. /**
  23. * @tentative-return-type
  24. * @alias intlcal_add
  25. */
  26. public function add(int $field, int $value): bool {}
  27. /**
  28. * @tentative-return-type
  29. * @alias intlcal_after
  30. */
  31. public function after(IntlCalendar $other): bool {}
  32. /**
  33. * @tentative-return-type
  34. * @alias intlcal_before
  35. */
  36. public function before(IntlCalendar $other): bool {}
  37. /**
  38. * @return bool
  39. * @alias intlcal_clear
  40. */
  41. public function clear(?int $field = null) {} // TODO make return type void
  42. /**
  43. * @tentative-return-type
  44. * @alias intlcal_from_date_time
  45. */
  46. public static function fromDateTime(DateTime|string $datetime, ?string $locale = null): ?IntlCalendar {}
  47. /**
  48. * @tentative-return-type
  49. * @alias intlcal_get
  50. */
  51. public function get(int $field): int|false {}
  52. /**
  53. * @tentative-return-type
  54. * @alias intlcal_get_actual_maximum
  55. */
  56. public function getActualMaximum(int $field): int|false {}
  57. /**
  58. * @tentative-return-type
  59. * @alias intlcal_get_actual_minimum
  60. */
  61. public function getActualMinimum(int $field): int|false {}
  62. /**
  63. * @return array<int, string>
  64. * @tentative-return-type
  65. * @alias intlcal_get_available_locales
  66. */
  67. public static function getAvailableLocales(): array {}
  68. /**
  69. * @tentative-return-type
  70. * @alias intlcal_get_day_of_week_type
  71. */
  72. public function getDayOfWeekType(int $dayOfWeek): int|false {}
  73. /**
  74. * @tentative-return-type
  75. * @alias intlcal_get_error_code
  76. */
  77. public function getErrorCode(): int|false {}
  78. /**
  79. * @tentative-return-type
  80. * @alias intlcal_get_error_message
  81. */
  82. public function getErrorMessage(): string|false {}
  83. /**
  84. * @tentative-return-type
  85. * @alias intlcal_get_first_day_of_week
  86. */
  87. public function getFirstDayOfWeek(): int|false {}
  88. /**
  89. * @tentative-return-type
  90. * @alias intlcal_get_greatest_minimum
  91. */
  92. public function getGreatestMinimum(int $field): int|false {}
  93. /**
  94. * @tentative-return-type
  95. * @alias intlcal_get_keyword_values_for_locale
  96. */
  97. public static function getKeywordValuesForLocale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|false {}
  98. /**
  99. * @tentative-return-type
  100. * @alias intlcal_get_least_maximum
  101. */
  102. public function getLeastMaximum(int $field): int|false {}
  103. /**
  104. * @tentative-return-type
  105. * @alias intlcal_get_locale
  106. */
  107. public function getLocale(int $type): string|false {}
  108. /**
  109. * @tentative-return-type
  110. * @alias intlcal_get_maximum
  111. */
  112. public function getMaximum(int $field): int|false {}
  113. /**
  114. * @tentative-return-type
  115. * @alias intlcal_get_minimal_days_in_first_week
  116. */
  117. public function getMinimalDaysInFirstWeek(): int|false {}
  118. /**
  119. * @return bool
  120. * @alias intlcal_set_minimal_days_in_first_week
  121. */
  122. public function setMinimalDaysInFirstWeek(int $days) {} // TODO make return void
  123. /**
  124. * @tentative-return-type
  125. * @alias intlcal_get_minimum
  126. */
  127. public function getMinimum(int $field): int|false {}
  128. /**
  129. * @tentative-return-type
  130. * @alias intlcal_get_now
  131. */
  132. public static function getNow(): float {}
  133. /**
  134. * @tentative-return-type
  135. * @alias intlcal_get_repeated_wall_time_option
  136. */
  137. public function getRepeatedWallTimeOption(): int {}
  138. /**
  139. * @tentative-return-type
  140. * @alias intlcal_get_skipped_wall_time_option
  141. */
  142. public function getSkippedWallTimeOption(): int {}
  143. /**
  144. * @tentative-return-type
  145. * @alias intlcal_get_time
  146. */
  147. public function getTime(): float|false {}
  148. /**
  149. * @tentative-return-type
  150. * @alias intlcal_get_time_zone
  151. */
  152. public function getTimeZone(): IntlTimeZone|false {}
  153. /**
  154. * @tentative-return-type
  155. * @alias intlcal_get_type
  156. */
  157. public function getType(): string {}
  158. /**
  159. * @tentative-return-type
  160. * @alias intlcal_get_weekend_transition
  161. */
  162. public function getWeekendTransition(int $dayOfWeek): int|false {}
  163. /**
  164. * @tentative-return-type
  165. * @alias intlcal_in_daylight_time
  166. */
  167. public function inDaylightTime(): bool {}
  168. /**
  169. * @tentative-return-type
  170. * @alias intlcal_is_equivalent_to
  171. */
  172. public function isEquivalentTo(IntlCalendar $other): bool {}
  173. /**
  174. * @tentative-return-type
  175. * @alias intlcal_is_lenient
  176. */
  177. public function isLenient(): bool {}
  178. /**
  179. * @tentative-return-type
  180. * @alias intlcal_is_weekend
  181. */
  182. public function isWeekend(?float $timestamp = null): bool {}
  183. /**
  184. * @param int|bool $value
  185. * @alias intlcal_roll
  186. * @tentative-return-type
  187. */
  188. public function roll(int $field, $value): bool {}
  189. /**
  190. * @tentative-return-type
  191. * @alias intlcal_is_set
  192. */
  193. public function isSet(int $field): bool {}
  194. /**
  195. * @return bool
  196. * @alias intlcal_set
  197. */
  198. public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) {} // TODO make return type void
  199. /**
  200. * @return bool
  201. * @alias intlcal_set_first_day_of_week
  202. */
  203. public function setFirstDayOfWeek(int $dayOfWeek) {} // TODO make return type void
  204. /**
  205. * @return bool
  206. * @alias intlcal_set_lenient
  207. */
  208. public function setLenient(bool $lenient) {} // TODO make return type void
  209. /**
  210. * @return bool
  211. * @alias intlcal_set_repeated_wall_time_option
  212. */
  213. public function setRepeatedWallTimeOption(int $option) {} // TODO make return type void
  214. /**
  215. * @return bool
  216. * @alias intlcal_set_skipped_wall_time_option
  217. */
  218. public function setSkippedWallTimeOption(int $option) {} // TODO make return type void
  219. /**
  220. * @tentative-return-type
  221. * @alias intlcal_set_time
  222. */
  223. public function setTime(float $timestamp): bool {}
  224. /**
  225. * @param IntlTimeZone|DateTimeZone|string|null $timezone
  226. * @tentative-return-type
  227. * @alias intlcal_set_time_zone
  228. */
  229. public function setTimeZone($timezone): bool {}
  230. /**
  231. * @tentative-return-type
  232. * @alias intlcal_to_date_time
  233. */
  234. public function toDateTime(): DateTime|false {}
  235. }
  236. class IntlGregorianCalendar extends IntlCalendar
  237. {
  238. /**
  239. * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
  240. * @param string|int|null $localeOrMonth
  241. * @param int $day
  242. * @param int $hour
  243. * @param int $minute
  244. * @param int $second
  245. */
  246. public function __construct($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN) {}
  247. /**
  248. * @tentative-return-type
  249. * @alias intlgregcal_set_gregorian_change
  250. */
  251. public function setGregorianChange(float $timestamp): bool {}
  252. /**
  253. * @tentative-return-type
  254. * @alias intlgregcal_get_gregorian_change
  255. */
  256. public function getGregorianChange(): float {}
  257. /**
  258. * @tentative-return-type
  259. * @alias intlgregcal_is_leap_year
  260. */
  261. public function isLeapYear(int $year): bool {}
  262. }