harana / scalajs-react-timeago

Scala.js facade for the react-timeago library.

GitHub

scalajs-react-timeago

Build Status Maven Central Scala.js

Scala.js facade for the react-timeago library.

Setup

SBT

Add these dependencies to your build file:

libraryDependencies ++= Seq(
  "com.github.japgolly.scalajs-react" %%% "core" % "1.2.3",
  "com.github.japgolly.scalajs-react" %%% "extra" % "1.2.3",
  "com.harana" %%% "scalajs-react-timeago" % "1.1.0"
)

The artifacts are published to Sonatype so ensure you have it included:

resolvers += Resolver.sonatypeRepo("releases")

Usage

Examples:

TimeAgo(new js.Date(1990, 9, 1, 10, 33, 30, 0))
TimeAgo("Dec 25, 1995")
TimeAgo(new js.Date(), live = true)

Demo

This will start a web server on http://localhost:8080:

sbt 
fastOptJS::webpack
demo/compile:fastOptJS::startWebpackDevServer

License

BSD 3

Harana

Harana is an AI-powered data catalog.

It automatically imports metadata from all your favourite tools: Confluence, AWS Glue, Kafka, PostgreSQL, MySQL, Oracle, SQL Server, IBM DB2, SQLite, Hive, CouchDB, MongoDB, HBase, Cassandra, ElasticSearch, DynamoDB, Salesforce, SugarCRM, Excel, CSV, XML, JSON.