f8ac8061ce5f24642bcc69f77f0d07c3b337d8c759e02739ed188625bd2db956d16e556a675d3c0e419f9ee69f28ba3abbdc58c9feed4ad33056b79a3d89d7 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { Duration } from './constructor';
  2. var proto = Duration.prototype;
  3. import { abs } from './abs';
  4. import { add, subtract } from './add-subtract';
  5. import { as, asMilliseconds, asSeconds, asMinutes, asHours, asDays, asWeeks, asMonths, asYears, valueOf } from './as';
  6. import { bubble } from './bubble';
  7. import { get, milliseconds, seconds, minutes, hours, days, months, years, weeks } from './get';
  8. import { humanize } from './humanize';
  9. import { toISOString } from './iso-string';
  10. import { lang, locale, localeData } from '../moment/locale';
  11. proto.abs = abs;
  12. proto.add = add;
  13. proto.subtract = subtract;
  14. proto.as = as;
  15. proto.asMilliseconds = asMilliseconds;
  16. proto.asSeconds = asSeconds;
  17. proto.asMinutes = asMinutes;
  18. proto.asHours = asHours;
  19. proto.asDays = asDays;
  20. proto.asWeeks = asWeeks;
  21. proto.asMonths = asMonths;
  22. proto.asYears = asYears;
  23. proto.valueOf = valueOf;
  24. proto._bubble = bubble;
  25. proto.get = get;
  26. proto.milliseconds = milliseconds;
  27. proto.seconds = seconds;
  28. proto.minutes = minutes;
  29. proto.hours = hours;
  30. proto.days = days;
  31. proto.weeks = weeks;
  32. proto.months = months;
  33. proto.years = years;
  34. proto.humanize = humanize;
  35. proto.toISOString = toISOString;
  36. proto.toString = toISOString;
  37. proto.toJSON = toISOString;
  38. proto.locale = locale;
  39. proto.localeData = localeData;
  40. // Deprecations
  41. import { deprecate } from '../utils/deprecate';
  42. proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString);
  43. proto.lang = lang;