-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weeks cause problems in new date & time picker (#10468)
* weeks cause problems * replace module * replace module
- Loading branch information
1 parent
7494898
commit 59eaf3b
Showing
5 changed files
with
123 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
47 changes: 47 additions & 0 deletions
47
graylog2-web-interface/src/views/components/searchbar/date-time-picker/index.d.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (C) 2020 Graylog, Inc. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the Server Side Public License, version 1, | ||
* as published by MongoDB, Inc. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* Server Side Public License for more details. | ||
* | ||
* You should have received a copy of the Server Side Public License | ||
* along with this program. If not, see | ||
* <http://www.mongodb.com/licensing/server-side-public-license>. | ||
*/ | ||
|
||
// Type definitions for moment-precise-range 0.2 | ||
// Original: | ||
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/bc1eb3b28e41b2ed54865aecf134eae6c0b23add/types/moment-precise-range-plugin/index.d.ts | ||
// Project: https://github.com/codebox/moment-precise-range | ||
// Definitions by: Mitchell Grice <https://github.com/gricey432> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
|
||
import moment = require('moment'); | ||
|
||
export = moment; | ||
|
||
declare module 'moment' { | ||
interface PreciseRangeValueObject { | ||
years: number; | ||
months: number; | ||
days: number; | ||
hours: number; | ||
minutes: number; | ||
seconds: number; | ||
firstDateWasLater: boolean; | ||
} | ||
|
||
interface Moment { | ||
preciseDiff(d2: Moment, returnValueObject?: false): string; | ||
preciseDiff(d2: Moment, returnValueObject: true): PreciseRangeValueObject; | ||
} | ||
|
||
function preciseDiff(d1: Moment, d2: Moment, returnValueObject?: false): string; | ||
function preciseDiff(d1: Moment, d2: Moment, returnValueObject: true): PreciseRangeValueObject; | ||
} |
This file contains 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