Socket
Socket
Sign inDemoInstall

javascript-time-ago

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

javascript-time-ago - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

index.es6.js

10

package.json
{
"name": "javascript-time-ago",
"version": "0.2.3",
"version": "0.2.4",
"description": "International highly customizable relative time formatting",
"main": "build/index.js",
"jsnext:main": "source/index.js",
"main": "index.umd.js",
"jsnext:main": "index.es6.js",
"browser": {
"./locales": false,
"./locales.js": false
},
"peerDependencies": {

@@ -8,0 +12,0 @@ "intl-messageformat": "^1.3.0"

@@ -76,9 +76,9 @@ # javascript-time-ago

time_ago_english.format(new Date(Date.now() + 60 * 1000))
time_ago_english.format(new Date(Date.now() - 60 * 1000))
// "a minute ago"
time_ago_english.format(new Date(Date.now() + 2 * 60 * 60 * 1000))
time_ago_english.format(new Date(Date.now() - 2 * 60 * 60 * 1000))
// "2 hours ago"
time_ago_english.format(new Date(Date.now() + 24 * 60 * 60 * 1000))
time_ago_english.format(new Date(Date.now() - 24 * 60 * 60 * 1000))
// "yesterday"

@@ -91,9 +91,9 @@

time_ago_russian.format(new Date(Date.now() + 60 * 1000)))
time_ago_russian.format(new Date(Date.now() - 60 * 1000)))
// "минуту назад"
time_ago_russian.format(new Date(Date.now() + 2 * 60 * 60 * 1000)))
time_ago_russian.format(new Date(Date.now() - 2 * 60 * 60 * 1000)))
// "2 часа назад"
time_ago_russian.format(new Date(Date.now() + 24 * 60 * 60 * 1000))
time_ago_russian.format(new Date(Date.now() - 24 * 60 * 60 * 1000))
// "вчера"

@@ -125,6 +125,6 @@ ```

time_ago.format(new Date(Date.now() + 60 * 1000), twitter)
time_ago.format(new Date(Date.now() - 60 * 1000), twitter)
// "1m"
time_ago.format(new Date(Date.now() + 2 * 60 * 60 * 1000), twitter)
time_ago.format(new Date(Date.now() - 2 * 60 * 60 * 1000), twitter)
// "2h"

@@ -264,3 +264,3 @@ ```

const time_ago = new javascript_time_ago('ru')
time_ago.format(new Date(Date.now() + 60 * 1000))
time_ago.format(new Date(Date.now() - 60 * 1000))
// "1 минуту назад"

@@ -267,0 +267,0 @@ ```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc