Made times.nim compile again to JS
This commit is contained in:
parent
2ec6fe56ad
commit
96234f36ca
1 changed files with 1 additions and 2 deletions
|
|
@ -671,13 +671,12 @@ elif defined(JS):
|
|||
|
||||
proc toTime*(timeInfo: TimeInfo): Time =
|
||||
result = internGetTime()
|
||||
result.setSeconds(timeInfo.second)
|
||||
result.setMinutes(timeInfo.minute)
|
||||
result.setHours(timeInfo.hour)
|
||||
result.setMonth(ord(timeInfo.month))
|
||||
result.setFullYear(timeInfo.year)
|
||||
result.setDate(timeInfo.monthday)
|
||||
result = result + initInterval(seconds=timeInfo.timezone)
|
||||
result.setSeconds(timeInfo.second + timeInfo.timezone)
|
||||
|
||||
proc `$`(timeInfo: TimeInfo): string = return $(toTime(timeInfo))
|
||||
proc `$`(time: Time): string = return $time.toLocaleString()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue