Adam Shaw 11 роки тому
батько
коміт
e236f8d239
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      src/util.js

+ 6 - 0
src/util.js

@@ -360,6 +360,12 @@ function computeRangeAs(unit, start, end) {
 }
 
 
+// Returns a boolean about whether the given duration has any time parts (hours/minutes/seconds/ms)
+function durationHasTime(dur) {
+	return Boolean(dur.hours() || dur.minutes() || dur.seconds() || dur.milliseconds());
+}
+
+
 function isNativeDate(input) {
 	return  Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date;
 }