diff --git a/doc/docs.md b/doc/docs.md index 5c05dc3569..c89ab330e5 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -747,11 +747,12 @@ However, you _can_ redeclare a type. ```v import time +import math type MyTime = time.Time fn (mut t MyTime) century() int { - return 1 + t.year % 100 + return int(1.0 + math.trunc(f64(t.year) * 0.009999794661191)) } fn main() {