(function() {
    var moment, strftimeFormats = {}, phpFormats = {};

    if (typeof require !== "undefined" && require !== null) {
        moment = require('moment');
    } else {
        moment = this.moment;
    }

    function translatePhpFormat(item) {
        if (item.charAt(0) === "\\") {
            return item.replace("\\", "");
        }

        switch (item) {
            case "D":
                return "ddd";
            case "l":
                return "dddd";
            case "M":
                return "MMM";
            case "F":
                return "MMMM";
            case "j":
                return "D";
            case "m":
                return "MM";
            case "A":
                return "A";
            case "a":
                return "a";
            case "s":
                return "ss";
            case "i":
                return "mm";
            case "H":
                return "HH";
            case "g":
                return "h";
            case "h":
                return "hh";
            case "w":
                return "d";
            case "W":
                return "ww";
            case "y":
                return "YY";
            case "o":
            case "Y":
                return "YYYY";
            case "O":
                return "ZZ";
            case "z":
                return "DDD";
            case "d":
                return "DD";
            case "n":
                return "M";
            case "G":
                return "H";
            case "e":
                return "zz";
            default:
                return item;
        }
    }

    function translateStrftimeToMoment(item) {
        if (item.substring(0, 2) === "%%") {
            return item.replace("%%", "%");
        }

        switch (item) {
            case "%a":
                return "ddd";
            case "%A":
                return "dddd";
            case "%h":
            case "%b":
                return "MMM";
            case "%B":
                return "MMMM";
            case "%c":
                return "LLLL";
            case "%d":
                return "D";
            case "%j":
                return "DDDD";
            case "%e":
                return "Do";
            case "%m":
                return "MM";
            case "%p":
                return "A";
            case "%P":
                return "a";
            case "%S":
                return "ss";
            case "%M":
                return "mm";
            case "%H":
                return "HH";
            case "%I":
                return "hh";
            case "%w":
                return "d";
            case "%W":
            case "%U":
                return "ww";
            case "%x":
                return "LL";
            case "%X":
                return "LT";
            case "%g":
            case "%y":
                return "YY";
            case "%G":
            case "%Y":
                return "YYYY";
            case "%z":
                return "ZZ";
            case "%Z":
                return "z";
            case "%f":
                return "SSS";
            default:
                return item;
        }
    }

    // Put private copy on moment namespace. Useful for tests.
    moment.fn.__translateStrftimeToMoment = translateStrftimeToMoment;
    moment.fn.__translatePhpFormat = translatePhpFormat;

    moment.fn.strftime = function(format) {
        if (!strftimeFormats[format]) {
            strftimeFormats[format] = format.replace(/%?.|%%/g, translateStrftimeToMoment);
        }
        return this.format(strftimeFormats[format]);
    };

    moment.fn.phpFormat = function(format) {
        if (!phpFormats[format]) {
            phpFormats[format] = format.replace(/\\?./g, translatePhpFormat);
        }
        return this.format(phpFormats[format]);
    };

    if (typeof module !== "undefined" && module !== null) {
        module.exports = moment;
    } else {
        this.moment = moment;
    }
}).call(this);

@@ -3432,16 +3432,29 @@
 strftime
+ConvertFormat
  = funct
@@ -3517,18 +3517,16 @@
         
-  
 strftime
@@ -3599,32 +3599,124 @@
 ent);%0A        %7D%0A
+        return strftimeFormats%5Bformat%5D;%0A    %7D;%0A%0A    moment.fn.strftime = function(format) %7B%0A
         return t
@@ -3726,24 +3726,31 @@
 .format(
+moment.
 strftime
 Formats%5B
@@ -3741,31 +3741,37 @@
 strftime
+Convert
 Format
-s%5B
+(
 format
-%5D
+)
 );%0A    %7D
@@ -3790,16 +3790,23 @@
 t.fn.php
+Convert
 Format =
@@ -3852,34 +3852,32 @@
 mats%5Bformat%5D) %7B%0A
-  
           phpFor
@@ -3965,38 +3965,139 @@
 urn 
-this.format(php
+phpFormats%5Bformat%5D;%0A    %7D;%0A%0A    moment.fn.phpFormat = function(format) %7B%0A        return this.format(moment.phpConvert
 Format
-s%5B
+(
 format
-%5D
+)
 );%0A 

Allow conversion of format without processing the date