aboutsummaryrefslogtreecommitdiffstats
path: root/library/moment/src/lib/utils/abs-ceil.js
diff options
context:
space:
mode:
Diffstat (limited to 'library/moment/src/lib/utils/abs-ceil.js')
-rw-r--r--library/moment/src/lib/utils/abs-ceil.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/moment/src/lib/utils/abs-ceil.js b/library/moment/src/lib/utils/abs-ceil.js
new file mode 100644
index 000000000..7cf93290c
--- /dev/null
+++ b/library/moment/src/lib/utils/abs-ceil.js
@@ -0,0 +1,7 @@
+export default function absCeil (number) {
+ if (number < 0) {
+ return Math.floor(number);
+ } else {
+ return Math.ceil(number);
+ }
+}