Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现 Safari (5.1.7 (6534.57.2)) 有一个奇怪的问题,在将日期转换为字符串时,我得到一个毫秒数为负数的表示。
new Date(1966,6,7,20,45,38,713)
结果.toJSON()是:
.toJSON()
"1966-07-07T18:45:38.-287Z"
它是一个 Safari 错误(如我所愿)还是有任何奇怪的 Javascript 规则,这是预期的(甚至是可接受的)行为?
toJSONwebkit 错误跟踪器中的算法存在一个错误:
toJSON
它看起来像另一个测试用例,但它也可能是这个问题的根本原因。
我试图理解一段代码,并遇到了 PHP 的 preg_replace 函数中使用的这个正则表达式。
'/(?<!-)color[^{:]*:[^{#]*$/i'
这一点……(?<!-) 没有出现在我的任何正则表达式手册中。请问有人知道这是什么意思吗?(谷歌不返回任何东西——我认为符号在谷歌中不起作用。)
(?<!-)