From 98a409ca4313140fc6dfeb57bdd3e973390c8881 Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt <3165388245@qq.com> Date: Sun, 17 Sep 2023 13:45:54 +0800 Subject: [PATCH] :bookmark: version 0.4.0 --- pyproject.toml | 2 +- test.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c5ab20e..5bc2abf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "tarina" -version = "0.3.3" +version = "0.4.0" description = "A collection of common utils for Arclet" authors = [ {name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com"}, diff --git a/test.py b/test.py index 843f807..7876687 100644 --- a/test.py +++ b/test.py @@ -103,3 +103,11 @@ def add_user(user: User): return user assert add_user("test", age=1) == User("test", 1) + + +def test_date_parser(): + from tarina import DateParser + from datetime import datetime + + assert DateParser.parse("2021-01-01") == datetime(2021, 1, 1) + assert DateParser.parse("2021-01-01 12:34:56") == datetime(2021, 1, 1, 12, 34, 56)