index.d.ts 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /**
  2. * Tools for working with
  3. * {@link http://userguide.icu-project.org/formatparse/datetime | ICU DateFormat skeletons}.
  4. *
  5. * @remarks
  6. * ```js
  7. * import {
  8. * DateFormatError,
  9. * DateToken, // TS only
  10. * getDateFormatter,
  11. * getDateFormatterSource,
  12. * parseDateTokens
  13. * } from '@messageformat/date-skeleton'
  14. * ```
  15. *
  16. * The package is released as an ES module only. If using from a CommonJS
  17. * context, you may need to `import()` it, or use a module loader like
  18. * {@link https://www.npmjs.com/package/esm | esm}.
  19. *
  20. * Uses
  21. * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat | Intl.DateTimeFormat}
  22. * internally. Position-dependent ICU DateFormat
  23. * {@link https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns | patterns}
  24. * are not supported, as they cannot be represented with Intl.DateTimeFormat options.
  25. *
  26. * @packageDocumentation
  27. */
  28. export { getDateFormatter, getDateFormatterSource } from './get-date-formatter.js';
  29. export { DateFormatError } from './options.js';
  30. export { DateToken, parseDateTokens } from './tokens.js';