timesago
Version:
A simple & lightweight js library that make it easy to convert timestamps into human-readable time ago statements (eg. '2 hours ago' or 'in 3 days.')
18 lines (15 loc) • 407 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>timesago</title>
</head>
<body>
<script src="../dist/timesago.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/timesago@1"></script> -->
<script>
console.log(timesago('December 17, 2022'));
</script>
</body>
</html>