@mctinetti/platzidate 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,4 +5,7 @@ Una utilidad para manejar fechas en formato timestamp y long time
5
5
 
6
6
  ```bash
7
7
  npm install platzidate
8
- ```
8
+ ```
9
+
10
+ # Changes
11
+ v1.1.0 Add the getNowDay function
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mctinetti/platzidate",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/src/index.js CHANGED
@@ -17,7 +17,12 @@ function getLongTime(locale = 'es-ES'){
17
17
  return new Date().toLocaleString(locale,options)
18
18
  }
19
19
 
20
+ function getNowDay(){
21
+ return new Date().toLocaleDateString('en-US', { weekday: 'long' });
22
+ }
23
+
20
24
  module.exports = {
21
25
  getTimestamp,
22
- getLongTime
26
+ getLongTime,
27
+ getNowDay
23
28
  }