date-format 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/lib/index.js +4 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -45,6 +45,10 @@ function asString(/*format,*/ date) {
45
45
  format = arguments[0];
46
46
  date = arguments[1];
47
47
  }
48
+
49
+ if (!date) {
50
+ date = new Date();
51
+ }
48
52
 
49
53
  var vDay = addZero(date.getDate());
50
54
  var vMonth = addZero(date.getMonth()+1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "date-format",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "formatting Date objects as strings since 2013",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {