1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

time: add Time.format_rfc3339() method

This commit is contained in:
Delyan Angelov
2022-12-11 10:23:05 +02:00
parent 3ea9e3aba9
commit 2ecb892985
2 changed files with 11 additions and 0 deletions

View File

@ -93,6 +93,10 @@ fn test_format_ss_milli() {
assert '1980-07-11 21:23:42.123' == time_to_test.format_ss_milli()
}
fn test_format_rfc3339() {
assert '1980-07-11T21:23:42.123Z' == time_to_test.format_rfc3339()
}
fn test_format_ss_micro() {
assert '11.07.1980 21:23:42.123456' == time_to_test.get_fmt_str(.dot, .hhmmss24_micro,
.ddmmyyyy)