Revert "Timerange: Fixes a bug where custom time ranges didn't respect UTC (#18217)" (#18246)

This reverts commit 0752a09f92.
This commit is contained in:
kay delaney
2019-07-24 11:29:12 +01:00
committed by David
parent 0752a09f92
commit 6144c0f51d
3 changed files with 5 additions and 28 deletions

View File

@@ -5,18 +5,6 @@ import { TimeZone } from '../types';
const units: DurationUnit[] = ['y', 'M', 'w', 'd', 'h', 'm', 's'];
export function isMathString(text: string | DateTime | Date): boolean {
if (!text) {
return false;
}
if (typeof text === 'string' && (text.substring(0, 3) === 'now' || text.includes('||'))) {
return true;
} else {
return false;
}
}
/**
* Parses different types input to a moment instance. There is a specific formatting language that can be used
* if text arg is string. See unit tests for examples.