mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
fix ordering e2e failing test (#4825)
* ordering fix use common method in datatable * ordering fix use common method in datatable * fix sorting ps e2e * fix ordering * move search page in testing and fix sorting boolean flag * fix import * fix moment * use common sort method in document list test * use common sort method in document list test * remove unnecesary sort control * remove duplicate test * remove e2e suspended removed status * documentation
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as moment from 'moment';
|
||||
|
||||
export class DateUtil {
|
||||
|
||||
static formatDate(dateFormat: string, date: Date = new Date, days: number | string = 0): string {
|
||||
return moment(date).add(days, 'days').format(dateFormat);
|
||||
}
|
||||
|
||||
static parse(date: string, dateFormat: string = 'DD-MM-YY'): Date {
|
||||
return moment(date, dateFormat).toDate();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user