From fbc019e7fb2116bfcaad611f50155dbcf1187bbd Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Thu, 2 Mar 2017 12:01:15 +0100 Subject: [PATCH] [Minor] Added JavaDoc to DateHelper.truncateTimeFromTimestamp --- .../java/li/strolch/utils/helper/DateHelper.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/li.strolch.utils/src/main/java/li/strolch/utils/helper/DateHelper.java b/li.strolch.utils/src/main/java/li/strolch/utils/helper/DateHelper.java index f0b11433a..05789cdfb 100644 --- a/li.strolch.utils/src/main/java/li/strolch/utils/helper/DateHelper.java +++ b/li.strolch.utils/src/main/java/li/strolch/utils/helper/DateHelper.java @@ -100,9 +100,17 @@ public class DateHelper { return labelString; } - public static long truncateTimeFromTimestamp(String strTimeStamp) { + /** + * Parses the given ISO8601 time stamp and truncates the time from it, returning the time in long + * + * @param iso8601Timestamp + * the ISO 8601 date to parse + * + * @return the truncated time in milliseconds + */ + public static long truncateTimeFromTimestamp(String iso8601Timestamp) { - Date dateToCut = ISO8601FormatFactory.getInstance().parseDate(strTimeStamp); + Date dateToCut = ISO8601FormatFactory.getInstance().parseDate(iso8601Timestamp); Calendar cal = Calendar.getInstance(); cal.setTime(dateToCut);