dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
739 stars 1.57k forks source link

The described 'accurate to the nearest millisecond' behavior is out of date. #10603

Open bartwe opened 1 month ago

bartwe commented 1 month ago

Type of issue

Missing information

Description

The document is outdated as the 'round to nearest millisecond' behavior has been deprecated, likely since adding microsecond support.

running the example now yields.

This example of TimeSpan.FromMilliseconds( double ) generates the following output.

 FromMilliseconds          TimeSpan
 ----------------          --------
                1          00:00:00.0010000
              1,5          00:00:00.0015000
          12345,6          00:00:12.3456000
      123456789,8        1.10:17:36.7898000
  1234567898765,4    14288.23:31:38.7654000
             1000          00:00:01
            60000          00:01:00
          3600000          01:00:00
         86400000        1.00:00:00
       1801220200       20.20:20:20.2000000

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.timespan.frommilliseconds?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/TimeSpan.xml

Document Version Independent Id

bc6c33fe-75bc-0191-ec1e-82ea73854f93

Article author

@dotnet-bot

dotnet-issue-labeler[bot] commented 1 month ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

dotnet-issue-labeler[bot] commented 1 month ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

bartwe commented 3 weeks ago

See https://github.com/dotnet/runtime/issues/66815