simple-common-utils
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -232,6 +232,7 @@ export default class StaticUtils { | ||
static today() { | ||
static today(returnNow = false) { | ||
const now = new Date(); | ||
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); | ||
return new Date(now.getFullYear(), now.getMonth(), now.getDate()); | ||
return returnNow ? [now, today] : today; | ||
} | ||
@@ -238,0 +239,0 @@ |
{ | ||
"name": "simple-common-utils", | ||
"version": "2.3.0", | ||
"author": "Ruben Shalimov <r_shalimov@inbox.ru>", | ||
"bugs": { | ||
"url": "https://github.com/RobinBobin/simple-common-utils/issues" | ||
}, | ||
"description": "A collection of utility classes.", | ||
"homepage": "https://github.com/RobinBobin/simple-common-utils#readme", | ||
"keywords": [ | ||
"js utils" | ||
], | ||
"license": "MIT", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"name": "simple-common-utils", | ||
"repository": { | ||
@@ -13,11 +18,6 @@ "type": "git", | ||
}, | ||
"keywords": [ | ||
"js utils" | ||
], | ||
"author": "Ruben Shalimov <r_shalimov@inbox.ru>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/RobinBobin/simple-common-utils/issues" | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"homepage": "https://github.com/RobinBobin/simple-common-utils#readme" | ||
"version": "2.4.0" | ||
} |
@@ -241,5 +241,5 @@ This is a collection of utility classes used for JS development. | ||
- today() | ||
- today(returnNow = false) | ||
returns a `Date` object, representing today. | ||
Returns a `Date` object, representing today, if `returnNow` is `false`. Returns `[now, today]` otherwise. | ||
@@ -254,2 +254,3 @@ - verify(condition, errorMessage) | ||
-|- | ||
v2.4.0|1. `StaticUtils.today()`: `returnNow` added.<br>2. `package.json`: fields alphabetized. | ||
v2.3.0|`StaticUtils.today()` added. | ||
@@ -256,0 +257,0 @@ v2.2.0|`./js/processing-queue/` classes are added. |
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
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
35173
693
270