fe0f977a1ef862219d3daddf37712dc2f731bc4ba160995938ede42f3a253a0f90b08d4a38de589a0e9160eafa826f1286ee507313ee7aeb8a455accf1d156 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. // Month
  20. import {
  21. localeMonthsParse,
  22. localeMonths,
  23. localeMonthsShort,
  24. monthsRegex,
  25. monthsShortRegex
  26. } from '../units/month';
  27. proto.months = localeMonths;
  28. proto.monthsShort = localeMonthsShort;
  29. proto.monthsParse = localeMonthsParse;
  30. proto.monthsRegex = monthsRegex;
  31. proto.monthsShortRegex = monthsShortRegex;
  32. // Week
  33. import { localeWeek, localeFirstDayOfYear, localeFirstDayOfWeek } from '../units/week';
  34. proto.week = localeWeek;
  35. proto.firstDayOfYear = localeFirstDayOfYear;
  36. proto.firstDayOfWeek = localeFirstDayOfWeek;
  37. // Day of Week
  38. import {
  39. localeWeekdaysParse,
  40. localeWeekdays,
  41. localeWeekdaysMin,
  42. localeWeekdaysShort,
  43. weekdaysRegex,
  44. weekdaysShortRegex,
  45. weekdaysMinRegex
  46. } from '../units/day-of-week';
  47. proto.weekdays = localeWeekdays;
  48. proto.weekdaysMin = localeWeekdaysMin;
  49. proto.weekdaysShort = localeWeekdaysShort;
  50. proto.weekdaysParse = localeWeekdaysParse;
  51. proto.weekdaysRegex = weekdaysRegex;
  52. proto.weekdaysShortRegex = weekdaysShortRegex;
  53. proto.weekdaysMinRegex = weekdaysMinRegex;
  54. // Hours
  55. import { localeIsPM, localeMeridiem } from '../units/hour';
  56. proto.isPM = localeIsPM;
  57. proto.meridiem = localeMeridiem;