Merge branch 'master' of github.com:Araq/Nimrod
This commit is contained in:
commit
547e8aa418
4 changed files with 336 additions and 2 deletions
|
|
@ -377,4 +377,17 @@ proc getClockStr*(): string {.rtl, extern: "nt$1".} =
|
|||
result = intToStr(ti.hour, 2) & ':' & intToStr(ti.minute, 2) &
|
||||
':' & intToStr(ti.second, 2)
|
||||
|
||||
proc `$`*(day: TWeekDay): string =
|
||||
## stingify operator for ``TWeekDay``.
|
||||
let lookup: array[TWeekDay, string] = ["Monday", "Tuesday", "Wednesday", "Thursday",
|
||||
"Friday", "Saturday", "Sunday"]
|
||||
return lookup[day]
|
||||
|
||||
proc `$`*(m: TMonth): string =
|
||||
## stingify operator for ``TMonth``.
|
||||
let lookup: array[TMonth, string] = ["January", "February", "March", "April",
|
||||
"May", "June", "July", "August", "September", "October", "November",
|
||||
"December"]
|
||||
return lookup[m]
|
||||
|
||||
{.pop.}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue