diff --git a/app/code/Magento/SalesInventory/composer.json b/app/code/Magento/SalesInventory/composer.json index fa06db402a286f5f37b2b1991d2c8c49665bd1d8..07bbc9aeba4827a9fa0f78025c647932d0ca6910 100644 --- a/app/code/Magento/SalesInventory/composer.json +++ b/app/code/Magento/SalesInventory/composer.json @@ -10,7 +10,7 @@ "magento/framework": "100.2.*" }, "type": "magento2-module", - "version": "100.0.0-dev", + "version": "100.2.0-dev", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Ui/view/base/web/js/form/element/date.js b/app/code/Magento/Ui/view/base/web/js/form/element/date.js index 202cfe93069b02bad6ff888a51b9661a54109e54..eb8dfb4b4057e8c7d8cf274062788a5849114d09 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/element/date.js +++ b/app/code/Magento/Ui/view/base/web/js/form/element/date.js @@ -53,13 +53,12 @@ define([ pickerDefaultDateFormat: 'MM/dd/y', // ICU Date Format pickerDefaultTimeFormat: 'h:mm a', // ICU Time Format + elementTmpl: 'ui/form/element/date', + /** - * Moment compatible format used for moment conversion - * of date from datePicker + * Format needed by moment timezone for conversion */ - momentFormat: 'MM/DD/YYYY', - - elementTmpl: 'ui/form/element/date', + timezoneFormat: 'YYYY-MM-DD HH:mm', listens: { 'value': 'onValueChange', @@ -141,15 +140,17 @@ define([ */ onShiftedValueChange: function (shiftedValue) { var value, - formattedValue; + formattedValue, + momentValue; if (shiftedValue) { + momentValue = moment(shiftedValue, this.pickerDateTimeFormat); + if (this.options.showsTime) { - formattedValue = moment(shiftedValue).format('YYYY-MM-DD HH:mm'); + formattedValue = moment(momentValue).format(this.timezoneFormat); value = moment.tz(formattedValue, this.storeTimeZone).tz('UTC').toISOString(); } else { - value = moment(shiftedValue, this.momentFormat); - value = value.format(this.outputDateFormat); + value = momentValue.format(this.outputDateFormat); } } else { value = ''; @@ -166,8 +167,6 @@ define([ */ prepareDateTimeFormats: function () { this.pickerDateTimeFormat = this.options.dateFormat; - this.momentFormat = this.options.dateFormat ? - utils.convertToMomentFormat(this.options.dateFormat) : this.momentFormat; if (this.options.showsTime) { this.pickerDateTimeFormat += ' ' + this.options.timeFormat; diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less index 00b2c23450ff7881c5a9acca30df491b7001187c..782b78672f7aebd3d7038544dbb56884e680dd6d 100644 --- a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less +++ b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less @@ -81,9 +81,11 @@ ); } - .sorter.sort-desc { - &:before { - content: @icon-arrow-down; + .sorter { + .sort-desc { + &:before { + content: @icon-arrow-down; + } } } diff --git a/composer.json b/composer.json index 7840f84720b6cac97073647c90c184315a80eb4b..11fe00b7ed45add98a8996bea8a480403d44a53c 100644 --- a/composer.json +++ b/composer.json @@ -151,7 +151,7 @@ "magento/module-rss": "100.2.0-dev", "magento/module-rule": "100.2.0-dev", "magento/module-sales": "100.2.0-dev", - "magento/module-sales-inventory": "100.0.0-dev", + "magento/module-sales-inventory": "100.2.0-dev", "magento/module-sales-rule": "100.2.0-dev", "magento/module-sales-sequence": "100.2.0-dev", "magento/module-sample-data": "100.2.0-dev", diff --git a/composer.lock b/composer.lock index 7b3c6ccc9928df82fc72f6e397d1b98d3f2823d0..e69e12953fea2c150e1e063ddb9502148aad38ec 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "8c0f23eee8426e8aeba5a897f6f2ccbd", - "content-hash": "600aca1692cf3fe5c2ea1cbf66de09ab", + "hash": "01335ef9c76fd6d77bf6bd9236b84d03", + "content-hash": "07be52ec4880d0390acff2dd605a194d", "packages": [ { "name": "braintree/braintree_php", @@ -56,7 +56,7 @@ }, { "name": "colinmollenhour/cache-backend-file", - "version": "1.4.0", + "version": "1.4", "source": { "type": "git", "url": "https://github.com/colinmollenhour/Cm_Cache_Backend_File.git", @@ -818,16 +818,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "c0125896dbb151380ab47e96c621741e79623beb" + "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c0125896dbb151380ab47e96c621741e79623beb", - "reference": "c0125896dbb151380ab47e96c621741e79623beb", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", + "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", "shasum": "" }, "require": { @@ -862,7 +862,7 @@ "pseudorandom", "random" ], - "time": "2016-10-17 15:23:22" + "time": "2016-11-07 23:38:38" }, { "name": "pelago/emogrifier", @@ -1189,16 +1189,16 @@ }, { "name": "seld/jsonlint", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "e827b5254d3e58c736ea2c5616710983d80b0b70" + "reference": "19495c181d6d53a0a13414154e52817e3b504189" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e827b5254d3e58c736ea2c5616710983d80b0b70", - "reference": "e827b5254d3e58c736ea2c5616710983d80b0b70", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/19495c181d6d53a0a13414154e52817e3b504189", + "reference": "19495c181d6d53a0a13414154e52817e3b504189", "shasum": "" }, "require": { @@ -1231,7 +1231,7 @@ "parser", "validator" ], - "time": "2016-09-14 15:17:56" + "time": "2016-11-14 17:59:58" }, { "name": "seld/phar-utils", @@ -1390,16 +1390,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.8.12", + "version": "v2.8.15", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8" + "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8", - "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/25c576abd4e0f212e678fe8b2bd9a9a98c7ea934", + "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934", "shasum": "" }, "require": { @@ -1446,20 +1446,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-07-28 16:56:28" + "time": "2016-10-13 01:43:15" }, { "name": "symfony/filesystem", - "version": "v2.8.12", + "version": "v2.8.15", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf" + "reference": "a3784111af9f95f102b6411548376e1ae7c93898" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/44b499521defddf2eae17a18c811bbdae4f98bdf", - "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a3784111af9f95f102b6411548376e1ae7c93898", + "reference": "a3784111af9f95f102b6411548376e1ae7c93898", "shasum": "" }, "require": { @@ -1495,20 +1495,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-09-06 10:55:00" + "time": "2016-10-18 04:28:30" }, { "name": "symfony/finder", - "version": "v3.1.5", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "205b5ffbb518a98ba2ae60a52656c4a31ab00c6f" + "reference": "a69cb5d455b4885ca376dc5bb3e1155cc8c08c4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/205b5ffbb518a98ba2ae60a52656c4a31ab00c6f", - "reference": "205b5ffbb518a98ba2ae60a52656c4a31ab00c6f", + "url": "https://api.github.com/repos/symfony/finder/zipball/a69cb5d455b4885ca376dc5bb3e1155cc8c08c4b", + "reference": "a69cb5d455b4885ca376dc5bb3e1155cc8c08c4b", "shasum": "" }, "require": { @@ -1517,7 +1517,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1544,20 +1544,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-09-28 00:11:12" + "time": "2016-12-13 09:39:43" }, { "name": "symfony/process", - "version": "v2.8.12", + "version": "v2.8.15", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f" + "reference": "1a1bd056395540d0bc549d39818316513565d278" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f", - "reference": "024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f", + "url": "https://api.github.com/repos/symfony/process/zipball/1a1bd056395540d0bc549d39818316513565d278", + "reference": "1a1bd056395540d0bc549d39818316513565d278", "shasum": "" }, "require": { @@ -1593,7 +1593,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-09-29 14:03:54" + "time": "2016-11-24 00:43:03" }, { "name": "tedivm/jshrink", @@ -3242,16 +3242,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v1.12.2", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "baa7112bef3b86c65fcfaae9a7a50436e3902b41" + "reference": "0ea4f7ed06ca55da1d8fc45da26ff87f261c4088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/baa7112bef3b86c65fcfaae9a7a50436e3902b41", - "reference": "baa7112bef3b86c65fcfaae9a7a50436e3902b41", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/0ea4f7ed06ca55da1d8fc45da26ff87f261c4088", + "reference": "0ea4f7ed06ca55da1d8fc45da26ff87f261c4088", "shasum": "" }, "require": { @@ -3296,7 +3296,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2016-09-27 07:57:59" + "time": "2016-12-01 00:05:05" }, { "name": "lusitanian/oauth", @@ -3407,21 +3407,21 @@ }, { "name": "phpmd/phpmd", - "version": "2.4.3", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "2b9c2417a18696dfb578b38c116cd0ddc19b256e" + "reference": "9298602a922cd8c46666df8d540a60bc5925ce55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/2b9c2417a18696dfb578b38c116cd0ddc19b256e", - "reference": "2b9c2417a18696dfb578b38c116cd0ddc19b256e", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/9298602a922cd8c46666df8d540a60bc5925ce55", + "reference": "9298602a922cd8c46666df8d540a60bc5925ce55", "shasum": "" }, "require": { "pdepend/pdepend": "^2.0.4", - "php": ">=5.3.0" + "php": ">=5.3.9" }, "require-dev": { "phpunit/phpunit": "^4.0", @@ -3468,7 +3468,7 @@ "phpmd", "pmd" ], - "time": "2016-04-04 11:52:04" + "time": "2016-11-23 20:33:32" }, { "name": "phpunit/php-code-coverage", @@ -3664,16 +3664,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "1.4.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", "shasum": "" }, "require": { @@ -3709,7 +3709,7 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2016-11-15 14:06:22" }, { "name": "phpunit/phpunit", @@ -3843,22 +3843,22 @@ }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f", + "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -3903,7 +3903,7 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2016-11-19 09:18:40" }, { "name": "sebastian/diff", @@ -4329,22 +4329,25 @@ }, { "name": "symfony/config", - "version": "v2.8.12", + "version": "v2.8.15", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "f8b1922bbda9d2ac86aecd649399040bce849fde" + "reference": "b522856007b258f46d5ee35d3b7b235c11e76e86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/f8b1922bbda9d2ac86aecd649399040bce849fde", - "reference": "f8b1922bbda9d2ac86aecd649399040bce849fde", + "url": "https://api.github.com/repos/symfony/config/zipball/b522856007b258f46d5ee35d3b7b235c11e76e86", + "reference": "b522856007b258f46d5ee35d3b7b235c11e76e86", "shasum": "" }, "require": { "php": ">=5.3.9", "symfony/filesystem": "~2.3|~3.0.0" }, + "require-dev": { + "symfony/yaml": "~2.7|~3.0.0" + }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" }, @@ -4378,20 +4381,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-09-14 20:31:12" + "time": "2016-12-10 08:21:45" }, { "name": "symfony/dependency-injection", - "version": "v2.8.12", + "version": "v2.8.15", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "ee9ec9ac2b046462d341e9de7c4346142d335e75" + "reference": "51a7b5385fb0f42e5edbdb2cfbad1a011ecdaee7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ee9ec9ac2b046462d341e9de7c4346142d335e75", - "reference": "ee9ec9ac2b046462d341e9de7c4346142d335e75", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/51a7b5385fb0f42e5edbdb2cfbad1a011ecdaee7", + "reference": "51a7b5385fb0f42e5edbdb2cfbad1a011ecdaee7", "shasum": "" }, "require": { @@ -4441,20 +4444,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2016-09-24 09:47:20" + "time": "2016-12-08 14:41:31" }, { "name": "symfony/stopwatch", - "version": "v3.1.5", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1" + "reference": "5b139e1c4290e6c7640ba80d9c9b5e49ef22b841" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/bb42806b12c5f89db4ebf64af6741afe6d8457e1", - "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b139e1c4290e6c7640ba80d9c9b5e49ef22b841", + "reference": "5b139e1c4290e6c7640ba80d9c9b5e49ef22b841", "shasum": "" }, "require": { @@ -4463,7 +4466,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -4490,20 +4493,20 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" + "time": "2016-06-29 05:43:10" }, { "name": "symfony/yaml", - "version": "v2.8.12", + "version": "v2.8.15", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c" + "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c", - "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff", + "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff", "shasum": "" }, "require": { @@ -4539,7 +4542,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-09-02 01:57:56" + "time": "2016-11-14 16:15:57" }, { "name": "theseer/fdomdocument", diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php index db43cc535ca01c4bbac96e425a435bd71ef3fcef..ddf036fd18abb1cc0c964abf7685eeaed6208a0c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php @@ -17,6 +17,20 @@ use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; */ class Curl extends AbstractCurl implements CatalogProductAttributeInterface { + /** + * Relative action path with parameters. + * + * @var string + */ + protected $urlActionPath = 'catalog/product_attribute/save/back/edit'; + + /** + * Message for Exception when was received not successful response. + * + * @var string + */ + protected $responseExceptionMessage = 'Product Attribute creating by curl handler was not successful!'; + /** * Mapping values for data. * @@ -85,14 +99,15 @@ class Curl extends AbstractCurl implements CatalogProductAttributeInterface } $data = $this->changeStructureOfTheData($data); - $url = $_ENV['app_backend_url'] . 'catalog/product_attribute/save/back/edit'; + $url = $_ENV['app_backend_url'] . $this->urlActionPath; $curl = new BackendDecorator(new CurlTransport(), $this->_configuration); $curl->write($url, $data); $response = $curl->read(); $curl->close(); if (!strpos($response, 'data-ui-id="messages-message-success"')) { - throw new \Exception("Product Attribute creating by curl handler was not successful! \n" . $response); + $this->_eventManager->dispatchEvent(['curl_failed'], [$response]); + throw new \Exception($this->responseExceptionMessage); } $resultData = []; diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element/date-time.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element/date-time.test.js new file mode 100644 index 0000000000000000000000000000000000000000..4271ecc563b9ad0cda58076489a1c0a4c2f0ccf2 --- /dev/null +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element/date-time.test.js @@ -0,0 +1,41 @@ +/** + * Copyright © 2016 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +/*eslint max-nested-callbacks: 0*/ + +define([ + 'Magento_Ui/js/form/element/date', + 'mageUtils', + 'moment' +], function (DateElement, utils, moment) { + 'use strict'; + + describe('Magento_Ui/js/form/element/date', function () { + var params, model; + + beforeEach(function () { + params = { + dataScope: 'abstract', + options: { + showsTime: true + } + }; + model = new DateElement(params); + }); + + it('Check prepareDateTimeFormats function', function () { + spyOn(utils, 'convertToMomentFormat').and.callThrough(); + model.prepareDateTimeFormats(); + expect(utils.convertToMomentFormat).toHaveBeenCalled(); + }); + + it('Check onShiftedValueChange function', function () { + spyOn(moment, 'tz').and.callThrough(); + model.onShiftedValueChange('2016-12-23 9:11 PM'); + expect(moment.tz).toHaveBeenCalled(); + }); + + }); +}); diff --git a/dev/tests/js/jasmine/tests/lib/mage/misc.test.js b/dev/tests/js/jasmine/tests/lib/mage/misc.test.js index a9ea5ed90192fa46e3e223802d872be0a32afba2..62950372d3a73f54a68f7b56d0eb67c1f982402f 100644 --- a/dev/tests/js/jasmine/tests/lib/mage/misc.test.js +++ b/dev/tests/js/jasmine/tests/lib/mage/misc.test.js @@ -15,7 +15,7 @@ define([ var format, momentFormat; format = 'M/d/yy'; - momentFormat = 'MM/DD/YYYY'; + momentFormat = 'M/DD/YYYY'; expect(utils.convertToMomentFormat(format)).toBe(momentFormat); }); diff --git a/lib/web/mage/utils/misc.js b/lib/web/mage/utils/misc.js index 29fed485f290c86f92099fc6cba68734711980d2..3fdcf3e7de542cb69ab406adcd294ed712c9cd64 100644 --- a/lib/web/mage/utils/misc.js +++ b/lib/web/mage/utils/misc.js @@ -220,7 +220,6 @@ define([ newFormat = format.replace(/yy|y/gi, 'YYYY'); // replace the year newFormat = newFormat.replace(/dd|d/g, 'DD'); // replace the date - newFormat = newFormat.replace(/mm|m/gi, 'MM'); //replace the month return newFormat; }