Open Bug 1839695 Opened 2 years ago Updated 2 years ago

Reorder enum values in TemporalUnit to make comparison more natural

Categories

(Core :: JavaScript: Standard Library, task, P3)

task

Tracking

()

People

(Reporter: anba, Unassigned)

References

(Blocks 1 open bug)

Details

TemporalUnit is currently defined as:

enum class TemporalUnit {
  Auto,
  Year,
  Month,
  Week,
  Day,
  Hour,
  Minute,
  Second,
  Millisecond,
  Microsecond,
  Nanosecond
};

Maybe it should be reordered to

enum class TemporalUnit {
  Auto,
  Nanosecond,
  Microsecond,
  Millisecond,
  Second,
  Minute,
  Hour,
  Day,
  Week,
  Month,
  Year,
};

That way comparisons like largestUnit > smallestUnit are more natural to interpret.

Severity: -- → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.