Comments (3)
There are several use cases. The main one, however, is that of interoperability. JavaScript interacts with data from many other platforms. We should be able to round-trip data that contains nanoseconds without any truncation or lossyness. This also helps for platforms that present data with other sub-millisecond units, such as microseconds or the 100-ns "ticks" used in .NET.
I'll add some more as I come across them. Do understand that we are talking about the case for this precision, which is a separate concept from accuracy. Only the host environment can address accuracy, and it's likely to vary significantly across hardware and OS.
from proposal-temporal.
Are you concerned with nanosecond precision or nanosecond resolution?
Ideally, one would have both but it seems to me that resolution is a characteristic of the temporal time types while precision is a characteristic of the source of the value. To my sensibilities, a single value has resolution and accuracy but precision is an attribute of a time source and can only be experienced or assessed with a collection of values. Or am I missing your point or meaning?
ntp.org has an overview of clock quality that seems relevant, though their description of precision seems conflicted, with two inconsistent definitions. I also quite like the Precision, Accuracy and Resolution page by Dave Tutelman.
I was long frustrated by systems that had only one second resolution and, with the speed of computers these days, now even millisecond resolution seems a handicap. There can be many events in a millisecond and without finer resolution, no way to record when they happened and put them in order. Not that the accuracy and precision of clocks on different systems are not still an even greater problem but it is nice to have data types that aren't the limiting factor.
from proposal-temporal.
@ig3 - We are primarily talking about the resolution of the data supported in the data structures. I have updated the title of this issue accordingly.
Using the definitions from Dave's page, we aren't really in a position to address precision or accuracy at all. Those are qualities of the host environment. The best we can do is to offer a data structure that can hold data with nanoseconds without losing them, and to expose any underlying functionality for getting the current system time with the highest resolution possible.
from proposal-temporal.
Related Issues (20)
- Polyfill: Temporal.PlainDate.from treats "eraYear" as "year" for calendars without eras
- UnbalanceDateDurationRelative: Return Date Duration Record but callers expect integer
- Add24HourDaysToNormalizedTimeDuration: Called with wrong argument order
- Temporal.Duration.prototype.{round,total}: Unnecessary call to CreateTemporalDate HOT 1
- Temporal.Duration.prototype.round: Unnecessary check for IsCalendarUnit(smallestUnit) HOT 2
- DifferencePlainDateTimeWithRounding: Called with Temporal.PlainDate instead of separate arguments for year-month-day HOT 1
- Consistent argument order for "timeZoneRec" and "calendarRec" HOT 1
- DifferencePlainDateTimeWithRounding + DifferenceZonedDateTimeWithRounding: Align argument order for "resolvedOptions" HOT 1
- DifferenceZonedDateTimeWithRounding: precalculatedPlainDateTime can be undefined HOT 1
- Temporal.Duration.prototype.total: Unnecessary assertion for roundRecord.[[Total]] not being UNSET HOT 1
- Temporal.Duration.prototype.{round,total}: Is CreateTemporalDuration really fallible when creating from balanced valid Duration?
- NudgeToCalendarUnit: CreateTemporalDate is fallible HOT 5
- NudgeToZonedTime: Bad named character reference for "≠"
- NudgeToZonedTime: Incorrect assertion for user-defined time zones or calendars HOT 1
- NudgeToDayOrTime: "remainder" not converted to Normalized Time Duration Record
- BubbleRelativeDuration: Wrong operator for loop condition HOT 1
- AddDate: CreateTemporalDate is fallible
- does `ZonedDateTime.from` with `offset: reject` always throw when the datetime is in a DST transition gap? if so, is that intended?
- NudgeToCalendarUnit: Wrong roundedSign for (roundedUnit - total == 0)? HOT 1
- NudgeToDayOrTime: Incorrect assertion in step 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proposal-temporal.