Menu

#2389 Error in documentation: tm_yday()

None
closed-fixed
nobody
tm_yday() (1)
2021-01-02
2021-01-02
theozh
No

In case I haven't understood something wrong,
the documentation for tm_yday() seems to be wrong (gnuplot 4.4.0 to 5.4.0)

V4.4.0

The tm_ydayfunction interprets its argument as a time,in seconds from 1 Jan 2000.It returns the day of the year (an integer in the range 1--366)as a real.

V5.4.0

The tm_yday(x) function interprets its argument as a time, in seconds from 1 Jan 1970 . It returns the day of the year (an integer in the range 1--366) as a real.

However,

print tm_yday(strptime("%d.%m.%Y","31.12.2020"))
print tm_yday(strptime("%d.%m.%Y","01.01.2021"))

will lead to:

365.0
0.0

So, it should read ... in the range 0-365...

Discussion

  • Ethan Merritt

    Ethan Merritt - 2021-01-02
    • status: open --> closed-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2021-01-02

    good catch

     

Log in to post a comment.