proydate 1.0.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.
Files changed (3) hide show
  1. package/README.md +8 -0
  2. package/package.json +16 -0
  3. package/src/index.js +23 -0
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # Project Date
2
+
3
+ Una utilida para manejar fechas en puto formato timestamp y long time
4
+
5
+ # Install
6
+ bash
7
+
8
+ npm install proydate
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "proydate",
3
+ "version": "1.0.0",
4
+ "description": "Utilidad paras trabajar con fechas en Node.js",
5
+ "main": "src/index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "date",
11
+ "nodejs"
12
+ ],
13
+ "author": "Sebas puto amo",
14
+ "license": "MIT",
15
+ "type": "commonjs"
16
+ }
package/src/index.js ADDED
@@ -0,0 +1,23 @@
1
+ function getTimestamp(){
2
+ return Date.now();
3
+
4
+ }
5
+
6
+ function getLongTime(locale = 'es-ES'){
7
+ const options = {
8
+ weekdat: 'long',
9
+ year: 'numeric',
10
+ month: 'long',
11
+ day: 'numeric',
12
+ hour: 'numeric',
13
+ minute: 'numeric',
14
+ second: 'numeric',
15
+ timeZoneName: 'short'
16
+ }
17
+ return new Date().toLocaleString(locale, options);
18
+ }
19
+
20
+ module.exports = {
21
+ getTimestamp,
22
+ getLongTime
23
+ };