Skip to content

Commit 7ed8b4f

Browse files
Minor fix in the timestamp
1 parent 0fc1057 commit 7ed8b4f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/timestamps.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ They can be used in your struct like this:
1616

1717
```cpp
1818
struct Person {
19-
rfl::Field<"birthday", rfl::Timestamp<"%Y-%m-%d">> birthday;
19+
rfl::Timestamp<"%Y-%m-%d"> birthday;
2020
};
2121
```
2222
@@ -31,8 +31,8 @@ You can access the underlying `std::tm` struct using the `.tm()` method and you
3131
the string representation using the `.str()` method.
3232

3333
```cpp
34-
const std::tm birthday = person1.birthday().tm();
35-
std::cout << person1.birthday().str() << std::endl;
34+
const std::tm birthday = person1.birthday.tm();
35+
std::cout << person1.birthday.str() << std::endl;
3636
```
3737

3838
Note that constructing `rfl::Timestamp` from a string is convenient, but it might result in

0 commit comments

Comments
 (0)