mirror of
https://github.com/RGBCube/revolt.v
synced 2025-07-27 17:07:45 +00:00
Add time test
This commit is contained in:
parent
5dec948e80
commit
32e7c79cef
1 changed files with 14 additions and 0 deletions
14
src/time_test.v
Normal file
14
src/time_test.v
Normal file
|
@ -0,0 +1,14 @@
|
|||
module revolt
|
||||
|
||||
import time
|
||||
|
||||
fn test_time() {
|
||||
time := Time(time.unix(1670178420))
|
||||
assert time.format(.short_time) == '<t:1670178420:t>'
|
||||
assert time.format(.long_time) == '<t:1670178420:T>'
|
||||
assert time.format(.short_date) == '<t:1670178420:d>'
|
||||
assert time.format(.long_date) == '<t:1670178420:D>'
|
||||
assert time.format(.short_date_time) == '<t:1670178420:f>'
|
||||
assert time.format(.long_date_time) == '<t:1670178420:F>'
|
||||
assert time.format(.relative) == '<t:1670178420:R>'
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue