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