From 255d228c19ab7dd64762784ecbe6bb934e9a120c Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 25 Nov 2019 19:53:47 +0000 Subject: [PATCH] rename helpers -> dateUtils and add header Signed-off-by: Adam Warner --- src/components/log/LiveLog.tsx | 2 +- src/util/{helpers.tsx => dateUtils.tsx} | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) rename src/util/{helpers.tsx => dateUtils.tsx} (51%) diff --git a/src/components/log/LiveLog.tsx b/src/components/log/LiveLog.tsx index 52abdf1..350c9ee 100644 --- a/src/components/log/LiveLog.tsx +++ b/src/components/log/LiveLog.tsx @@ -11,7 +11,7 @@ import React, { Component } from "react"; import { animateScroll } from "react-scroll"; import { WithAPIData } from "../common/WithAPIData"; -import { humanTimestamp } from "../../util/helpers"; +import { humanTimestamp } from "../../util/dateUtils"; import api from "../../util/api"; export interface LiveLogProps { diff --git a/src/util/helpers.tsx b/src/util/dateUtils.tsx similarity index 51% rename from src/util/helpers.tsx rename to src/util/dateUtils.tsx index 3120a07..edbff72 100644 --- a/src/util/helpers.tsx +++ b/src/util/dateUtils.tsx @@ -1,3 +1,13 @@ +/* Pi-hole: A black hole for Internet advertisements + * (c) 2019 Pi-hole, LLC (https://pi-hole.net) + * Network-wide ad blocking via your own hardware. + * + * Web Interface + * Date/Time utility functions + * + * This file is copyright under the latest version of the EUPL. + * Please see LICENSE file for your rights under this license. */ + export function humanTimestamp(input: number) { var date = new Date(input * 1000); var hours = date.getHours();