bugfixes mostly JS related

This commit is contained in:
Araq 2013-05-01 14:48:40 +02:00
commit 56045ad7ff
10 changed files with 37 additions and 20 deletions

View file

@ -463,6 +463,8 @@ when not defined(JS):
elif defined(JS):
proc newDate(): TTime {.importc: "new Date".}
proc internGetTime(): TTime {.importc: "new Date", tags: [].}
proc newDate(value: float): TTime {.importc: "new Date".}
proc newDate(value: string): TTime {.importc: "new Date".}
proc getTime(): TTime =
@ -494,7 +496,7 @@ elif defined(JS):
result.yearday = 0
proc TimeInfoToTime*(timeInfo: TTimeInfo): TTime =
result = getTime()
result = internGetTime()
result.setSeconds(timeInfo.second)
result.setMinutes(timeInfo.minute)
result.setHours(timeInfo.hour)