Skip to content

Instantly share code, notes, and snippets.

@Kichrum

Kichrum/dateTimeFilter.js

Last active Aug 29, 2015
Embed
What would you like to do?
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
You can’t perform that action at this time.