67acc7331f5abe70f534e08ad3f972e699dc3dc1c8c4bbc6877dc3f75e40433f6316c4fb8c88be7fde090ecc512e397eb41289c3895c17cd3f4f776d84608c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import { Duration } from './constructor';
  2. var proto = Duration.prototype;
  3. import { abs } from './abs';
  4. import { add, subtract } from './add-subtract';
  5. import {
  6. as,
  7. asMilliseconds,
  8. asSeconds,
  9. asMinutes,
  10. asHours,
  11. asDays,
  12. asWeeks,
  13. asMonths,
  14. asQuarters,
  15. asYears,
  16. valueOf,
  17. } from './as';
  18. import { bubble } from './bubble';
  19. import { clone } from './clone';
  20. import {
  21. get,
  22. milliseconds,
  23. seconds,
  24. minutes,
  25. hours,
  26. days,
  27. months,
  28. years,
  29. weeks,
  30. } from './get';
  31. import { humanize } from './humanize';
  32. import { toISOString } from './iso-string';
  33. import { lang, locale, localeData } from '../moment/locale';
  34. import { isValid } from './valid';
  35. proto.isValid = isValid;
  36. proto.abs = abs;
  37. proto.add = add;
  38. proto.subtract = subtract;
  39. proto.as = as;
  40. proto.asMilliseconds = asMilliseconds;
  41. proto.asSeconds = asSeconds;
  42. proto.asMinutes = asMinutes;
  43. proto.asHours = asHours;
  44. proto.asDays = asDays;
  45. proto.asWeeks = asWeeks;
  46. proto.asMonths = asMonths;
  47. proto.asQuarters = asQuarters;
  48. proto.asYears = asYears;
  49. proto.valueOf = valueOf;
  50. proto._bubble = bubble;
  51. proto.clone = clone;
  52. proto.get = get;
  53. proto.milliseconds = milliseconds;
  54. proto.seconds = seconds;
  55. proto.minutes = minutes;
  56. proto.hours = hours;
  57. proto.days = days;
  58. proto.weeks = weeks;
  59. proto.months = months;
  60. proto.years = years;
  61. proto.humanize = humanize;
  62. proto.toISOString = toISOString;
  63. proto.toString = toISOString;
  64. proto.toJSON = toISOString;
  65. proto.locale = locale;
  66. proto.localeData = localeData;
  67. // Deprecations
  68. import { deprecate } from '../utils/deprecate';
  69. proto.toIsoString = deprecate(
  70. 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
  71. toISOString
  72. );
  73. proto.lang = lang;