What is @formatjs/icu-skeleton-parser?
The @formatjs/icu-skeleton-parser package is a utility for parsing ICU MessageFormat patterns into an abstract syntax tree (AST). It is part of the FormatJS suite of libraries, which are designed to help with internationalization of applications. This package specifically deals with the parsing of ICU MessageFormat skeletons, which are shorthand for specifying date and time formats.
Parsing ICU MessageFormat skeletons
This feature allows you to parse ICU MessageFormat skeletons into an AST. The code sample demonstrates how to parse a simple date skeleton ('MMMd') which represents a format like 'Jul 20'.
const { parse } = require('@formatjs/icu-skeleton-parser');
const ast = parse('MMMd');
console.log(ast);