Optimization for the times module; changed let to const.
This commit is contained in:
parent
547e8aa418
commit
7fde07ab29
1 changed files with 5 additions and 5 deletions
|
|
@ -379,15 +379,15 @@ proc getClockStr*(): string {.rtl, extern: "nt$1".} =
|
||||||
|
|
||||||
proc `$`*(day: TWeekDay): string =
|
proc `$`*(day: TWeekDay): string =
|
||||||
## stingify operator for ``TWeekDay``.
|
## stingify operator for ``TWeekDay``.
|
||||||
let lookup: array[TWeekDay, string] = ["Monday", "Tuesday", "Wednesday", "Thursday",
|
const lookup: array[TWeekDay, string] = ["Monday", "Tuesday", "Wednesday",
|
||||||
"Friday", "Saturday", "Sunday"]
|
"Thursday", "Friday", "Saturday", "Sunday"]
|
||||||
return lookup[day]
|
return lookup[day]
|
||||||
|
|
||||||
proc `$`*(m: TMonth): string =
|
proc `$`*(m: TMonth): string =
|
||||||
## stingify operator for ``TMonth``.
|
## stingify operator for ``TMonth``.
|
||||||
let lookup: array[TMonth, string] = ["January", "February", "March", "April",
|
const lookup: array[TMonth, string] = ["January", "February", "March",
|
||||||
"May", "June", "July", "August", "September", "October", "November",
|
"April", "May", "June", "July", "August", "September", "October",
|
||||||
"December"]
|
"November", "December"]
|
||||||
return lookup[m]
|
return lookup[m]
|
||||||
|
|
||||||
{.pop.}
|
{.pop.}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue