niminst is now able to create build files for debhelper so that .deb packages can be created. Implemented $ in the times module for TWeekDay and TMonth.

This commit is contained in:
dom96 2012-02-16 22:11:00 +00:00
commit 6901a725d5
4 changed files with 336 additions and 2 deletions

View file

@ -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.}