Page MenuHomePhabricator

Fix a hang in fancy date picker for Ye Olde Time Years
ClosedPublic

Authored by epriestley on Aug 10 2017, 10:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 30, 12:13 PM
Unknown Object (File)
Mon, Dec 30, 1:39 AM
Unknown Object (File)
Tue, Dec 24, 2:43 AM
Unknown Object (File)
Sat, Dec 21, 2:33 PM
Unknown Object (File)
Wed, Dec 18, 4:30 AM
Unknown Object (File)
Fri, Dec 13, 4:52 PM
Unknown Object (File)
Fri, Dec 6, 3:02 AM
Unknown Object (File)
Nov 3 2024, 11:41 PM
Subscribers
None
Tokens
"Pterodactyl" token, awarded by avivey.

Details

Summary

Fixes T12960. When the user enters a date like "1917", we currently loop ~20 million times.

Instead:

  • Be a little more careful about parsing.
  • Javascript's default behavior of interpreting "2001-02-31" as "2001-03-03" ("February 31" -> "March 3") already seems reasonable, so just let it do that.
Test Plan

Verified these behaviors:

  • 2017-08-08 - Valid, recent.
  • 17-08-08 - Valid, recent.
  • 1917-08-08 - Valid, a century ago, no loop.
  • 2017-02-31 - "February 31", interpreted as "March 3" by Javascsript, seems reasonable.
  • Quack - Default, current time.
  • 0/0/0, 0/99/0 - Default, current time.

Diff Detail

Repository
rP Phabricator
Branch
date1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17977
Build 24141: Run Core Tests
Build 24140: arc lint + arc unit