Skip to content

Instantly share code, notes, and snippets.

@Kichrum
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kichrum/571196dc937eda00e113 to your computer and use it in GitHub Desktop.
Save Kichrum/571196dc937eda00e113 to your computer and use it in GitHub Desktop.
Just convert '2015-08-02T00:00:00Z' to '2015-08-02 00:00:00'
angular.module('date-time-filter')
.filter('dateTimeFilter', () => input => 'string' === typeof input ? input.replace(/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})Z$/, '$1 $2') : input);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment