[doc] Standardize deprecation warnings

This commit is contained in:
Michael Voronin 2018-04-20 17:48:29 +03:00
commit 08d1b5892b

View file

@ -1957,15 +1957,14 @@ proc getTimezone*(): int {.tags: [TimeEffect], raises: [], benign, deprecated.}
proc timeInfoToTime*(dt: DateTime): Time {.tags: [], benign, deprecated.} = proc timeInfoToTime*(dt: DateTime): Time {.tags: [], benign, deprecated.} =
## Converts a broken-down time structure to calendar time representation. ## Converts a broken-down time structure to calendar time representation.
## ##
## **Warning:** This procedure is deprecated since version 0.14.0. ## **Deprecated since v0.14.0:** use ``toTime`` instead.
## Use ``toTime`` instead.
dt.toTime dt.toTime
when defined(JS): when defined(JS):
var start = getTime() var start = getTime()
proc getStartMilsecs*(): int {.deprecated, tags: [TimeEffect], benign.} = proc getStartMilsecs*(): int {.deprecated, tags: [TimeEffect], benign.} =
## get the milliseconds from the start of the program. **Deprecated since ## get the milliseconds from the start of the program.
## version 0.8.10.** Use ``epochTime`` or ``cpuTime`` instead. ## **Deprecated since v0.8.10:** use ``epochTime`` or ``cpuTime`` instead.
let dur = getTime() - start let dur = getTime() - start
result = (convert(Seconds, Milliseconds, dur.seconds) + result = (convert(Seconds, Milliseconds, dur.seconds) +
convert(Nanoseconds, Milliseconds, dur.nanosecond)).int convert(Nanoseconds, Milliseconds, dur.nanosecond)).int
@ -1979,19 +1978,19 @@ else:
proc timeToTimeInterval*(t: Time): TimeInterval {.deprecated.} = proc timeToTimeInterval*(t: Time): TimeInterval {.deprecated.} =
## Converts a Time to a TimeInterval. ## Converts a Time to a TimeInterval.
## ##
## **Warning:** This procedure is deprecated since version 0.14.0. ## **Deprecated since v0.14.0:** use ``toTimeInterval`` instead.
## Use ``toTimeInterval`` instead.
# Milliseconds not available from Time # Milliseconds not available from Time
t.toTimeInterval() t.toTimeInterval()
proc getDayOfWeek*(day, month, year: int): WeekDay {.tags: [], raises: [], benign, deprecated.} = proc getDayOfWeek*(day, month, year: int): WeekDay {.tags: [], raises: [], benign, deprecated.} =
## **Warning:** This procedure is deprecated since version 0.18.0. ## **Deprecated since v0.18.0:** use
## ``getDayOfWeek(monthday: MonthdayRange; month: Month; year: int)`` instead.
getDayOfWeek(day, month.Month, year) getDayOfWeek(day, month.Month, year)
proc getDayOfWeekJulian*(day, month, year: int): WeekDay {.deprecated.} = proc getDayOfWeekJulian*(day, month, year: int): WeekDay {.deprecated.} =
## Returns the day of the week enum from day, month and year, ## Returns the day of the week enum from day, month and year,
## according to the Julian calendar. ## according to the Julian calendar.
## **Warning:** This procedure is deprecated since version 0.18.0. ## **Deprecated since v0.18.0:**
# Day & month start from one. # Day & month start from one.
let let
a = (14 - month) div 12 a = (14 - month) div 12