Skip to content

Stricter requirements for NanosecondsToDays return values? #2357

@anba

Description

@anba

Can we add requirements for NanosecondsToDays to disallow bad return values, like for example:

  1. Require the sign for result.[[Days]] and result.[[Nanoseconds]] matches the sign of the input nanoseconds.
  2. Require that abs(result.[[Nanoseconds]]) is less than result.[[DayLength]].
  3. Maybe also require that result.[[DayLength]] is less than some constant, for example nsPerDay * 2?

Metadata

Metadata

Assignees

Labels

non-prod-polyfillTHIS POLYFILL IS NOT FOR PRODUCTION USE!normativeWould be a normative change to the proposalspec-textSpecification text involved

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions