doc: times.nim: DD -> dd (#23857)

`YYYY-MM-dd` was mistaken as `YYYY-MM-DD`.
This commit is contained in:
lit
2024-07-18 19:59:48 +08:00
committed by GitHub
parent f765898a75
commit 6aa54d533b

View File

@@ -1498,11 +1498,11 @@ proc `-=`*(a: var DateTime, b: Duration) =
a = a - b
proc getDateStr*(dt = now()): string {.rtl, extern: "nt$1", tags: [TimeEffect].} =
## Gets the current local date as a string of the format `YYYY-MM-DD`.
## Gets the current local date as a string of the format `YYYY-MM-dd`.
runnableExamples:
echo getDateStr(now() - 1.months)
assertDateTimeInitialized dt
result = newStringOfCap(10) # len("YYYY-MM-DD") == 10
result = newStringOfCap(10) # len("YYYY-MM-dd") == 10
result.addInt dt.year
result.add '-'
result.add intToStr(dt.monthZero, 2)