twitter_cldr

JavaScript implementation of the ICU (International Components for Unicode) that uses the Common Locale Data Repository to format dates, plurals, and more. Based on twitter-cldr-rb

Usage no npm install needed!

<script type="module">
  import twitterCldr from 'https://cdn.skypack.dev/twitter_cldr';
</script>

README

twitter-cldr-npm

TwitterCldr npm package.

Installation

Installation is easy with npm:

npm install twitter_cldr

Loading It Up

var TwitterCldr = require('twitter_cldr').load('en');
var formatter = new TwitterCldr.DateTimeFormatter();
formatter.format(new Date(), {"type": "full"});

Usage

See usage documentation for twitter-cldr-js.

Dependencies

  • None.

Tests

See twitter-cldr-js for test suite.

Authors

Links

License

Copyright 2019 Twitter, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0