about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-08-16 21:40:08 +0530
committerAndinus <andinus@nand.sh>2021-08-16 21:40:08 +0530
commit0fb5f8adc05557df4991abbe5268cf63414753c2 (patch)
treeebc650925a37002ef4e8770258edcec5bace9221
parentafc3d1618d994e616606c0a526ff2b745712ac8c (diff)
downloadtaurus-0fb5f8adc05557df4991abbe5268cf63414753c2.tar.gz
Add tests for timestamp-to-date subroutine
-rw-r--r--t/02-timestamp-to-date.rakutest7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/02-timestamp-to-date.rakutest b/t/02-timestamp-to-date.rakutest
new file mode 100644
index 0000000..4e94dd1
--- /dev/null
+++ b/t/02-timestamp-to-date.rakutest
@@ -0,0 +1,7 @@
+use Test;
+use Taurus::Timestamp;
+
+plan 2;
+
+is-deeply timestamp-to-date("16/08/2021"), Date.new("2021-08-16"), "Date";
+is-deeply timestamp-to-date("16/08/2020  00:00 am"), Date.new("2020-08-16"), "Date with timestamp";