Last active
August 29, 2015 14:19
-
-
Save relyky/cbde19df01ad8850a706 to your computer and use it in GitHub Desktop.
JavaScript - forEach example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//# sub-sequence | |
$scope.convertDateFormat = function() | |
{ | |
// 子檔 | |
if (Array.isArray($scope.dataItems.POP_HANDLING_CARGO_LIST)) { | |
$scope.dataItems.POP_HANDLING_CARGO_LIST | |
.forEach(function (itm) { | |
itm.START_DT = new Date(itm.START_DT).dateFormat("Y/m/d h:i"); | |
itm.END_DT = new Date(itm.END_DT).dateFormat("Y/m/d h:i"); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment