diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2019-01-30 13:54:26 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-02-11 09:11:41 +0100 |
commit | 308d6a85e6489a3ed739e205f9de6bc5050b09f5 (patch) | |
tree | 3b8b25aac91472a222ff7bba5f38016b09b44bf2 /server/sonar-web/src/main/js/helpers/dates.ts | |
parent | 5e68732f4883ffb937f42245072e83265cd09cce (diff) | |
download | sonarqube-308d6a85e6489a3ed739e205f9de6bc5050b09f5.tar.gz sonarqube-308d6a85e6489a3ed739e205f9de6bc5050b09f5.zip |
Merge pull request #1178 from SonarSource/feature/jl/add_dates_to_users_and_user_tokens
Add dates to users and user tokens
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/dates.ts')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/dates.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/helpers/dates.ts b/server/sonar-web/src/main/js/helpers/dates.ts index ee2a3cca7f9..45b3fc648f0 100644 --- a/server/sonar-web/src/main/js/helpers/dates.ts +++ b/server/sonar-web/src/main/js/helpers/dates.ts @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as _differenceInDays from 'date-fns/difference_in_days'; +import * as _differenceInHours from 'date-fns/difference_in_hours'; import * as _differenceInSeconds from 'date-fns/difference_in_seconds'; import * as _differenceInYears from 'date-fns/difference_in_years'; import * as _isSameDay from 'date-fns/is_same_day'; @@ -67,6 +68,10 @@ export function differenceInDays(dateLeft: ParsableDate, dateRight: ParsableDate return _differenceInDays(dateLeft, dateRight); } +export function differenceInHours(dateLeft: ParsableDate, dateRight: ParsableDate): number { + return _differenceInHours(dateLeft, dateRight); +} + export function differenceInSeconds(dateLeft: ParsableDate, dateRight: ParsableDate): number { return _differenceInSeconds(dateLeft, dateRight); } |