1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00
phorge-phorge/webroot/rsrc
epriestley e89087fc51 Fix a hang in fancy date picker for Ye Olde Time Years
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.

Reviewers: avivey, chad

Reviewed By: chad

Maniphest Tasks: T12960

Differential Revision: https://secure.phabricator.com/D18383
2017-08-10 08:48:44 -07:00
..
audio/basic Add a few more sounds 2017-04-19 13:47:23 -07:00
css Clean up some dialog spacing 2017-08-09 20:04:39 -07:00
externals Hide the Differential scroll objective list on trackpad systems 2017-05-20 07:56:21 -07:00
favicons JX.Favicon for Conpherence 2016-10-20 12:17:50 -07:00
image Add checkbox images for remarkup 2017-06-06 14:04:09 +00:00
js Fix a hang in fancy date picker for Ye Olde Time Years 2017-08-10 08:48:44 -07:00