8406a348b49ef4438430396df29a1d2590ab1eacc92cd9d126d3cb5e0af1971a6cacf62052ac4ca4bd5ca1f3013b56355a85610951b9893572ebe73e18dc3f 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import { Locale } from './constructor';
  2. var proto = Locale.prototype;
  3. import { calendar } from './calendar';
  4. import { longDateFormat } from './formats';
  5. import { invalidDate } from './invalid';
  6. import { ordinal } from './ordinal';
  7. import { preParsePostFormat } from './pre-post-format';
  8. import { relativeTime, pastFuture } from './relative';
  9. import { set } from './set';
  10. proto.calendar = calendar;
  11. proto.longDateFormat = longDateFormat;
  12. proto.invalidDate = invalidDate;
  13. proto.ordinal = ordinal;
  14. proto.preparse = preParsePostFormat;
  15. proto.postformat = preParsePostFormat;
  16. proto.relativeTime = relativeTime;
  17. proto.pastFuture = pastFuture;
  18. proto.set = set;
  19. // Eras
  20. import {
  21. localeEras,
  22. localeErasParse,
  23. localeErasConvertYear,
  24. erasAbbrRegex,
  25. erasNameRegex,
  26. erasNarrowRegex,
  27. } from '../units/era';
  28. proto.eras = localeEras;
  29. proto.erasParse = localeErasParse;
  30. proto.erasConvertYear = localeErasConvertYear;
  31. proto.erasAbbrRegex = erasAbbrRegex;
  32. proto.erasNameRegex = erasNameRegex;
  33. proto.erasNarrowRegex = erasNarrowRegex;
  34. // Month
  35. import {
  36. localeMonthsParse,
  37. localeMonths,
  38. localeMonthsShort,
  39. monthsRegex,
  40. monthsShortRegex,
  41. } from '../units/month';
  42. proto.months = localeMonths;
  43. proto.monthsShort = localeMonthsShort;
  44. proto.monthsParse = localeMonthsParse;
  45. proto.monthsRegex = monthsRegex;
  46. proto.monthsShortRegex = monthsShortRegex;
  47. // Week
  48. import {
  49. localeWeek,
  50. localeFirstDayOfYear,
  51. localeFirstDayOfWeek,
  52. } from '../units/week';
  53. proto.week = localeWeek;
  54. proto.firstDayOfYear = localeFirstDayOfYear;
  55. proto.firstDayOfWeek = localeFirstDayOfWeek;
  56. // Day of Week
  57. import {
  58. localeWeekdaysParse,
  59. localeWeekdays,
  60. localeWeekdaysMin,
  61. localeWeekdaysShort,
  62. weekdaysRegex,
  63. weekdaysShortRegex,
  64. weekdaysMinRegex,
  65. } from '../units/day-of-week';
  66. proto.weekdays = localeWeekdays;
  67. proto.weekdaysMin = localeWeekdaysMin;
  68. proto.weekdaysShort = localeWeekdaysShort;
  69. proto.weekdaysParse = localeWeekdaysParse;
  70. proto.weekdaysRegex = weekdaysRegex;
  71. proto.weekdaysShortRegex = weekdaysShortRegex;
  72. proto.weekdaysMinRegex = weekdaysMinRegex;
  73. // Hours
  74. import { localeIsPM, localeMeridiem } from '../units/hour';
  75. proto.isPM = localeIsPM;
  76. proto.meridiem = localeMeridiem;