Skip to content

Commit 65d9a02

Browse files
committed
add serdeRegister for timestamp
1 parent 13cd182 commit 65d9a02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/mir/timestamp.d

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Timestamp
44
module mir.timestamp;
55

66
private alias isDigit = (dchar c) => uint(c - '0') < 10;
7-
import mir.serde: serdeIgnore;
7+
import mir.serde: serdeIgnore, serdeRegister;
88

99
version(D_Exceptions)
1010
///
@@ -30,6 +30,7 @@ version(D_Exceptions)
3030
private static immutable InvalidISOString = new DateTimeException("Invalid ISO String");
3131
private static immutable InvalidISOExtendedString = new DateTimeException("Invalid ISO Extended String");
3232
private static immutable InvalidString = new DateTimeException("Invalid String");
33+
private static immutable ExpectedDuration = new DateTimeException("Expected Duration");
3334
}
3435

3536
/++
@@ -40,6 +41,7 @@ This means that transcoding requires a conversion between UTC and local time.
4041
4142
`Timestamp` precision is up to picosecond (second/10^12).
4243
+/
44+
@serdeRegister
4345
struct Timestamp
4446
{
4547
import std.traits: isSomeChar;

0 commit comments

Comments
 (0)