date-format 0.0.1 → 0.0.2

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 (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": {