javascript-time-ago
Advanced tools
Comparing version 0.2.3 to 0.2.4
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99672
16
1897
2