Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* encapsulated execution added

  • Loading branch information...
commit 819048e6696de807705783e2716801c9fc52e024 1 parent e3bc7f7
@barbir authored
Showing with 7 additions and 3 deletions.
  1. +1 −1  README.md
  2. +6 −2 js/date-format.js
View
2  README.md
@@ -1,4 +1,4 @@
-Javascript Date Format Patch 0.9.11
+Javascript Date Format Patch 0.9.12
================================================================================================
About
View
8 js/date-format.js
@@ -1,8 +1,8 @@
/*
* ----------------------------------------------------------------------------
* Package: JS Date Format Patch
- * Version: 0.9.11
- * Date: 2012-04-12
+ * Version: 0.9.12
+ * Date: 2012-07-06
* Description: In lack of decent formatting ability of Javascript Date object,
* I have created this "patch" for the Date object which will add
* "Date.format(dateObject, format)" static function, and the
@@ -21,6 +21,8 @@
* ----------------------------------------------------------------------------
*/
+(function(){
+
// extend the Javascript Date class with the "format" static function which will format
// the provided date object using the provided format string
Date.format = function (date, format)
@@ -318,3 +320,5 @@ Date.prototype.fromFormattedString = function(value, format)
this.setTime(Date.parseFormatted(value, format).getTime());
return this;
};
+
+})();
Please sign in to comment.
Something went wrong with that request. Please try again.